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

fix(overlay): ensure that passing "open" to the directive manages a single strategy #4474

Merged
merged 1 commit into from
May 23, 2024

Conversation

Westbrook
Copy link
Contributor

Description

Ensure that the Trigger Directive calculates the type of a strategy so that it can be compared over time and not spuriously create a new strategy and subsequently new <sp-overlay> elements.

How has this been tested?

  • Test case 1
    1. Go here
    2. Click the "Create Overlay Render Button And Open Overlay" button
    3. See that the "Toggle Popover" button is appended and that an Overlay is opened.
    4. Close the Overlay
    5. Click "Toggle Popover"
    6. See that the Overlay opens without cycling and without appending multiple Overlay elements to the page.\

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.

@Westbrook Westbrook requested review from spdev3000 and a team May 21, 2024 16:54
Copy link

Branch preview

Visual regression test results

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

Copy link

github-actions bot commented May 21, 2024

Lighthouse scores

Category Latest (report) Main (report) Branch (report)
Performance 0.99 0.99 0.99
Accessibility 1 1 1
Best Practices 1 1 1
SEO 1 0.92 0.92
PWA 1 1 1
What is this?

Lighthouse scores comparing the documentation site built from the PR ("Branch") to that of the production documentation site ("Latest") and the build currently on main ("Main"). Higher scores are better, but note that the SEO scores on Netlify URLs are artifically constrained to 0.92.

Transfer Size

Category Latest Main Branch
Total 221.254 kB 210.126 kB 🏆 210.473 kB
Scripts 53.755 kB 47.96 kB 🏆 48.191 kB
Stylesheet 34.674 kB 30.375 kB 🏆 30.444 kB
Document 5.896 kB 5.187 kB 🏆 5.196 kB
Font 126.929 kB 126.604 kB 🏆 126.642 kB

Request Count

Category Latest Main Branch
Total 45 45 45
Scripts 37 37 37
Stylesheet 5 5 5
Document 1 1 1
Font 2 2 2

Copy link

github-actions bot commented May 21, 2024

Tachometer results

Chrome

action-bar permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 484 kB 49.88ms - 52.02ms - faster ✔
2% - 8%
1.30ms - 4.49ms
branch 472 kB 52.66ms - 55.03ms slower ❌
2% - 9%
1.30ms - 4.49ms
-

action-menu permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 647 kB 130.09ms - 132.88ms - faster ✔
5% - 8%
6.54ms - 10.86ms
branch 634 kB 138.54ms - 141.83ms slower ❌
5% - 8%
6.54ms - 10.86ms
-

test-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 604 kB 60.00ms - 61.19ms - faster ✔
6% - 8%
3.68ms - 5.56ms
branch 591 kB 64.49ms - 65.94ms slower ❌
6% - 9%
3.68ms - 5.56ms
-

test-lazy permalink

Version Bytes Avg Time vs remote vs branch
npm latest 603 kB 58.02ms - 59.11ms - faster ✔
5% - 8%
3.14ms - 4.83ms
branch 590 kB 61.91ms - 63.20ms slower ❌
5% - 8%
3.14ms - 4.83ms
-

test-open-close-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 789 kB 1871.21ms - 1874.30ms - unsure 🔍
-0% - -0%
-4.07ms - -0.01ms
branch 777 kB 1873.47ms - 1876.11ms unsure 🔍
+0% - +0%
+0.01ms - +4.07ms
-

test-open-close permalink

Version Bytes Avg Time vs remote vs branch
npm latest 788 kB 1856.54ms - 1859.98ms - unsure 🔍
-0% - +0%
-2.96ms - +1.77ms
branch 775 kB 1857.23ms - 1860.48ms unsure 🔍
-0% - +0%
-1.77ms - +2.96ms
-

combobox permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 34.81ms - 35.17ms - faster ✔
5% - 6%
1.75ms - 2.35ms
branch 697 kB 36.80ms - 37.28ms slower ❌
5% - 7%
1.75ms - 2.35ms
-

light-dom-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 384.27ms - 391.00ms - faster ✔
1% - 3%
3.31ms - 11.86ms
branch 697 kB 392.59ms - 397.86ms slower ❌
1% - 3%
3.31ms - 11.86ms
-

menu permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 475 kB 204.93ms - 207.41ms - faster ✔
2% - 4%
3.81ms - 7.81ms
branch 463 kB 210.40ms - 213.55ms slower ❌
2% - 4%
3.81ms - 7.81ms
-

overlay permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 675 kB 417.41ms - 420.26ms - faster ✔
1% - 2%
4.64ms - 10.05ms
branch 667 kB 423.87ms - 428.48ms slower ❌
1% - 2%
4.64ms - 10.05ms
-

directive-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 793 kB 21.85ms - 22.34ms - faster ✔
8% - 11%
2.04ms - 2.75ms
branch 772 kB 24.23ms - 24.74ms slower ❌
9% - 13%
2.04ms - 2.75ms
-

element-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 763 kB 344.72ms - 348.20ms - faster ✔
1% - 3%
4.94ms - 9.92ms
branch 750 kB 352.11ms - 355.67ms slower ❌
1% - 3%
4.94ms - 9.92ms
-

lazy-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 561 kB 40.50ms - 41.35ms - faster ✔
6% - 8%
2.41ms - 3.73ms
branch 548 kB 43.49ms - 44.50ms slower ❌
6% - 9%
2.41ms - 3.73ms
-

picker permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 513 kB 516.79ms - 524.39ms - faster ✔
2% - 4%
10.05ms - 21.47ms
branch 500 kB 532.09ms - 540.61ms slower ❌
2% - 4%
10.05ms - 21.47ms
-

popover permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 384 kB 11.26ms - 11.65ms - faster ✔
0% - 4%
0.00ms - 0.42ms
branch 372 kB 11.60ms - 11.74ms unsure 🔍
-0% - +4%
+0.00ms - +0.42ms
-

split-button permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 723 kB 1856.47ms - 1859.92ms - unsure 🔍
-0% - -0%
-5.38ms - -0.03ms
branch 711 kB 1858.86ms - 1862.94ms unsure 🔍
+0% - +0%
+0.03ms - +5.38ms
-

tooltip permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 568 kB 32.89ms - 33.50ms - faster ✔
3% - 7%
1.05ms - 2.30ms
branch 544 kB 34.32ms - 35.42ms slower ❌
3% - 7%
1.05ms - 2.30ms
-

test-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 540 kB 22.63ms - 23.08ms - faster ✔
5% - 8%
1.32ms - 2.05ms
branch 537 kB 24.26ms - 24.82ms slower ❌
6% - 9%
1.32ms - 2.05ms
-

test-element permalink

Version Bytes Avg Time vs remote vs branch
npm latest 656 kB 50.96ms - 52.02ms - faster ✔
3% - 6%
1.79ms - 3.27ms
branch 643 kB 53.51ms - 54.54ms slower ❌
3% - 6%
1.79ms - 3.27ms
-

test-lazy permalink

Version Bytes Avg Time vs remote vs branch
npm latest 632 kB 40.98ms - 41.81ms - faster ✔
7% - 9%
2.89ms - 4.09ms
branch 619 kB 44.46ms - 45.31ms slower ❌
7% - 10%
2.89ms - 4.09ms
-

truncated permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 528 kB 54.05ms - 54.72ms - faster ✔
4% - 6%
2.08ms - 3.28ms
branch 516 kB 56.57ms - 57.56ms slower ❌
4% - 6%
2.08ms - 3.28ms
-
Firefox

action-bar permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 484 kB 113.91ms - 120.65ms - unsure 🔍
-6% - +1%
-7.44ms - +1.04ms
branch 472 kB 117.90ms - 123.06ms unsure 🔍
-1% - +6%
-1.04ms - +7.44ms
-

action-menu permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 647 kB 277.55ms - 280.45ms - faster ✔
12% - 13%
37.10ms - 42.14ms
branch 634 kB 316.56ms - 320.68ms slower ❌
13% - 15%
37.10ms - 42.14ms
-

test-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 604 kB 131.70ms - 134.90ms - unsure 🔍
-1% - +2%
-1.19ms - +2.27ms
branch 591 kB 132.10ms - 133.42ms unsure 🔍
-2% - +1%
-2.27ms - +1.19ms
-

test-lazy permalink

Version Bytes Avg Time vs remote vs branch
npm latest 603 kB 155.19ms - 161.21ms - slower ❌
8% - 15%
12.02ms - 20.74ms
branch 590 kB 138.67ms - 144.97ms faster ✔
8% - 13%
12.02ms - 20.74ms
-

test-open-close-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 789 kB 1910.58ms - 1920.30ms - slower ❌
1% - 2%
21.50ms - 31.98ms
branch 777 kB 1886.73ms - 1890.67ms faster ✔
1% - 2%
21.50ms - 31.98ms
-

test-open-close permalink

Version Bytes Avg Time vs remote vs branch
npm latest 788 kB 1884.77ms - 1891.83ms - unsure 🔍
-0% - +0%
-2.72ms - +6.12ms
branch 775 kB 1883.94ms - 1889.26ms unsure 🔍
-0% - +0%
-6.12ms - +2.72ms
-

