Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration of custom prefixed PDS components in sample projects v2 #856

Closed
9 tasks done
stephanschroeter opened this issue Aug 4, 2020 · 2 comments
Closed
9 tasks done
Assignees
Labels

Comments

@stephanschroeter
Copy link
Contributor

stephanschroeter commented Aug 4, 2020

Scope
With @porsche-design-system/components-js/@porsche-design-system/components-angular/@porsche-design-system/components-react @ v2.0.0-alpha.0 we introduced the possibility to prefix and scope web components during runtime to enable micro service architecture. Therefore we need to gain experience in real life examples:

Notes
If the PDS loader would be implemented into index.html the loading performance could be increased for frameworks and improve the FOUC/FOUT. The PDS would be faster than the framework.

Subtasks

  • Task
  • Home & Nav test completed
  • integrate PDS in vanillaJS
  • integrate PDS in react
  • integrate PDS in angular
  • integrate PDS in nextJS
  • integrate PDS in gatsby
  • Test Angular components if they still need the component tag name as attribute like: Headline.
  • Cleanup branches after alpha.6 release

Findings

To test PHN we need a .tgz file of their build with our alpha components. With the attachment we have so far, we can only test it in vanilla, it does not work in react/angular

Vanilla-JS:
- If we use our Components with a custom prefix in combination with PHN with prefix, the web-components-manager does not apply the defined prefix. This only happens when we use a different PDS version than the micro-service.
-> From Version alpha 2 -> 3 the web-component manager does not register prefixes

React:
- Documentation React import { getPrefixedComponents } from '@porsche-design-system/components-react/dist/prefixed-components'; is wrong, dist directory does not exist anymore
Fixed in Branch 856
- Using prefixed components in combination with PHN, the web-components-manager does only load alpha.4 and not alpha.0. He should load both as it is used in PHN
This only occurred due to copying the provided directory to the node_modules. This caused a wrong entry point. While using a packed Project it loads both versions as expected

Angular:
- components-wrapper.component.d.ts try's to import { Components } from '@porsche-design-system/components';. We do not provide the components package. The application cannot build without those typings. We have a ticket #987. This has to be resolved as soon as possible.
- Testing in Angular is therefore blocked, we cant use v2 until there is a solution

  • ngcc throws error in /@porsche-design-system/components-angular/bundles/porsche-design-system-components-angular.umd.js -> 975 error NG1010: Value at position 0 in the NgModule.declarations of PorscheDesignSystemModule is not a reference: [object Object]
  • In Branch 856 is a script fix. Afterwards Angular works as aspected so far.

NextJS:

  • Cannot build because we use window in one of the components? We use window in calcLineHeight and transitionListener. It was not an issue in v1.

Bildschirmfoto 2020-10-21 um 12 54 12

Gatsby:

Attachments

Home & Nav with v2 alpha.0
porsche-navigation.zip
Packed Home & Nav alpha.5 prefix, no prefix and alpha.4
PHN-Packages.zip

@stephanschroeter stephanschroeter added the to be refined issue has to be refined label Aug 4, 2020
@stephanschroeter stephanschroeter modified the milestones: Q3/2020 - Components & Assets, Q3/2020 - Operations Aug 4, 2020
@marcelbertram marcelbertram removed the to be refined issue has to be refined label Aug 11, 2020
@denyo denyo changed the title Integration of custom prefixed PDS components in sample projects Integration of custom prefixed PDS components in sample projects v2 Aug 19, 2020
@marcelbertram marcelbertram modified the milestones: Operations, Global Web Component / Widget Approach Sep 25, 2020
@stephanschroeter stephanschroeter modified the milestones: Global Web Component / Widget Approach, Porsche Design System @ v2 stable Sep 25, 2020
@anotherMatze anotherMatze self-assigned this Oct 19, 2020
@anotherMatze anotherMatze added the blocked Can't be completed label Oct 21, 2020
@anotherMatze
Copy link
Contributor

#987 needs to be completed before we can continue working on this story!

@anotherMatze
Copy link
Contributor

Follow up tickets #1014 and #1009 created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants