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

Toolbars: Suppress deprecation warning when using dynamic icons #29545

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

ValeraS
Copy link
Contributor

@ValeraS ValeraS commented Nov 5, 2024

Closes #25760

What I did

Removed deprecation warnings
image

Checklist for Contributors

Testing

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

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

  1. Run a sandbox yarn start
  2. Open Storybook in your browser
  3. Open Theme menu
  4. There are no warnings in the console

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

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 78.4 MB 78.4 MB 0 B 2.04 0%
initSize 144 MB 144 MB 32 B -0.17 0%
diffSize 65.1 MB 65.1 MB 32 B -0.3 0%
buildSize 6.83 MB 6.83 MB 32 B -0.41 0%
buildSbAddonsSize 1.51 MB 1.51 MB 32 B -3.66 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.86 MB 1.86 MB 0 B -0.4 0%
buildSbPreviewSize 271 kB 271 kB 0 B -4.36 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.83 MB 3.83 MB 32 B -0.41 0%
buildPreviewSize 3 MB 3 MB 0 B 0.57 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 18.5s 26.4s 7.9s 1.49 🔺29.9%
generateTime 21.4s 20.2s -1s -170ms -0.16 -5.8%
initTime 15.6s 18.8s 3.1s 2.9 🔺16.6%
buildTime 8.4s 8.6s 258ms -0.16 3%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 5.5s 6s 433ms 0.31 7.2%
devManagerResponsive 3.3s 3.6s 265ms 0.07 7.3%
devManagerHeaderVisible 608ms 587ms -21ms 0.09 -3.6%
devManagerIndexVisible 632ms 651ms 19ms -0.05 2.9%
devStoryVisibleUncached 856ms 1.1s 256ms 0.4 23%
devStoryVisible 631ms 621ms -10ms -0.23 -1.6%
devAutodocsVisible 442ms 593ms 151ms 1.48 🔺25.5%
devMDXVisible 501ms 596ms 95ms 0.47 15.9%
buildManagerHeaderVisible 598ms 615ms 17ms 0.55 2.8%
buildManagerIndexVisible 609ms 629ms 20ms 0.47 3.2%
buildStoryVisible 592ms 617ms 25ms 0.53 4.1%
buildAutodocsVisible 464ms 484ms 20ms 0.01 4.1%
buildMDXVisible 472ms 456ms -16ms -0.26 -3.5%

Greptile Summary

Adds __suppressDeprecationWarning prop to Icons component in the toolbar addon to temporarily silence console warnings about deprecated icon usage.

  • Modified code/addons/toolbars/src/components/ToolbarMenuListItem.tsx to add __suppressDeprecationWarning={true} to Icons component
  • Addresses issue [Bug]: deprecation warnings when older icons are being used #25760 where toolbar icons were generating deprecation warnings in console
  • Provides temporary fix while migration to new icon system is pending

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 Nov 11, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit f0720db. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

Copy link
Member

@yannbf yannbf left a comment

Choose a reason for hiding this comment

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

Thank you so much for your contribution!

@yannbf yannbf changed the title fix(addon-toolbars): suppress deprecation warning Toolbars: Suppress deprecation warning when using dynamic icons Nov 27, 2024
@yannbf yannbf merged commit f80d23a into storybookjs:next Nov 27, 2024
53 of 55 checks passed
@ValeraS ValeraS deleted the fix/addon-toolbars branch November 27, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug]: deprecation warnings when older icons are being used
3 participants