combobox permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 60.50ms - 64.50ms - unsure 🔍
-3% - +4%
-2.06ms - +2.38ms
branch 697 kB 61.36ms - 63.32ms unsure 🔍
-4% - +3%
-2.38ms - +2.06ms
-

light-dom-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 732.92ms - 743.68ms - slower ❌
1% - 4%
5.22ms - 30.70ms
branch 697 kB 708.80ms - 731.88ms faster ✔
1% - 4%
5.22ms - 30.70ms
-

menu permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 475 kB 430.22ms - 444.70ms - faster ✔
1% - 5%
3.61ms - 21.95ms
branch 463 kB 444.62ms - 455.86ms slower ❌
1% - 5%
3.61ms - 21.95ms
-

overlay permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 770 kB 629.63ms - 646.21ms - slower ❌
3% - 6%
16.71ms - 33.77ms
branch 757 kB 610.68ms - 614.68ms faster ✔
3% - 5%
16.71ms - 33.77ms
-

directive-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 773 kB 46.29ms - 46.87ms - faster ✔
4% - 7%
2.11ms - 3.41ms
branch 761 kB 48.76ms - 49.92ms slower ❌
5% - 7%
2.11ms - 3.41ms
-

element-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 763 kB 658.56ms - 664.80ms - slower ❌
4% - 6%
25.04ms - 36.16ms
branch 750 kB 626.48ms - 635.68ms faster ✔
4% - 5%
25.04ms - 36.16ms
-

lazy-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 561 kB 101.01ms - 109.19ms - slower ❌
7% - 16%
6.94ms - 15.18ms
branch 548 kB 93.51ms - 94.57ms faster ✔
7% - 14%
6.94ms - 15.18ms
-

picker permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 513 kB 1009.38ms - 1036.06ms - faster ✔
3% - 6%
30.03ms - 58.89ms
branch 500 kB 1061.69ms - 1072.67ms slower ❌
3% - 6%
30.03ms - 58.89ms
-

popover permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 384 kB 29.71ms - 33.69ms - unsure 🔍
-9% - +9%
-2.92ms - +2.76ms
branch 372 kB 29.76ms - 33.80ms unsure 🔍
-9% - +9%
-2.76ms - +2.92ms
-

split-button permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 723 kB 1876.12ms - 1880.60ms - unsure 🔍
-0% - +0%
-3.84ms - +2.68ms
branch 711 kB 1876.57ms - 1881.31ms unsure 🔍
-0% - +0%
-2.68ms - +3.84ms
-

tooltip permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 656 kB 80.97ms - 84.59ms - slower ❌
11% - 16%
8.14ms - 11.90ms
branch 643 kB 72.26ms - 73.26ms faster ✔
10% - 14%
8.14ms - 11.90ms
-

test-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 533 kB 47.04ms - 49.00ms - faster ✔
19% - 28%
11.55ms - 18.09ms
branch 521 kB 59.72ms - 65.96ms slower ❌
24% - 38%
11.55ms - 18.09ms
-

test-element permalink

Version Bytes Avg Time vs remote vs branch
npm latest 656 kB 118.31ms - 126.01ms - unsure 🔍
-6% - +1%
-7.94ms - +1.26ms
branch 643 kB 122.99ms - 128.01ms unsure 🔍
-1% - +7%
-1.26ms - +7.94ms
-

test-lazy permalink

Version Bytes Avg Time vs remote vs branch
npm latest 632 kB 94.22ms - 100.18ms - faster ✔
2% - 9%
1.89ms - 9.27ms
branch 619 kB 100.61ms - 104.95ms slower ❌
2% - 10%
1.89ms - 9.27ms
-

truncated permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 528 kB 102.00ms - 109.16ms - unsure 🔍
-7% - +2%
-7.91ms - +2.15ms
branch 516 kB 104.93ms - 111.99ms unsure 🔍
-2% - +8%
-2.15ms - +7.91ms
-

@Westbrook Westbrook force-pushed the managed-overlay-directive branch from 900c2b2 to 39d6b15 Compare May 22, 2024 11:36
Copy link
Collaborator

@spdev3000 spdev3000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Westbrook Westbrook force-pushed the managed-overlay-directive branch from 39d6b15 to fe58350 Compare May 23, 2024 17:36
@Westbrook Westbrook merged commit 15d6ac7 into main May 23, 2024
59 checks passed
@Westbrook Westbrook deleted the managed-overlay-directive branch May 23, 2024 18:37
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.

2 participants