Skip to content

Commit 18715e1

Browse files
authored
Rename storybook backgrounds to align with semantic naming (#2767)
## Summary: Since "darkBlue" and "offWhite" follows the primitive colors for the Classic theme, we rename these options for Storybook backgrounds to make them more generic so they align with the semantic names. The background color options are: `baseDefault`, `neutralStrong`, and `baseSubtle` <img width="189" height="181" alt="image" src="https://github.com/user-attachments/assets/2da02c29-f02a-493b-ad72-f4854857a9fa" /> Issue: WB-2050 ## Test plan: 1. Confirm there are no unexpected changes in Chromatic (note: This PR is based off of the `wb-2050-use-bg-tokens` branch, so snapshots from that PR will show up in this PR if they haven't been approved yet!) Author: beaesguerra Reviewers: kevinb-khan Required Reviewers: Approved By: kevinb-khan Checks: ✅ 12 checks were successful, ⏭️ 2 checks have been skipped Pull Request URL: #2767
1 parent 5dccfed commit 18715e1

File tree

16 files changed

+22
-20
lines changed

16 files changed

+22
-20
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.storybook/modes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const allModes = {
2121
},
2222
// NOTE: This will go away when we fully remove the light variants.
2323
dark: {
24-
background: "darkBlue",
24+
background: "neutralStrong",
2525
},
2626
// Accessibility
2727
"themeDefault rtl": {

.storybook/preview.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,18 @@ const parameters = {
7878
// Enable the RenderStateRoot decorator by default.
7979
enableRenderStateRootDecorator: true,
8080
backgrounds: {
81-
default: "light",
81+
default: "baseDefault",
8282
values: [
8383
{
84-
name: "light",
84+
name: "baseDefault",
8585
value: semanticColor.core.background.base.default,
8686
},
8787
{
88-
name: "darkBlue", // TODO(WB-2050): rename to dark
88+
name: "neutralStrong",
8989
value: semanticColor.core.background.neutral.strong,
9090
},
9191
{
92-
name: "offWhite", // TODO(WB-2050): rename to subtle
92+
name: "baseSubtle",
9393
value: semanticColor.core.background.base.subtle,
9494
},
9595
],

__docs__/wonder-blocks-accordion/accordion.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ export const BackgroundColorExample: StoryComponentType = {
657657

658658
BackgroundColorExample.parameters = {
659659
backgrounds: {
660-
default: "darkBlue",
660+
default: "neutralStrong",
661661
},
662662
};
663663

__docs__/wonder-blocks-banner/banner.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export const Layouts: StoryComponentType = () => {
170170

171171
Layouts.parameters = {
172172
backgrounds: {
173-
default: "darkBlue",
173+
default: "neutralStrong",
174174
},
175175
};
176176

@@ -209,7 +209,7 @@ export const DarkBackground: StoryComponentType = () => (
209209

210210
DarkBackground.parameters = {
211211
backgrounds: {
212-
default: "darkBlue",
212+
default: "neutralStrong",
213213
},
214214
chromatic: {
215215
// Testing snapshots don't cover dark background case

__docs__/wonder-blocks-cell/compact-cell-testing-snapshots.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default {
3030
},
3131
parameters: {
3232
backgrounds: {
33-
default: "offWhite",
33+
default: "baseSubtle",
3434
},
3535
chromatic: {
3636
modes: themeModes,

__docs__/wonder-blocks-cell/detail-cell-testing-snapshots.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default {
3535
},
3636
parameters: {
3737
backgrounds: {
38-
default: "offWhite",
38+
default: "baseSubtle",
3939
},
4040
chromatic: {
4141
modes: themeModes,

__docs__/wonder-blocks-clickable/clickable.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Light.parameters = {
148148
},
149149
},
150150
backgrounds: {
151-
default: "darkBlue",
151+
default: "neutralStrong",
152152
},
153153
};
154154

__docs__/wonder-blocks-dropdown/action-item-testing-snapshots.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const meta = {
6666
],
6767
parameters: {
6868
backgrounds: {
69-
default: "offWhite",
69+
default: "baseSubtle",
7070
},
7171
chromatic: {
7272
modes: themeModes,

__docs__/wonder-blocks-dropdown/multi-select.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export default {
8181
/>
8282
) as any,
8383
backgrounds: {
84-
default: "offWhite",
84+
default: "baseSubtle",
8585
},
8686
},
8787
} as Meta<typeof MultiSelect>;

0 commit comments

Comments
 (0)