-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Core: Define checklist tasks #32799
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
Merged
Merged
Core: Define checklist tasks #32799
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
1eea810
Update checklist according to latest proposal
ghengeveld 8e471bf
Update checklistData according to latest concept
ghengeveld c0eb34b
Handle narrow width for ChecklistModule by introducing an Optional co…
ghengeveld 94c5c62
Update checklist criteria and checks
ghengeveld 5f1bd57
Persist autocompleted items in node_modules/.cache and add telemetry
ghengeveld 5ba33eb
Support conditional guide items
ghengeveld 9d28bb0
Use simpler navigation API
ghengeveld cd97967
Add guided tour and intent survey to checklist
ghengeveld 10917ad
Show completion message instead of mute toggle when all tasks are com…
ghengeveld 589f1f0
Prevent onboarding from returning to splash screen
ghengeveld 624bfc6
Fix build command
ghengeveld 5845f57
Prevent guided tour from showing intent survey if it has already been…
ghengeveld 1411869
Ensure subscription callback is a function
ghengeveld 70914fe
Revert back to using ReactDOM.render
ghengeveld af5996a
Completion detection for install-vitest and run-tests tasks
ghengeveld 571eb37
Don't skip checklist tasks when closing tour tooltip
ghengeveld da9c7b8
Better looking code blocks
ghengeveld 8a27b33
Fix mocks
ghengeveld 2adfb83
Add items for installing dependencies
ghengeveld 870ab94
Use createRoot rather than deprecated ReactDOM.render
ghengeveld d6e6f09
Fix testing widget overflow to allow highlighting for onboarding
ghengeveld 85b9fa1
Reduce update frequency by throttling index updates
ghengeveld 8c5c660
Pass index to available function to receive updates, and don't pass i…
ghengeveld 02917c4
Make content a function
ghengeveld 073778c
Ignore example stories where appropriate
ghengeveld bc7ac39
Prevent clicking on underlying collapse toggle when using checklist r…
ghengeveld 9aef937
Fix addon identifier
ghengeveld e311a22
Rename Tour to TourGuide and make it a generic component
ghengeveld 1f79889
Make renderTourGuide a static method on the TourGuide component
ghengeveld 1c8bb66
Fix GuidePage sidebar toggle
ghengeveld 056a80f
Refactor onboarding components: consolidate HighlightElement and Tour…
ghengeveld f0dfab7
Refactor useChecklist to provide all data needed in Checklist component
ghengeveld d9df904
Animate the completion of a checklist item in the widget
ghengeveld 2fd404c
Animate strikethrough
ghengeveld bb87ae0
Hide certain checklist items once completed, and update API for items…
ghengeveld 7591d75
Reset itemIndex to only include ready items, in order to fix round-ro…
ghengeveld 88afdc1
Hide action buttons in checklist module unless hovering the item
ghengeveld 64c5d96
Update FocusProxy to use a data attribute rather than id attribute
ghengeveld 760764f
Merge branch 'onboarding-guide' into checklist-tasks
ghengeveld bc804e3
Merge branch 'onboarding-checklist' into checklist-tasks
ghengeveld aad4c79
Remove storybook/internal/manager/manager-stores
ghengeveld File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| import type { Meta, StoryObj } from '@storybook/react-vite'; | ||
|
|
||
| import { fn } from 'storybook/test'; | ||
|
|
||
| import { Button } from './Button'; | ||
|
|
||
| // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export | ||
| const meta = { | ||
| title: 'Example/Button', | ||
| component: Button, | ||
| parameters: { | ||
| // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout | ||
| layout: 'centered', | ||
| }, | ||
| // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs | ||
| tags: ['autodocs'], | ||
| // More on argTypes: https://storybook.js.org/docs/api/argtypes | ||
| argTypes: { | ||
| backgroundColor: { control: 'color' }, | ||
| }, | ||
| // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#story-args | ||
| args: { onClick: fn() }, | ||
| } satisfies Meta<typeof Button>; | ||
|
|
||
| export default meta; | ||
| type Story = StoryObj<typeof meta>; | ||
|
|
||
| // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args | ||
| export const Primary: Story = { | ||
| args: { | ||
| primary: true, | ||
| label: 'Button', | ||
| }, | ||
| }; | ||
|
|
||
| export const Secondary: Story = { | ||
| args: { | ||
| label: 'Button', | ||
| }, | ||
| }; | ||
|
|
||
| export const Large: Story = { | ||
| args: { | ||
| size: 'large', | ||
| label: 'Button', | ||
| }, | ||
| }; | ||
|
|
||
| export const Small: Story = { | ||
| args: { | ||
| size: 'small', | ||
| label: 'Button', | ||
| }, | ||
| }; | ||
|
|
||
| export const Ad: Story = { | ||
| args: { | ||
| primary: false, | ||
| label: 'Button', | ||
| }, | ||
| }; | ||
|
|
||
| export const Df: Story = { | ||
| args: { | ||
| primary: false, | ||
| label: 'Button', | ||
| }, | ||
| }; | ||
|
|
||
| export const Gdf: Story = { | ||
| args: { | ||
| primary: false, | ||
| label: 'Button', | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| import React from 'react'; | ||
|
|
||
| import './button.css'; | ||
|
|
||
| export interface ButtonProps { | ||
| /** Is this the principal call to action on the page? */ | ||
| primary?: boolean; | ||
| /** What background color to use */ | ||
| backgroundColor?: string; | ||
| /** How large should the button be? */ | ||
| size?: 'small' | 'medium' | 'large'; | ||
| /** Button contents */ | ||
| label: string; | ||
| /** Optional click handler */ | ||
| onClick?: () => void; | ||
| } | ||
|
|
||
| /** Primary UI component for user interaction */ | ||
| export const Button = ({ | ||
| primary = false, | ||
| size = 'medium', | ||
| backgroundColor, | ||
| label, | ||
| ...props | ||
| }: ButtonProps) => { | ||
| const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary'; | ||
| return ( | ||
| <button | ||
| type="button" | ||
| className={['storybook-button', `storybook-button--${size}`, mode].join(' ')} | ||
| style={{ backgroundColor }} | ||
| {...props} | ||
| > | ||
| {label} | ||
| </button> | ||
| ); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| .storybook-button { | ||
| display: inline-block; | ||
| cursor: pointer; | ||
| border: 0; | ||
| border-radius: 3em; | ||
| font-weight: 700; | ||
| line-height: 1; | ||
| font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; | ||
| } | ||
| .storybook-button--primary { | ||
| background-color: #555ab9; | ||
| color: white; | ||
| } | ||
| .storybook-button--secondary { | ||
| box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset; | ||
| background-color: transparent; | ||
| color: #333; | ||
| } | ||
| .storybook-button--small { | ||
| padding: 10px 16px; | ||
| font-size: 12px; | ||
| } | ||
| .storybook-button--medium { | ||
| padding: 11px 20px; | ||
| font-size: 14px; | ||
| } | ||
| .storybook-button--large { | ||
| padding: 12px 24px; | ||
| font-size: 16px; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can you explain the purpose of these stories?