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

build: expand templating to support #1822 by default #4485

Merged
merged 1 commit into from
May 23, 2024

Conversation

Westbrook
Copy link
Contributor

Description

Split package.stories.ts into args.ts, template.ts and package.stories.ts in order to support automatically forwarding Storybook content into the documentation site when generating new packages.

Related issue(s)

How has this been tested?

  • Test case 1
    1. Take the branch onto your local device
    2. Use yarn new-package to generate a new component
    3. I used inline-alert and inlinealert as my test answers
    4. Manually manage the fact that CSS has allowed canary releases onto its latest channel by updating the version in the generated package JSON for @spectrum-css/inlinealert to ^8.1.0.
    5. Run yarn again.
    6. Run yarn storybook
    7. See that the "new package" is included in storybook
    8. Run yarn docs:start
    9. See that the package listing in the docs includes a demo at the top of the page.

Screenshots (if appropriate)

image

Types of changes

  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

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 a review from a team May 22, 2024 16:23
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:

Comment on lines +9 to +11
// Remove the console.log() when you're ready to consume `props` in the element below.
// eslint-disable-next-line no-console
console.log('template properties', props);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not a big fan of leaving code in a template that should be removed, but I couldn't think of a better way to include props in the Template without running into TS errors otherwise.

Copy link

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 222.474 kB 210.106 kB 🏆 210.49 kB
Scripts 54.65 kB 48.02 kB 🏆 48.281 kB
Stylesheet 34.921 kB 30.288 kB 🏆 30.429 kB
Document 5.894 kB 5.181 kB 5.166 kB 🏆
Font 127.009 kB 126.617 kB 126.614 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

Tachometer results

Chrome

action-bar permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 484 kB 53.39ms - 54.98ms - faster ✔
2% - 7%
0.82ms - 4.05ms
branch 472 kB 55.22ms - 58.03ms slower ❌
1% - 8%
0.82ms - 4.05ms
-

action-menu permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 647 kB 140.28ms - 143.35ms - faster ✔
6% - 9%
8.99ms - 13.39ms
branch 634 kB 151.43ms - 154.58ms slower ❌
6% - 10%
8.99ms - 13.39ms
-

test-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 604 kB 64.12ms - 65.98ms - faster ✔
5% - 9%
3.76ms - 6.28ms
branch 591 kB 69.22ms - 70.92ms slower ❌
6% - 10%
3.76ms - 6.28ms
-

test-lazy permalink

Version Bytes Avg Time vs remote vs branch
npm latest 603 kB 62.61ms - 63.96ms - faster ✔
6% - 9%
3.98ms - 6.01ms
branch 590 kB 67.52ms - 69.04ms slower ❌
6% - 10%
3.98ms - 6.01ms
-

test-open-close-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 789 kB 1877.42ms - 1880.49ms - unsure 🔍
-0% - +0%
-1.44ms - +2.84ms
branch 777 kB 1876.76ms - 1879.74ms unsure 🔍
-0% - +0%
-2.84ms - +1.44ms
-

test-open-close permalink

Version Bytes Avg Time vs remote vs branch
npm latest 788 kB 1862.96ms - 1866.47ms - unsure 🔍
-0% - +0%
-2.85ms - +1.65ms
branch 775 kB 1863.91ms - 1866.72ms unsure 🔍
-0% - +0%
-1.65ms - +2.85ms
-

card permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 502 kB 38.94ms - 39.70ms - faster ✔
1% - 4%
0.35ms - 1.63ms
branch 489 kB 39.79ms - 40.82ms slower ❌
1% - 4%
0.35ms - 1.63ms
-

combobox permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 36.69ms - 37.21ms - faster ✔
5% - 7%
1.83ms - 2.56ms
branch 697 kB 38.89ms - 39.39ms slower ❌
5% - 7%
1.83ms - 2.56ms
-

light-dom-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 404.43ms - 411.43ms - faster ✔
1% - 4%
5.92ms - 15.88ms
branch 697 kB 415.29ms - 422.37ms slower ❌
1% - 4%
5.92ms - 15.88ms
-

illustrated-message permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 404 kB 14.03ms - 14.25ms - faster ✔
0% - 4%
0.05ms - 0.59ms
branch 393 kB 14.21ms - 14.70ms slower ❌
0% - 4%
0.05ms - 0.59ms
-

menu permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 475 kB 214.41ms - 217.62ms - faster ✔
1% - 3%
2.08ms - 6.38ms
branch 463 kB 218.81ms - 221.67ms slower ❌
1% - 3%
2.08ms - 6.38ms
-

overlay permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 675 kB 432.24ms - 438.87ms - faster ✔
0% - 2%
0.57ms - 8.41ms
branch 662 kB 437.95ms - 442.14ms slower ❌
0% - 2%
0.57ms - 8.41ms
-

