-
Notifications
You must be signed in to change notification settings - Fork 279
fix(OpenUI5Support): override default [popover] styles #12301
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes styling issues with OpenUI5 popover support by overriding default browser popover styles that were interfering with OpenUI5 popup positioning and appearance.
- Introduces a new CSS file with default popover style overrides
- Adds functionality to insert these styles when patching OpenUI5 popups
- Integrates the style insertion into the existing popup patching workflow
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
packages/base/src/features/patchPopup.ts | Imports and calls the new style insertion function during popup patching |
packages/base/src/features/insertOpenUI5PopupStyles.ts | New utility function to conditionally insert OpenUI5 popup styles |
packages/base/src/css/OpenUI5PopupStyles.css | New CSS file containing popover style overrides (border, overflow, margin) |
[popover] { | ||
border: none; | ||
overflow: visible; | ||
margin: 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This CSS selector uses attribute notation [popover]
which is correct for multi-framework safety, but it's applying styles to all elements with the popover attribute globally. Consider scoping this to OpenUI5-specific contexts to avoid unintended side effects on other popover elements in the application.
Copilot generated this review using guidance from repository custom instructions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Copilot — we may need a more specific selector, either by scoping through the web component or by using OpenUI5 classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adrian-bobev, can you suggest any more specific selector?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can revisit this in the next sync. I’m not fully familiar with the entire problem, but an initial idea is to scope with a more specific selector like [data-sap-ui-popup][popover].
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[data-sap-ui-popup][popover]
sounds good. Code is updated
JIRA: BGSOFUIRODOPI-3523
SNOW: DINC0603221