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

Overlay fallbacks #2300

Merged
merged 2 commits into from
May 25, 2022
Merged

Overlay fallbacks #2300

merged 2 commits into from
May 25, 2022

Conversation

Westbrook
Copy link
Contributor

Description

Allow content opened from a "virtual trigger" to "flip" on both axises when looking for a place to position itself.

  • don't use auto because it's not predictable enough for closely related content like Pickers
  • update size usage to always fallback to the initial size when measuring
  • moves the Picker Menu location to above the Picker button in some Large VRTs due to their not being enough space below the picker for the content

Related issue(s)

How has this been tested?

  • Test case 1
    1. Go here
    2. Squeeze the preview window down to 400px wide or so
    3. Try opening the "context menu" from various places on the screen.
    • top left
    • top right
    • bottom left
    • bottom right
    1. See they the "context menu" opens in a related position that DOES NOT flow outside of the viewport.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • If my change required a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices

@github-actions
Copy link

github-actions bot commented May 18, 2022

Tachometer results

Chrome

action-bar permalink

Version Bytes Avg Time vs remote vs branch
npm latest 434 kB 53.44ms - 55.52ms - unsure 🔍
-3% - +2%
-1.44ms - +1.27ms
branch 443 kB 53.70ms - 55.43ms unsure 🔍
-2% - +3%
-1.27ms - +1.44ms
-

action-menu permalink

Version Bytes Avg Time vs remote vs branch
npm latest 929 kB 512.45ms - 535.56ms - unsure 🔍
-3% - +3%
-18.37ms - +14.19ms
branch 940 kB 514.63ms - 537.57ms unsure 🔍
-3% - +4%
-14.19ms - +18.37ms
-

menu permalink

Version Bytes Avg Time vs remote vs branch
npm latest 532 kB 570.43ms - 591.40ms - unsure 🔍
-3% - +2%
-17.52ms - +13.37ms
branch 541 kB 571.65ms - 594.33ms unsure 🔍
-2% - +3%
-13.37ms - +17.52ms
-

overlay permalink

Version Bytes Avg Time vs remote vs branch
npm latest 558 kB 128.31ms - 132.99ms - unsure 🔍
-1% - +4%
-1.32ms - +4.96ms
branch 568 kB 126.74ms - 130.92ms unsure 🔍
-4% - +1%
-4.96ms - +1.32ms
-

picker permalink

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 2663.56ms - 2736.84ms - unsure 🔍
-1% - +4%
-12.71ms - +106.44ms
branch 720 kB 2606.36ms - 2700.32ms unsure 🔍
-4% - +0%
-106.44ms - +12.71ms
-

popover permalink

Version Bytes Avg Time vs remote vs branch
npm latest 428 kB 55.26ms - 57.34ms - unsure 🔍
-4% - +2%
-2.23ms - +1.12ms
branch 438 kB 55.54ms - 58.17ms unsure 🔍
-2% - +4%
-1.12ms - +2.23ms
-

split-button permalink

Version Bytes Avg Time vs remote vs branch
npm latest 815 kB 2134.08ms - 2141.78ms - unsure 🔍
-0% - +0%
-4.60ms - +7.88ms
branch 825 kB 2131.37ms - 2141.19ms unsure 🔍
-0% - +0%
-7.88ms - +4.60ms
-

tooltip permalink

Version Bytes Avg Time vs remote vs branch
npm latest 436 kB 60.65ms - 63.87ms - unsure 🔍
-4% - +3%
-2.72ms - +1.63ms
branch 445 kB 61.34ms - 64.26ms unsure 🔍
-3% - +4%
-1.63ms - +2.72ms
-
Firefox

action-bar permalink

Version Bytes Avg Time vs remote vs branch
npm latest 434 kB 127.55ms - 141.65ms - unsure 🔍
-5% - +9%
-6.80ms - +12.24ms
branch 443 kB 125.48ms - 138.28ms unsure 🔍
-9% - +5%
-12.24ms - +6.80ms
-

action-menu permalink

Version Bytes Avg Time vs remote vs branch
npm latest 929 kB 465.65ms - 481.55ms - faster ✔
0% - 5%
0.91ms - 25.01ms
branch 940 kB 477.50ms - 495.62ms slower ❌
0% - 5%
0.91ms - 25.01ms
-

menu permalink

Version Bytes Avg Time vs remote vs branch
npm latest 532 kB 587.73ms - 601.87ms - unsure 🔍
-0% - +3%
-1.86ms - +19.58ms
branch 541 kB 577.87ms - 594.01ms unsure 🔍
-3% - +0%
-19.58ms - +1.86ms
-

overlay permalink

Version Bytes Avg Time vs remote vs branch
npm latest 558 kB 204.87ms - 213.45ms - unsure 🔍
-3% - +2%
-6.25ms - +5.13ms
branch 568 kB 205.99ms - 213.45ms unsure 🔍
-2% - +3%
-5.13ms - +6.25ms
-

picker permalink

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 1257.40ms - 1280.36ms - unsure 🔍
-1% - +1%
-16.59ms - +15.39ms
branch 720 kB 1258.35ms - 1280.61ms unsure 🔍
-1% - +1%
-15.39ms - +16.59ms
-

popover permalink

Version Bytes Avg Time vs remote vs branch
npm latest 428 kB 100.97ms - 113.99ms - unsure 🔍
-8% - +11%
-8.34ms - +11.62ms
branch 438 kB 98.28ms - 113.40ms unsure 🔍
-11% - +8%
-11.62ms - +8.34ms
-

split-button permalink

Version Bytes Avg Time vs remote vs branch
npm latest 815 kB 2098.84ms - 2112.96ms - unsure 🔍
-0% - +0%
-10.06ms - +9.30ms
branch 825 kB 2099.66ms - 2112.90ms unsure 🔍
-0% - +0%
-9.30ms - +10.06ms
-

tooltip permalink

Version Bytes Avg Time vs remote vs branch
npm latest 436 kB 93.41ms - 100.99ms - unsure 🔍
-11% - +1%
-11.36ms - +1.48ms
branch 445 kB 96.96ms - 107.32ms unsure 🔍
-2% - +12%
-1.48ms - +11.36ms
-

@Westbrook Westbrook force-pushed the overlay-fallbacks branch from 58cc73d to e0f7762 Compare May 25, 2022 00:21
hunterloftis
hunterloftis previously approved these changes May 25, 2022
packages/overlay/src/ActiveOverlay.ts Outdated Show resolved Hide resolved
packages/overlay/src/ActiveOverlay.ts Outdated Show resolved Hide resolved
@Westbrook Westbrook merged commit 9d07e38 into main May 25, 2022
@Westbrook Westbrook deleted the overlay-fallbacks branch May 25, 2022 22:36
@spdev3000
Copy link
Collaborator

Thx @Westbrook for that quick solution!

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.

[Bug]: VirtualTrigger: Overlay get cut off screen with placement "right-start"
3 participants