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

WRR-976: ContextualPopupDecorator: Modified to update position when screen orientation change #1722

Open
wants to merge 1 commit into
base: release/2.7.x.develop
Choose a base branch
from

Conversation

mmyelyn
Copy link
Contributor

@mmyelyn mmyelyn commented Oct 11, 2024

Checklist

  • I have read and understand the contribution guide
  • A CHANGELOG entry is included
  • At least one test case is included for this feature or bug fix
  • Documentation was added or is not needed
  • This is an API breaking change

Issue Resolved / Feature Added

When ContextualPopupDecorator or ContextualMenuDecorator is open, rotating the device in the inspector should change the popup's position. Currently the popup is fixed and does not update.

Resolution

I needed to check whether the position had not been updated or the value had been entered incorrectly. When rotated, I saw that when I refreshed, the position was calculated normally again. Therefore, the position calculation was no problem.

The position is updated with the positionContextualPopup function, which is not called when the window size changes, including when the screen is rotated. Therefore, I modified it to use ResizeObserver to detect changes in FloatLayer.
(document.body may or may not have a size depending on the app)

Additional Considerations

Links

WRR-976

Comments

Enact-DCO-1.0-Signed-off-by: Hyelyn Kim ([email protected])

…creen orientation change

Enact-DCO-1.0-Signed-off-by: Hyelyn Kim ([email protected])
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

Attention: Patch coverage is 58.33333% with 5 lines in your changes missing coverage. Please review.

Project coverage is 80.50%. Comparing base (6305cdd) to head (bbc6345).

Files with missing lines Patch % Lines
...ntextualPopupDecorator/ContextualPopupDecorator.js 58.33% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@                    Coverage Diff                    @@
##           release/2.7.x.develop    #1722      +/-   ##
=========================================================
- Coverage                  80.52%   80.50%   -0.03%     
=========================================================
  Files                        142      142              
  Lines                       6497     6509      +12     
  Branches                    1919     1924       +5     
=========================================================
+ Hits                        5232     5240       +8     
- Misses                       963      966       +3     
- Partials                     302      303       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Successfully merging this pull request may close these issues.

1 participant