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

Core: Open 'Component tests' addon panel when clicking a story status #29456

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

ghengeveld
Copy link
Member

@ghengeveld ghengeveld commented Oct 27, 2024

What I did

Opens the Component tests addon panel when clicking a "Component tests" story status.

Screenshot 2024-10-27 at 14 04 28

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

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

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/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 77.6 MB 77.6 MB 0 B -0.9 0%
initSize 146 MB 146 MB 0 B -0.89 0%
diffSize 68.5 MB 68.5 MB 0 B 0.94 0%
buildSize 6.82 MB 6.82 MB 0 B -0.55 0%
buildSbAddonsSize 1.5 MB 1.5 MB 0 B -0.65 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.85 MB 1.85 MB 0 B 0.89 0%
buildSbPreviewSize 271 kB 271 kB 0 B 0.9 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.82 MB 3.82 MB 0 B -0.56 0%
buildPreviewSize 3 MB 3 MB 0 B 0.66 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 19.9s 8.5s -11s -373ms -0.67 -133.1%
generateTime 21.8s 27.2s 5.3s 3.19 🔺19.6%
initTime 14.2s 16.2s 2s 1.07 12.5%
buildTime 10.2s 12s 1.8s 2.62 🔺15%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 6.6s 6.9s 246ms 0.4 3.5%
devManagerResponsive 4.5s 4.6s 103ms 0.41 2.2%
devManagerHeaderVisible 524ms 585ms 61ms 0.14 10.4%
devManagerIndexVisible 588ms 654ms 66ms 0.32 10.1%
devStoryVisibleUncached 1s 1.1s 143ms 0.58 12%
devStoryVisible 553ms 618ms 65ms 0.13 10.5%
devAutodocsVisible 486ms 503ms 17ms -0.33 3.4%
devMDXVisible 496ms 543ms 47ms 0.31 8.7%
buildManagerHeaderVisible 526ms 570ms 44ms 0.09 7.7%
buildManagerIndexVisible 533ms 581ms 48ms 0 8.3%
buildStoryVisible 522ms 569ms 47ms -0.18 8.3%
buildAutodocsVisible 437ms 467ms 30ms -0.39 6.4%
buildMDXVisible 437ms 463ms 26ms -0.3 5.6%

Greptile Summary

Adds functionality to open the Component tests addon panel when clicking on a story status in Storybook, improving navigation and user experience.

  • Added click handler in code/addons/test/src/manager.tsx to open Component tests panel when status is clicked
  • Implemented openAddonPanel function to manage panel visibility and selection state
  • Connected status object click behavior to panel management through addon API

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.

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

Comment on lines +83 to +86
const openAddonPanel = () => {
api.setSelectedPanel(PANEL_ID);
api.togglePanel(true);
};
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Consider adding error handling in case api.setSelectedPanel or api.togglePanel fail

Copy link

nx-cloud bot commented Oct 27, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit fd3abe5. 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.

@valentinpalkovic valentinpalkovic merged commit 0cf4576 into next Oct 28, 2024
59 checks passed
@valentinpalkovic valentinpalkovic deleted the open-component-tests-panel-on-status-click branch October 28, 2024 09:35
@github-actions github-actions bot mentioned this pull request Oct 28, 2024
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants