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

Tags: Add story/meta usage telemetry #30555

Merged
merged 1 commit into from
Feb 17, 2025
Merged

Conversation

shilman
Copy link
Member

@shilman shilman commented Feb 17, 2025

Closes N/A

What I did

Count the number of stories/meta that use tags. Does not include the implicit dev/test tags or tags that are added in preview.js.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 80.6 MB 80.6 MB 32 B 1.39 0%
initSize 80.6 MB 80.6 MB 32 B 1.39 0%
diffSize 97 B 97 B 0 B - 0%
buildSize 7.31 MB 7.31 MB 0 B 0.51 0%
buildSbAddonsSize 1.9 MB 1.9 MB 0 B 0.45 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.88 MB 1.88 MB 0 B 0.53 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.97 MB 3.97 MB 0 B 0.45 0%
buildPreviewSize 3.34 MB 3.34 MB 0 B 0.54 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 8.1s 19.2s 11.1s 0.07 57.9%
generateTime 19.7s 18s -1s -656ms -1.48 🔰-9.2%
initTime 4.7s 4.3s -480ms -1.19 -11.2%
buildTime 9.9s 9.2s -620ms -0.01 -6.7%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 5.3s 5.7s 420ms 0.18 7.3%
devManagerResponsive 3.9s 4.2s 291ms -0.06 6.9%
devManagerHeaderVisible 985ms 845ms -140ms 0.2 -16.6%
devManagerIndexVisible 997ms 915ms -82ms 0.47 -9%
devStoryVisibleUncached 4.4s 4.2s -196ms 0.96 -4.6%
devStoryVisible 1s 939ms -125ms 0.29 -13.3%
devAutodocsVisible 841ms 894ms 53ms 1.11 5.9%
devMDXVisible 899ms 806ms -93ms 0.25 -11.5%
buildManagerHeaderVisible 795ms 779ms -16ms -0.35 -2.1%
buildManagerIndexVisible 870ms 784ms -86ms -0.57 -11%
buildStoryVisible 772ms 765ms -7ms -0.24 -0.9%
buildAutodocsVisible 662ms 639ms -23ms -0.33 -3.6%
buildMDXVisible 750ms 625ms -125ms -0.12 -20%

Greptile Summary

Added telemetry tracking for tags usage in Storybook stories by implementing tag counting across story and meta annotations.

  • Added tags boolean property to IndexInputStats interface in code/core/src/types/modules/indexer.ts
  • Added tags to tracked annotations in code/core/src/csf-tools/CsfFile.ts for story stats
  • Added test coverage in StoryIndexGenerator.test.ts for tags counting across different scenarios
  • Added test cases in CsfFile.test.ts for tag handling in CSF2/CSF3 formats

The changes are minimal and focused on adding telemetry capabilities without modifying existing functionality. The implementation appears thorough with good test coverage for various tag usage scenarios.

@shilman shilman added maintenance User-facing maintenance tasks telemetry tags ci:normal labels Feb 17, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

LGTM

4 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link

nx-cloud bot commented Feb 17, 2025

View your CI Pipeline Execution ↗ for commit 77dc3c3.

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 1m 58s View ↗

☁️ Nx Cloud last updated this comment at 2025-02-17 07:40:24 UTC

@shilman shilman changed the title Core: Add tags usage telemetry Tags: Add story/meta usage telemetry Feb 17, 2025
@shilman shilman merged commit e8009f3 into next Feb 17, 2025
58 of 62 checks passed
@shilman shilman deleted the shilman/add-tags-telemetry branch February 17, 2025 07:56
@github-actions github-actions bot mentioned this pull request Feb 17, 2025
9 tasks
@shilman shilman added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Feb 18, 2025
@github-actions github-actions bot mentioned this pull request Feb 18, 2025
9 tasks
shilman added a commit that referenced this pull request Feb 18, 2025
Tags: Add story/meta usage telemetry
(cherry picked from commit e8009f3)
@github-actions github-actions bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:normal maintenance User-facing maintenance tasks patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch tags telemetry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant