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

feat: Update colors for warnings in status-related components #1340

Merged
merged 36 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
bed0adb
feat: Updated colors for warnings in status-related components
timogasda Jun 20, 2023
044659f
Add page for review
timogasda Jun 20, 2023
a90a5e7
final(?) style-dictionary update
timogasda Jun 22, 2023
f0347bb
apply visual context to flashbar warnings
timogasda Jun 22, 2023
e5cb6e8
fix warning color in stacked flashbar
timogasda Jun 22, 2023
a7d845e
updat review page
timogasda Jun 22, 2023
44ac09b
update theme snapshot
timogasda Jun 22, 2023
86a4375
fix a11y errors
timogasda Jun 22, 2023
317f036
more a11y fixes
timogasda Jun 22, 2023
b7be292
Merge branch 'main' into gasda/warning-color-update
jperals Jul 3, 2023
9c4327f
Restore blue color for info and in-progress Flashbar items
jperals Jul 4, 2023
7559fe0
Move usage of getVisualContextClassname to Flash component
jperals Jul 4, 2023
1ab5ea2
Add permutations for Flashbar items with expandable sections
jperals Jul 4, 2023
14a62be
Improve styles of expandable section header inside Flashbar warning item
jperals Jul 4, 2023
1b2a47a
Show up to 4 items in collapsed stack if 4 colors are present
jperals Jul 4, 2023
b7ae832
Fix colors of expandable section inside warning Flashbar item
jperals Jul 5, 2023
62b2a12
Fix colors of expandable section description inside Flashbar item
jperals Jul 5, 2023
a6c4bf5
Fix colors of expandable section description inside Flashbar item in …
jperals Jul 5, 2023
eff2665
Apply different warning colors to VR than Classic
jperals Jul 5, 2023
3959635
Merge branch 'main' into gasda/warning-color-update
jperals Jul 5, 2023
ceb6a80
Fix colors for Classic and dark mode
jperals Jul 5, 2023
c1abc22
Update themes snapshot
jperals Jul 5, 2023
b06cb9d
Merge branch 'main' into gasda/warning-color-update
jperals Jul 5, 2023
7ff6cd6
Update design tokens snapshot
jperals Jul 7, 2023
8e7ab0c
Merge branch 'main' into gasda/warning-color-update
jperals Jul 11, 2023
6c7086f
Change yellow-800 color in VR
jperals Jul 11, 2023
8401121
Merge branch 'main' into gasda/warning-color-update
jperals Jul 12, 2023
c900349
Refactor visual tests into their specific component pages
jperals Jul 12, 2023
ee49caf
Update design tokens snapshot
jperals Jul 12, 2023
84f2ec5
Merge branch 'main' into gasda/warning-color-update
jperals Jul 14, 2023
c46196a
Merge branch 'main' into gasda/warning-color-update
jperals Jul 17, 2023
afe6253
Update design token snapshots
jperals Jul 17, 2023
3aa353e
Update themes snapshots
jperals Jul 17, 2023
b0219d9
Merge branch 'main' into gasda/warning-color-update
jperals Jul 18, 2023
4bdb224
Don't expose colorTextNotificationYellow token
jperals Jul 18, 2023
b16ff3b
Merge branch 'main' into gasda/warning-color-update
jperals Jul 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 28 additions & 16 deletions pages/alert/permutations.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,65 @@
import React from 'react';
import Alert, { AlertProps } from '~components/alert';
import Button from '~components/button';
import Link from '~components/link';
import ScreenshotArea from '../utils/screenshot-area';
import createPermutations from '../utils/permutations';
import PermutationsView from '../utils/permutations-view';

const longText =
'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.';

const longTextWithLink = (
<>
Lorem ipsum dolor sit amet, <Link href="#">consectetur</Link> adipisicing{' '}
<Link external={true} href="#">
elit
</Link>
, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.
</>
);

const allTypes: AlertProps.Type[] = ['info', 'success', 'warning', 'error'];

/* eslint-disable react/jsx-key */
const permutations = createPermutations<AlertProps>([
{
type: ['warning', 'info', 'success', 'error'],
children: [
'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
],
children: [longText, longTextWithLink],
type: allTypes,
},
{
dismissAriaLabel: ['Close alert'],
dismissible: [true],
header: ['Default Example Header'],
type: allTypes,
},
{
buttonText: ['Button text'],
children: ['Default Example Body'],
type: allTypes,
},
{
dismissible: [true],
dismissAriaLabel: ['Close alert'],
buttonText: ['Button text'],
header: [
'Default Example Header',
'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
],
children: [
'Default Example Body',
'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
],
header: ['Default Example Header', longText],
children: ['Default Example Body', longText],
type: allTypes,
},
{
dismissible: [true, false],
dismissAriaLabel: ['Close alert'],
header: [undefined, 'Default Example Header'],
children: [
'Default Example Body',
'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
],
children: ['Default Example Body', longText],
action: [
<Button iconName="external" iconAlign="right">
Show more
</Button>,
],
type: allTypes,
},
]);

Expand Down
12 changes: 9 additions & 3 deletions pages/flashbar/permutations.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,16 @@ const permutations = createPermutations<FlashbarProps.MessageDefinition>([
content: ['content'],
},
{
header: ['header'],
type: ['success', 'error', 'warning', 'info', 'in-progress'],
header: ['With expandable section inside'],
content: [
<ExpandableSection defaultExpanded={true} headerText="Details">
Expandable Section content
<ExpandableSection defaultExpanded={true} headerText="Details" headerDescription="Description">
<div>
<p>Expandable Section content with a button </p>
<Button href="#" iconName="external">
Click me
</Button>
</div>
</ExpandableSection>,
],
},
Expand Down
Loading
Loading