-
Notifications
You must be signed in to change notification settings - Fork 34
fix(#2003): popover remove relative prop #2358
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
fix(#2003): popover remove relative prop #2358
Conversation
2205da4 to
961eb31
Compare
|
This PR needs to be rebased with alpha after #2344 is merged in, and then needs to be re-tested |
961eb31 to
1e25ca8
Compare
1e25ca8 to
8b24789
Compare
8b24789 to
d9ad6ad
Compare
|
@vanessatran-ddi When testing this, can you also verify that everything works on a page, as well as within a modal? |
@ArakTaiRoth Yes I will do |
d1aafad to
6d0e4a0
Compare
6d0e4a0 to
07bf4d8
Compare
07bf4d8 to
a6b776e
Compare
|
Issue #2466 is fixed on this PR. Has been tested with:
Issue #2003 is fixed. I tested with:
@BumbleB2na I recommended you to add jsdocs with
(Instead of add a comment next to it)
So the IDE can help developers to understand that the property can still be used but should be removed. |
libs/angular-components/src/lib/components/date-picker/date-picker.ts
Outdated
Show resolved
Hide resolved
libs/angular-components/src/lib/components/dropdown/dropdown.ts
Outdated
Show resolved
Hide resolved
|
@BumbleB2na There's a problem using the Dropdown in the AppHeaderMenu component, it appears that the width isn't being calculated properly |
6ec5938 to
2f234f1
Compare
Was not able to reproduce width problem but, this aided in the discovery that AppHeader and AppHeaderMenu depended on popover not having |
2f234f1 to
bb3e555
Compare
|
Tested and looks good now |
chrisolsen
left a comment
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.
See my most recent comment
Yes when the dropdown expands down at bottom of modal it increases the modal contents height. Your screenshot doesn't show the entire modal but, with this fix that makes popover part of the same z-index layering as modal, it's normal to have to scroll down: I've created a new follow up issue, that depends on this PR, to take care of the issue you're seeing: #2655
Please provide a code example because, I could not reproduce the same problem: |
|
|
🎉 This PR is included in version 4.2.2-alpha.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.2.2-alpha.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.33.0-alpha.8 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 6.2.2-alpha.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 4.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.33.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 6.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |











Also see related ui-components-docs PR: GovAlta/ui-components-docs#305
Before (the change)
Popover had prop: "relative" that when enabled would add style, "position: relative;" to the popover container to help with positioning flow. Dropdown and DatePicker had "relative" prop that would be passed down to child popover component. Code was adjusted to always set style, "position: relative;" and to calculate the position of popover when displaying upwards.
After (the change)
Popover always has "position: relative" (related to #2003):
2025-01-20-popover-position-relative.mp4
Popover positioning is still okay when scrolling within a modal (related to #2466):
2025-03-12-popover-in-scrollable-modal-fix.mp4
Note: a popover cannot appear over top of modal because of z-index layer hierarchy
<goa-dropdown filterable="true">) cannot have its contents "drop down" outside of modal like a native Dropdown can, because native html select is not affected by z-index layering and will always show over top<goa-dropdown relative="true">)Make sure that you've checked the boxes below before you submit the PR
Steps needed to test
Try dropdown and datepicker, some with a wrapper that has "position: relative" and some inside a modal -- try resizing the viewport to see how it calculates space below to determine if it dropdown or datepicker should expand upwards -- and try this in the different playgrounds: