feat: wrap expandable section header actions on narrow widths#4804
Draft
ernst-dev wants to merge 1 commit into
Draft
feat: wrap expandable section header actions on narrow widths#4804ernst-dev wants to merge 1 commit into
ernst-dev wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4804 +/- ##
=======================================
Coverage 97.61% 97.61%
=======================================
Files 952 952
Lines 30816 30816
Branches 11318 11318
=======================================
Hits 30081 30081
Misses 688 688
Partials 47 47 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Allow
ExpandableSectionheader actions (theheaderActionsslot) to wrap gracefully on narrow container widths instead of overflowing/clipping.For the non-container variants that render the
headerActionsslot (default,inline), the header row (.header-actions-wrapper) already setsflex-wrap: wrap, but the heading (.header-wrapper) could not shrink below its content min-size (min-width: auto). On narrow widths this pushed the actions off-screen / clipped the content rather than degrading gracefully.This change lets the heading shrink and wrap its text (
flex: 1 1 auto+min-inline-size: 0down the title flex chain, plusoverflow-wrap: break-wordon the header text). The result:Scope is limited to the
.header-actions-wrapperpath (default / inline variants). Thecontainervariant (which routes through theHeadercomponent),navigation, and thecompactvariant (chart popovers, intentionally non-wrapping) are untouched. No public API / prop was added — this is a pure, backward-compatible layout hardening of an existing responsive behavior.Related links, issue #, if available: AWSUI-60837
How has this been tested?
npm run quick-build— greenjest src/expandable-section/__tests__— 182 passed (4 new tests covering the header-actions wrapper for thedefaultandinlinevariants, and absence of the wrapper when there are no actions)eslintandstylelinton the changed files — greenpages/expandable-section/header-actions-wrap.page.tsx) rendering the sections at 640 / 360 / 240 / 160 px to visually verify wrapping behaviorReview checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.