Skip to content

Conversation

droshev
Copy link
Contributor

@droshev droshev commented Sep 29, 2025

implementation of the ui5wc wrapper and the 4 packages

part of #13176

@droshev droshev self-assigned this Sep 29, 2025
@droshev droshev added the ui5 webc ui5 webc label Sep 29, 2025
@droshev droshev added this to the Sprint 150 - September 2025 milestone Sep 29, 2025
Copy link

netlify bot commented Sep 29, 2025

Deploy Preview for fundamental-ngx ready!

Name Link
🔨 Latest commit 12b817b
🔍 Latest deploy log https://app.netlify.com/projects/fundamental-ngx/deploys/68e5533aa24616000867fa65
😎 Deploy Preview https://deploy-preview-13511--fundamental-ngx.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@droshev droshev changed the title [WIP] feat: bring ui5wc generator feat: bring ui5wc generator Oct 3, 2025
Comment on lines +10 to +14
abstract name: string;

protected availableThemes = signal<string[]>(supportedThemes);

protected _globalThemingService: Ui5ThemingService | null = inject(Ui5ThemingService, { optional: true });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add some typedocs for these

Comment on lines +30 to +44
supportsTheme(theme: string): boolean | Promise<boolean> {
return this.availableThemes().includes(theme);
}

getAvailableThemes(): string[] | Promise<string[]> {
return this.availableThemes();
}

async setTheme(theme: string): Promise<boolean> {
const supported = this.availableThemes().includes(theme);
if (supported) {
setTheme(theme);
}
return supported;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@nnaydenow
Copy link

nnaydenow commented Oct 6, 2025

  • Generated output (events) have CustomEvent<any> as a type. Not sure how the events will be handled in Angular world, but from web components side there are types that describe the event details. (e.g. ui5overflow = output<UI5CustomEvent<_AvatarGroup, 'overflow'>>(); and test it in the angular app_

  • When synchronizing outputs (events) you are striping the ui5 world from event name ui5selectionChange => selectionChange. Since some events are conflicting with the native one (f.e click) we provide event in conflict and no conflict mode. This means that click is fired as click and ui5-click. I think it would be safest to convert the event from pascalCase to kebab-case. (e.g. const outputsToSync = [ 'ui5-click', 'ui5-overflow', ];

  • For enumarations I see that you generate types.ts file but I think that you can extract the type directly from the web components one. For example UploadCollectionItem has uploadState property. You could read the property from UploadCollectionItem.uploadState. I think it will reduce and simpify the import management. Investigate whether we can re-export them from ui5 webC directly

  • libs/ui5-webcomponents-fiori/theming/index.ts has name = 'ui-5-webcomponents-theming-service'; ui-5 is written wrong. just to double check if it's expected. I'm not sure how the theming service works exactly but it's strange that fiori's one load the main one, but not its own.
    image - import('@ui5/webcomponents/dist/generated/json-imports/Themes.js'), has to be import('@ui5/webcomponents-fiori/dist/generated/json-imports/Themes.js'), - add additional suffix with the package

  • Since you are consuming the final classes (you are not doing anything with the hierarchy of the classes of web components) of the web components I would suggest to filter the produced wrappers only to the classes of CustomElement type. These elements has customElement boolean property and tagName string property.
    https://github.com/webcomponents/custom-elements-manifest/blob/main/schema.d.ts#L224

  • We need to merge the manifests during the generation since the custom elements analyzer doesn't resolve cross package inheritance and components like SideNavigationItem have only 2 inputs, while in the reality they have more. - no issue here

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

Successfully merging this pull request may close these issues.

3 participants