-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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: Testing Module UI #29236
Core: Testing Module UI #29236
Conversation
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 0c11df3. 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 targetSent with 💌 from NxCloud. |
f254412
to
cf84213
Compare
cf84213
to
11042e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
29 file(s) reviewed, 9 comment(s)
Edit PR Review Bot Settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome stuff!!
Here's some testing feedback we should fix before merging (if applicable, else we should create separate tickets for them):
Watch mode state is not shown upon click
As you can see, the button won't change into an active/inactive state. Although watch mode toggling works, it doesn't feel like it in the UI
Expected behavior: The eye
icon should be switched to active/inactive state upon state change.
Loading state is not shown on test run
Although there is a story for the loading state with a spinner and where the icon shows a square, clicking on the run button doesn't trigger that
Expected behavior: The spinner should shown upon test runs, as well as the stop icon.
Run all tests does not run tests
It does spawn vitest, but no tests are run
Expected behavior: All tests should be triggered, as well as the loading state of the components should be toggled.
Error/warning filter colors are not applied
Expected behavior: Colors should be applied correctly
That's because there are other colors overwriting the ones defined in the component, this happens as you set the Button to have a ghost
variant in this line of code:
The testing module is available on Mobile
Although it looks relatively good (though the shadow seems excessive on dark mode), I thought the testing module should not appear at all on mobile?
Expected behavior: Testing module should not be rendered on mobile (unless decided otherwise)
It also clashes with the notification element:
Notifications look off on mobile (dark mode)
Because the notifications appear on any view on mobile, when in dark mode they have a weird shadow that only makes sense if they're rendered on the sidebar:
Watch mode state is not shown upon click Loading state is not shown on test run Run all tests does not run tests Error/warning filter colors are not applied The testing module is available on Mobile Notifications look off on mobile (dark mode) |
Closes #29096
What I did
This implements the UI for the Testing Module. It sits docked in the sidebar, floating at the bottom. Notifications were updated to sit in the sidebar as well, just above the Testing Module. The sidebar has a
div#sidebar-bottom
element with some CSS variables attached to allow integrators such as Chromatic to add custom elements here, whilst retaining a consistent UI.Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal
,ci:merged
orci:daily
GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/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>
Greptile Summary
This PR implements the UI for the Testing Module in Storybook, focusing on creating a floating container at the bottom of the sidebar with test provider information and controls.
code/core/src/manager/components/sidebar/TestingModule.tsx
code/addons/test/src/manager.tsx