directive-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 793 kB 22.72ms - 23.29ms - faster ✔
9% - 12%
2.36ms - 3.11ms
branch 780 kB 25.50ms - 25.98ms slower ❌
10% - 14%
2.36ms - 3.11ms
-

element-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 763 kB 354.77ms - 358.02ms - faster ✔
2% - 3%
7.09ms - 11.68ms
branch 750 kB 364.16ms - 367.40ms slower ❌
2% - 3%
7.09ms - 11.68ms
-

lazy-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 561 kB 42.13ms - 43.00ms - faster ✔
5% - 8%
2.43ms - 3.87ms
branch 548 kB 45.14ms - 46.29ms slower ❌
6% - 9%
2.43ms - 3.87ms
-

picker permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 513 kB 549.24ms - 558.85ms - faster ✔
1% - 4%
7.65ms - 20.11ms
branch 500 kB 563.97ms - 571.89ms slower ❌
1% - 4%
7.65ms - 20.11ms
-

popover permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 384 kB 11.95ms - 12.09ms - faster ✔
2% - 4%
0.23ms - 0.46ms
branch 372 kB 12.28ms - 12.46ms slower ❌
2% - 4%
0.23ms - 0.46ms
-

slider permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 480 kB 77.93ms - 79.83ms - faster ✔
2% - 6%
1.74ms - 4.82ms
branch 467 kB 80.95ms - 83.37ms slower ❌
2% - 6%
1.74ms - 4.82ms
-

split-button permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 723 kB 1863.48ms - 1867.66ms - unsure 🔍
-0% - +0%
-2.18ms - +3.78ms
branch 710 kB 1862.64ms - 1866.88ms unsure 🔍
-0% - +0%
-3.78ms - +2.18ms
-

tooltip permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 556 kB 35.11ms - 35.87ms - faster ✔
3% - 6%
1.02ms - 2.08ms
branch 538 kB 36.68ms - 37.41ms slower ❌
3% - 6%
1.02ms - 2.08ms
-

test-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 538 kB 23.96ms - 24.54ms - faster ✔
5% - 9%
1.39ms - 2.28ms
branch 531 kB 25.74ms - 26.41ms slower ❌
6% - 9%
1.39ms - 2.28ms
-

test-element permalink

Version Bytes Avg Time vs remote vs branch
npm latest 656 kB 53.83ms - 54.86ms - faster ✔
3% - 5%
1.68ms - 3.08ms
branch 643 kB 56.25ms - 57.21ms slower ❌
3% - 6%
1.68ms - 3.08ms
-

test-lazy permalink

Version Bytes Avg Time vs remote vs branch
npm latest 632 kB 43.72ms - 44.76ms - faster ✔
6% - 9%
2.87ms - 4.56ms
branch 619 kB 47.28ms - 48.62ms slower ❌
6% - 10%
2.87ms - 4.56ms
-

truncated permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 528 kB 57.97ms - 58.76ms - faster ✔
4% - 6%
2.15ms - 3.43ms
branch 516 kB 60.65ms - 61.66ms slower ❌
4% - 6%
2.15ms - 3.43ms
-
Firefox

action-bar permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 484 kB 116.65ms - 122.19ms - unsure 🔍
-6% - +1%
-7.97ms - +0.77ms
branch 472 kB 119.64ms - 126.40ms unsure 🔍
-1% - +7%
-0.77ms - +7.97ms
-

action-menu permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 647 kB 286.84ms - 289.72ms - faster ✔
12% - 14%
38.84ms - 44.96ms
branch 634 kB 327.48ms - 332.88ms slower ❌
13% - 16%
38.84ms - 44.96ms
-

test-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 604 kB 135.88ms - 142.44ms - unsure 🔍
-1% - +4%
-0.84ms - +5.84ms
branch 591 kB 136.07ms - 137.25ms unsure 🔍
-4% - +1%
-5.84ms - +0.84ms
-

test-lazy permalink

Version Bytes Avg Time vs remote vs branch
npm latest 603 kB 144.71ms - 154.29ms - slower ❌
3% - 11%
4.58ms - 15.26ms
branch 590 kB 137.22ms - 141.94ms faster ✔
3% - 10%
4.58ms - 15.26ms
-

test-open-close-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 789 kB 1895.25ms - 1906.11ms - slower ❌
0% - 1%
0.66ms - 12.14ms
branch 777 kB 1892.41ms - 1896.15ms faster ✔
0% - 1%
0.66ms - 12.14ms
-

test-open-close permalink

Version Bytes Avg Time vs remote vs branch
npm latest 788 kB 1890.28ms - 1895.96ms - unsure 🔍
-0% - +0%
-0.81ms - +6.13ms
branch 775 kB 1888.47ms - 1892.45ms unsure 🔍
-0% - +0%
-6.13ms - +0.81ms
-

card permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 502 kB 72.08ms - 76.44ms - unsure 🔍
-5% - +2%
-3.67ms - +1.43ms
branch 489 kB 74.07ms - 76.69ms unsure 🔍
-2% - +5%
-1.43ms - +3.67ms
-

combobox permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 61.94ms - 64.06ms - unsure 🔍
-3% - +1%
-2.02ms - +0.82ms
branch 697 kB 62.66ms - 64.54ms unsure 🔍
-1% - +3%
-0.82ms - +2.02ms
-

light-dom-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 776.86ms - 796.94ms - slower ❌
4% - 8%
29.43ms - 57.29ms
branch 697 kB 733.89ms - 753.19ms faster ✔
4% - 7%
29.43ms - 57.29ms
-

illustrated-message permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 404 kB 26.34ms - 27.06ms - unsure 🔍
-2% - +1%
-0.62ms - +0.34ms
branch 393 kB 26.53ms - 27.15ms unsure 🔍
-1% - +2%
-0.34ms - +0.62ms
-

menu permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 475 kB 445.98ms - 458.90ms - faster ✔
1% - 5%
2.63ms - 21.85ms
branch 463 kB 457.57ms - 471.79ms slower ❌
1% - 5%
2.63ms - 21.85ms
-

overlay permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 770 kB 716.87ms - 729.29ms - slower ❌
4% - 7%
29.90ms - 48.66ms
branch 757 kB 676.77ms - 690.83ms faster ✔
4% - 7%
29.90ms - 48.66ms
-

directive-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 773 kB 48.00ms - 49.12ms - faster ✔
2% - 5%
0.93ms - 2.27ms
branch 761 kB 49.79ms - 50.53ms slower ❌
2% - 5%
0.93ms - 2.27ms
-

element-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 763 kB 722.54ms - 731.30ms - slower ❌
4% - 7%
29.70ms - 45.06ms
branch 750 kB 683.24ms - 695.84ms faster ✔
4% - 6%
29.70ms - 45.06ms
-

lazy-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 561 kB 91.54ms - 93.66ms - faster ✔
6% - 9%
6.11ms - 9.33ms
branch 548 kB 99.11ms - 101.53ms slower ❌
7% - 10%
6.11ms - 9.33ms
-

picker permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 513 kB 1061.15ms - 1071.45ms - faster ✔
4% - 6%
46.27ms - 69.81ms
branch 500 kB 1113.76ms - 1134.92ms slower ❌
4% - 7%
46.27ms - 69.81ms
-

popover permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 384 kB 29.33ms - 32.39ms - unsure 🔍
-15% - +0%
-4.94ms - +0.26ms
branch 372 kB 31.10ms - 35.30ms unsure 🔍
-1% - +16%
-0.26ms - +4.94ms
-

slider permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 480 kB 165.20ms - 173.00ms - unsure 🔍
-5% - +1%
-8.53ms - +1.81ms
branch 467 kB 169.07ms - 175.85ms unsure 🔍
-1% - +5%
-1.81ms - +8.53ms
-

split-button permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 723 kB 1876.63ms - 1880.13ms - faster ✔
0% - 1%
3.99ms - 9.89ms
branch 710 kB 1882.94ms - 1887.70ms slower ❌
0% - 1%
3.99ms - 9.89ms
-

tooltip permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 656 kB 82.30ms - 86.06ms - slower ❌
7% - 14%
5.64ms - 10.28ms
branch 643 kB 74.86ms - 77.58ms faster ✔
7% - 12%
5.64ms - 10.28ms
-

test-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 533 kB 47.91ms - 50.05ms - faster ✔
1% - 7%
0.48ms - 3.64ms
branch 521 kB 49.87ms - 52.21ms slower ❌
1% - 7%
0.48ms - 3.64ms
-

test-element permalink

Version Bytes Avg Time vs remote vs branch
npm latest 656 kB 138.21ms - 144.11ms - slower ❌
5% - 11%
6.17ms - 14.07ms
branch 643 kB 128.41ms - 133.67ms faster ✔
4% - 10%
6.17ms - 14.07ms
-

test-lazy permalink

Version Bytes Avg Time vs remote vs branch
npm latest 632 kB 93.81ms - 98.03ms - faster ✔
10% - 16%
10.29ms - 17.43ms
branch 619 kB 106.90ms - 112.66ms slower ❌
11% - 18%
10.29ms - 17.43ms
-

truncated permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 528 kB 108.36ms - 114.52ms - unsure 🔍
-8% - -0%
-9.87ms - +0.11ms
branch 516 kB 112.39ms - 120.25ms unsure 🔍
-0% - +9%
-0.11ms - +9.87ms
-

@Westbrook Westbrook merged commit a2f82a7 into main May 23, 2024
58 checks passed
@Westbrook Westbrook deleted the generate-stories branch May 23, 2024 10:29
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