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

Addon-Test: Implement Global Error Modal #29309

Merged
merged 6 commits into from
Oct 10, 2024

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Oct 9, 2024

Relates #29312

What I did

Implemented the Global Error Modal for the Testing Addon and changed slightly the background css of the Modal component.

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 78.7 MB 78.7 MB 148 B 1.2 0%
initSize 152 MB 152 MB 488 B 0.27 0%
diffSize 73.7 MB 73.7 MB 340 B -0.48 0%
buildSize 7.07 MB 7.07 MB -142 B -1.41 0%
buildSbAddonsSize 1.78 MB 1.78 MB 0 B -1.4 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.85 MB 1.85 MB -71 B -1.41 0%
buildSbPreviewSize 271 kB 271 kB 0 B -1.41 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 4.09 MB 4.09 MB -71 B -1.41 0%
buildPreviewSize 2.98 MB 2.97 MB -71 B 0.35 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 14.9s 20.9s 5.9s 0.81 28.5%
generateTime 20.9s 18.7s -2s -160ms -1.86 🔰-11.5%
initTime 16.2s 13.2s -3s -71ms -2.25 🔰-23.2%
buildTime 9.4s 8.2s -1s -170ms -1.59 🔰-14.2%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 6.8s 7.1s 338ms 0.45 4.7%
devManagerResponsive 4.3s 4.3s -24ms 0.02 -0.5%
devManagerHeaderVisible 575ms 793ms 218ms 2.82 🔺27.5%
devManagerIndexVisible 613ms 828ms 215ms 2.59 🔺26%
devStoryVisibleUncached 737ms 1.2s 472ms 0.02 39%
devStoryVisible 610ms 829ms 219ms 2.65 🔺26.4%
devAutodocsVisible 532ms 784ms 252ms 2.9 🔺32.1%
devMDXVisible 492ms 662ms 170ms 1.82 🔺25.7%
buildManagerHeaderVisible 543ms 555ms 12ms -0.09 2.2%
buildManagerIndexVisible 550ms 562ms 12ms -0.28 2.1%
buildStoryVisible 580ms 625ms 45ms 0.38 7.2%
buildAutodocsVisible 515ms 465ms -50ms -1.12 -10.8%
buildMDXVisible 460ms 508ms 48ms -0.11 9.4%

Greptile Summary

This PR implements a Global Error Modal for the Testing Addon and updates the Modal component's stories and styles. Here are the key changes:

  • Added new GlobalErrorModal component in /code/addons/test/src/components/GlobalErrorModal.tsx
  • Created corresponding stories for GlobalErrorModal in /code/addons/test/src/components/GlobalErrorModal.stories.tsx
  • Updated Modal stories in /code/core/src/components/components/Modal/Modal.stories.tsx with improved visual presentation
  • Modified Modal styling in /code/core/src/components/components/Modal/Modal.styled.tsx for better error handling
  • Added @storybook/theming as a dependency in /code/addons/test/package.json

@valentinpalkovic valentinpalkovic self-assigned this Oct 9, 2024
@valentinpalkovic valentinpalkovic changed the title Valentin/add global error modal Addon-Test: Implement Global Error Modal Oct 9, 2024
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.

6 file(s) reviewed, 6 comment(s)
Edit PR Review Bot Settings

Rerun
</Button>
<Button variant="ghost" asChild>
{/* TODO: Is this the right link? */}
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Remove TODO comment before merging

code/addons/test/src/components/GlobalErrorModal.tsx Outdated Show resolved Hide resolved
Copy link

nx-cloud bot commented Oct 9, 2024

☁️ Nx Cloud Report

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

color: theme.color.defaultText,
}));

const TROUBLESHOOT_LINK = `https://storybook.js.org/docs/vitest/troubleshooting`;
Copy link
Member

Choose a reason for hiding this comment

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

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.

LGTM! Please merge the latest into your branch, there might be a small amount of conflicts

@valentinpalkovic valentinpalkovic force-pushed the valentin/add-global-error-modal branch from feea5cd to 6670087 Compare October 10, 2024 08:05
@valentinpalkovic valentinpalkovic merged commit 1354966 into unified-ui-testing Oct 10, 2024
4 of 6 checks passed
@valentinpalkovic valentinpalkovic deleted the valentin/add-global-error-modal branch October 10, 2024 08:52
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