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

fix: Make popover white-space style deterministic #3047

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

jperals
Copy link
Member

@jperals jperals commented Nov 21, 2024

Description

Ticket: AWSUI-60034

The same element had the CSS rule white-space: normal and white-space: nowrap with the same specificity, so the final style of the element couldn't be guaranteed. The specific order in which stylesheets are loaded can break the expected component appearance.

How has this been tested?

  • Ran through my pipeline, no visual differences
  • Checked with the browser dev tools that the CSS selector including the white-space: nowrap rule has higher specificity (1,2,0) than the one with the white-space: normal rule (1,1,0)
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.

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.34%. Comparing base (ad36547) to head (5a47ddf).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3047   +/-   ##
=======================================
  Coverage   96.34%   96.34%           
=======================================
  Files         780      780           
  Lines       21927    21928    +1     
  Branches     7503     7513   +10     
=======================================
+ Hits        21126    21127    +1     
  Misses        749      749           
  Partials       52       52           

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

@jperals jperals force-pushed the fix/copy-to-clipboard-wrap branch from d322dc8 to 1e4df39 Compare November 22, 2024 08:31
@jperals jperals marked this pull request as ready for review November 22, 2024 08:38
@jperals jperals requested a review from a team as a code owner November 22, 2024 08:38
@jperals jperals requested review from at-susie and Al-Dani and removed request for a team November 22, 2024 08:38
@@ -14,12 +14,9 @@
direction: inherit;
empty-cells: show;
font-family: serif;
font-size: medium;
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 realized that these 3 rules were unnecessary because they are overriden by the typography.default-text-style mixin which is included further down

@jperals jperals requested a review from avinashbot November 26, 2024 08:19
@jperals jperals added this pull request to the merge queue Nov 26, 2024
Merged via the queue into main with commit 6605b1c Nov 26, 2024
38 checks passed
@jperals jperals deleted the fix/copy-to-clipboard-wrap branch November 26, 2024 09:21
georgylobko added a commit that referenced this pull request Nov 28, 2024
georgylobko added a commit that referenced this pull request Nov 29, 2024
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.

2 participants