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

Cleanup: Remove unused constants in viewport addon #30479

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

Guria
Copy link
Contributor

@Guria Guria commented Feb 6, 2025

What I did

Removed unused constants

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

Not applicable

Manual testing

Check that no existing build and test scripts are failing.

Documentation

Not applicable

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 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.5 MB 80.5 MB 0 B 0.45 0%
initSize 80.5 MB 80.5 MB 0 B 0.45 0%
diffSize 97 B 97 B 0 B - 0%
buildSize 7.31 MB 7.31 MB 225 B 2.58 0%
buildSbAddonsSize 1.9 MB 1.9 MB 225 B 2.54 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.88 MB 1.88 MB 0 B -0.47 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.97 MB 3.97 MB 225 B 2.48 0%
buildPreviewSize 3.34 MB 3.34 MB 0 B 2.29 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 7.2s 8.8s 1.6s -0.84 18.2%
generateTime 18.6s 20.7s 2s 1.32 🔺10.1%
initTime 4.3s 5s 657ms 1.06 13.1%
buildTime 8.7s 10.1s 1.4s 1 14%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 5.5s 6s 542ms 0.66 8.9%
devManagerResponsive 3.9s 4.4s 562ms 0.62 12.5%
devManagerHeaderVisible 701ms 932ms 231ms 0.94 24.8%
devManagerIndexVisible 708ms 947ms 239ms 0.79 25.2%
devStoryVisibleUncached 4.8s 3.7s -1s -115ms 0.17 -29.6%
devStoryVisible 792ms 1s 230ms 0.99 22.5%
devAutodocsVisible 719ms 813ms 94ms 0.45 11.6%
devMDXVisible 783ms 910ms 127ms 1.27 🔺14%
buildManagerHeaderVisible 826ms 829ms 3ms -0.23 0.4%
buildManagerIndexVisible 931ms 841ms -90ms -0.41 -10.7%
buildStoryVisible 812ms 768ms -44ms -0.24 -5.7%
buildAutodocsVisible 597ms 683ms 86ms -0.23 12.6%
buildMDXVisible 860ms 706ms -154ms 0.31 -21.8%

Greptile Summary

Removed unused constants from the viewport addon's constants.ts file while preserving essential identifiers used throughout the codebase.

  • Safely removed UPDATE, CONFIGURE, SET, and CHANGED constants from code/addons/viewport/src/constants.ts as they were not referenced in any addon files
  • Retained ADDON_ID and PARAM_KEY constants which are actively used for addon identification and parameter access

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

Sorry, something went wrong.

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

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

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

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

Copy link

nx-cloud bot commented Feb 6, 2025

View your CI Pipeline Execution ↗ for commit 38f3bc6.

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

☁️ Nx Cloud last updated this comment at 2025-02-12 15:13:08 UTC

@storybook-pr-benchmarking
Copy link

storybook-pr-benchmarking bot commented Feb 10, 2025

Package Benchmarks

Commit: 38f3bc6, ran on 12 February 2025 at 15:12:40 UTC

No significant changes detected, all good. 👏

@valentinpalkovic valentinpalkovic changed the title remove unused constants in viewport addon Cleanup: Remove unused constants in viewport addon Feb 12, 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

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

@valentinpalkovic valentinpalkovic merged commit e9f1e19 into storybookjs:next Feb 12, 2025
50 of 55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: viewport ci:normal maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants