fix: Position drag UAPs correctly on same-origin iframes sharing a React tree
Description
Crazy what you can do with an iframe these days. Rather than trying to do anything complex with calculating parent iframes and offsets, I just decided to put the portal in the closest iframe so all the rest of the assumptions work out.
Related links, issue #, if available: AWSUI-60742
How has this been tested?
Screenshot tests are probably the best way to handle this. Since the feature has already made it through, I'll add the screenshot tests first, and then merge this.
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
- Changes include appropriate documentation updates.
- Changes are backward-compatible if not indicated, see
CONTRIBUTING.md. - Changes do not include unsupported browser features, see
CONTRIBUTING.md. - Changes were manually tested for accessibility, see accessibility guidelines.
Security
- If the code handles URLs: all URLs are validated through the
checkSafeUrlfunction.
Testing
- Changes are covered with new/existing unit tests?
- Changes are covered with new/existing integration tests?
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 96.56%. Comparing base (
6a94647) to head (b90ee8b). Report is 1 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #3502 +/- ##
========================================
Coverage 96.55% 96.56%
========================================
Files 807 807
Lines 23456 23461 +5
Branches 8182 7758 -424
========================================
+ Hits 22648 22654 +6
- Misses 754 800 +46
+ Partials 54 7 -47
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.