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

Conversation

jperals
Copy link
Member

@jperals jperals commented Jul 18, 2023

Description

(Updated replica of #1231)

A visual update to components that use "warning" status: status indicator, alert, flashbar, and code editor.

Currently, warning status doesn't have a dedicated color and instead either uses warning or info colors. This change now introduces a new set of yellow tones for warning specifically.

Design POC is Adam.

Related links, issue #, if available: AWSUI-8420, Zb5hAZRq0yk8/Warning-Colour-Update

Screenshot 2023-06-21 at 08 47 06
Screenshot 2023-06-21 at 08 47 02

How has this been tested?

  • Added permutations for visual regression testing
  • Reviewed BackstopJS diffs
  • Reviewed by visual design and UX design
Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

timogasda and others added 30 commits June 21, 2023 08:49
@jperals jperals marked this pull request as ready for review July 18, 2023 09:51
@jperals jperals requested a review from a team as a code owner July 18, 2023 09:51
@jperals jperals requested review from johannes-weber and removed request for a team July 18, 2023 09:51
@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (d84a8e1) 93.47% compared to head (b16ff3b) 93.47%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1340   +/-   ##
=======================================
  Coverage   93.47%   93.47%           
=======================================
  Files         623      623           
  Lines       16770    16772    +2     
  Branches     5551     5551           
=======================================
+ Hits        15675    15677    +2     
  Misses       1022     1022           
  Partials       73       73           
Files Changed Coverage Δ
src/flashbar/utils.ts 97.95% <ø> (ø)
src/flashbar/collapsible-flashbar.tsx 98.02% <100.00%> (+0.02%) ⬆️
src/flashbar/flash.tsx 100.00% <100.00%> (ø)
src/flashbar/non-collapsible-flashbar.tsx 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -548,6 +553,11 @@ const metadata: StyleDictionary.MetadataIndex = {
public: true,
themeable: true,
},
colorTextNotificationYellow: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to expose this token? It is already themeable by theming the colorTextNotificationDefault in the newly introduced flashvar-warning context

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're right, removed the token from the metadata.

Copy link
Member

@johannes-weber johannes-weber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes are looking good to me.
When checking the visual differences, I saw the Code Editor does not have a permutation page. Do you know if this is by purpose? If not, I think this PR is a good opportunity for adding the permutation page.

@jperals
Copy link
Member Author

jperals commented Jul 19, 2023

I don't know if the Code editor not having a permutations page is by purpose. I didn't add coverage for Code editor because I noticed that the warning icon is covered by this existing page, even though it could be a good idea to change its name and title (because they suggest that the code editor doesn't show any warning, though it does).

It's true that having a permutations page for Code editor would help catch potential regressions at the PR stage. But I think I'd rather do that separately. So in short I'd do the following:

  1. Open a PR to add permutations page for Code editor
  2. Change name and title of /light/code-editor/with-errors-no-warnings, either in this PR or in the one mentioned previously

@johannes-weber johannes-weber self-requested a review July 19, 2023 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants