-
Notifications
You must be signed in to change notification settings - Fork 549
feat(onboarding): "next quest" cards #7941
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
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c1a079e
feat(base): let SelectableCard host arbitrary content
talissoncosta 4581b15
feat(onboarding): make the "next quest" cards actionable
talissoncosta a553b1f
feat(onboarding): lock hint on the flags table
talissoncosta 12e69c9
test(onboarding): e2e for the next-quest cards
talissoncosta 3292d24
chore(onboarding): import classnames as cn to match SelectableCard
talissoncosta 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
30 changes: 30 additions & 0 deletions
30
frontend/documentation/pages/onboarding/OnboardingNextSteps.stories.tsx
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 @@ | ||
| import type { Meta, StoryObj } from 'storybook' | ||
|
|
||
| import OnboardingNextSteps from 'components/pages/onboarding/OnboardingNextSteps' | ||
|
|
||
| const meta: Meta<typeof OnboardingNextSteps> = { | ||
| args: { | ||
| locked: false, | ||
| onSelect: () => {}, | ||
| }, | ||
| component: OnboardingNextSteps, | ||
| parameters: { | ||
| docs: { | ||
| description: { | ||
| component: | ||
| 'The "Choose your next quest" section at the bottom of the onboarding flow: the three ways the demo flag can level up (gradual rollout, experiment, remote config), each linking to its real config. Locked and dimmed until the app connects.', | ||
| }, | ||
| }, | ||
| layout: 'padded', | ||
| }, | ||
| title: 'Pages/Onboarding/OnboardingNextSteps', | ||
| } | ||
| export default meta | ||
|
|
||
| type Story = StoryObj<typeof OnboardingNextSteps> | ||
|
|
||
| export const Connected: Story = {} | ||
|
|
||
| export const Locked: Story = { | ||
| args: { locked: true }, | ||
| } | ||
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 |
|---|---|---|
|
|
@@ -36,6 +36,8 @@ | |
| display: flex; | ||
| flex-direction: column; | ||
| gap: 4px; | ||
| flex: 1; | ||
| min-width: 0; | ||
| } | ||
|
|
||
| &__icon { | ||
|
|
||
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
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
90 changes: 90 additions & 0 deletions
90
frontend/web/components/pages/onboarding/OnboardingNextSteps/OnboardingNextSteps.scss
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,90 @@ | ||
| // "Choose your next quest" section. Layout comes from utilities in the markup; | ||
| // this file holds the type sizes, secondary text colour, the dimmed locked | ||
| // state, and the small per-card preview shapes (rollout track, A/B segmented, | ||
| // value pill). Secondary text isn't a utility: Bootstrap's .text-secondary | ||
| // (gold, !important) would win over our token utility, so it's set here. | ||
| .onboarding-next-steps { | ||
| &__title { | ||
| font-size: 16px; | ||
| } | ||
|
|
||
| &__subtitle { | ||
| font-size: 13px; | ||
| line-height: 1.5; | ||
| color: var(--color-text-secondary); | ||
| } | ||
|
|
||
| // Locked affordance: intentionally faint (disabled look). The lock icon | ||
| // inherits this via currentColor. | ||
| &__lock { | ||
| font-size: 12px; | ||
| color: var(--color-text-tertiary); | ||
| } | ||
|
|
||
| &__caption { | ||
| font-size: 12px; | ||
| color: var(--color-text-secondary); | ||
| } | ||
|
|
||
| // Dimmed until the app connects (the design's 0.4 locked state). The `inert` | ||
| // attribute on the same element blocks pointer + keyboard interaction. | ||
| &__body--locked { | ||
| opacity: 0.4; | ||
| } | ||
|
|
||
| // Equal-width cards regardless of their copy length. | ||
| &__row > * { | ||
| flex: 1 1 0; | ||
| min-width: 0; | ||
| } | ||
|
|
||
| // Illustrative preview sits a little below the card's description. | ||
| &__preview { | ||
| margin-top: 6px; | ||
| } | ||
|
|
||
| // Rollout: a part-filled pill track. | ||
| &__track { | ||
| display: block; | ||
| width: 100%; | ||
| height: 8px; | ||
| border-radius: var(--radius-full); | ||
| background: var(--color-border-default); | ||
| } | ||
|
|
||
| &__track-fill { | ||
| display: block; | ||
| width: 25%; | ||
| height: 100%; | ||
| border-radius: var(--radius-full); | ||
| background: var(--color-surface-action); | ||
| } | ||
|
|
||
| // Experiment: an A/B segmented control. | ||
| &__segmented { | ||
| align-self: flex-start; | ||
| overflow: hidden; | ||
| border: 1px solid var(--color-border-default); | ||
| border-radius: var(--radius-lg); | ||
| } | ||
|
|
||
| &__segment { | ||
| padding: 5px 16px; | ||
| font-size: 12px; | ||
| color: var(--color-text-secondary); | ||
| background: var(--color-surface-default); | ||
|
|
||
| &--active { | ||
| color: var(--color-text-action); | ||
| background: var(--color-surface-action-subtle); | ||
| } | ||
| } | ||
|
|
||
| // Remote config: a value chip. | ||
| &__value-pill { | ||
| align-self: flex-start; | ||
| padding: 5px 10px; | ||
| border-radius: var(--radius-md); | ||
| font-size: 12px; | ||
| } | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.