-
Notifications
You must be signed in to change notification settings - Fork 103
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
[Legacy Table & Popover]: [Legacy Table style broken, and popover not show beside right opener] #6553
Comments
Hi @JackieWei calling Example: onProfileClick={(event) => {
if (profileMenuRef?.current) {
profileMenuRef.current.opener = event.detail.targetRef;
profileMenuRef.current.open = true;
}
}} The issue regarding the legacy table is similar to this one: #6344 To summarize, the reason for this issue is that different custom elements with the same name (e.g. We couldn't find a solution for it on our end, even by adjusting framework configurations for Vite, Next, etc., or using plugins. Of all the bundlers we tested, only Turbopack seems capable of tree shaking in development mode. This is therefore not a small matter but requires a discussion with the UI5 Web Components team. Hopefully, together we can find a solution. |
Hi @Lukas742 I tried the following code: https://stackblitz.com/edit/github-wmf1wn-dyxxbv?file=src%2Fmain.tsx So basically if we use ANY import from ui5/webcomponents-react, the legay table won't work (at least in dev env without treeshaking) am I understanding correctly? I'm also aware of the other issue with ui5/webcomponents team: SAP/ui5-webcomponents#9920 Please review the stackblitz above and confirm my understanding... And maybe we could think of a solution. Thanks. |
By the way, we insist on using the legacy table because of the TableGroupRow. Unfortunately, that component has been deleted from the V2 table. |
Hi @azhu716
For me, this example using the v2 table is working as intended. As
Currently yes, but once this commit has been released, only using file-imports ( Example using a snapshot version of ui5wcr: https://stackblitz.com/edit/github-wmf1wn-cswuuk?file=src%2FApp.tsx,src%2Fmain.tsx Additionally, I believe there’s a better workaround for this. The issue is caused by the order in which custom elements are defined, which depends on the order of component imports in your app. Importing the v1 table web component before any other component imports ensures that only the v1 table is defined. Example using the latest stable version of ui5wcr: https://stackblitz.com/edit/github-wmf1wn-3zxsvn?file=src%2FApp.tsx,src%2Fmain.tsx
Unfortunately, this is the core issue here. We didn’t account for the fact that tree shaking isn’t enabled for most bundlers in dev mode, which results in all components being imported, including the custom element definitions.
If this missing feature is a blocker for you, please consider opening a feature request in the ui5-webcomponents repo for the v2 table. |
Hi @Lukas742 Sorry, I made some unintentional changes to the stackblitz... I was trying to emphasize that even if we only import the V1 table, it won't work. Now I fixed the sample: https://stackblitz.com/edit/github-wmf1wn-dyxxbv?file=src%2Fmain.tsx After our evaluation, we think that the effort of customizing the TableGroupRow is acceptable. So we decided to migrate to the V2 table and mitigate the changes. For now, we are fine to close this issue. However, there is unfortunately no way to use the V1 table via @ui5/webcomponents-react-compat. I would suggest completely dropping the V1 table support unless a solution is provided from the ui5-webcomponents side. Otherwise, it will mislead the library consumers. cc @JackieWei |
Hi @azhu716 thanks for your feedback! We'll keep the issue open until we decided how to proceed with the problem.
This behavior is fixed by the commit I mentioned above, it's currently broken because the
|
@ilhan007 @vladitasev do you have any updates regarding this topic? |
Describe the bug
A popover with a opener, it shows at wrong position(opener is part of Shellbar), and also the legacy table style in popover broken too
Isolated Example
https://stackblitz.com/edit/github-wmf1wn-qspqvb?file=src%2FApp.tsx
Reproduction steps
...
Expected Behaviour
Popover should show at bottom of avatar
Legacy table in popover should work with correct style
Screenshots or Videos
No response
UI5 Web Components for React Version
~2.3.0
UI5 Web Components Version
~2.3.0
Browser
Chrome
Operating System
Mac OS
Additional Context
No response
Relevant log output
No response
Organization
No response
Declaration
The text was updated successfully, but these errors were encountered: