feat: Use flexible layout for columns > 4 without minColumnWidth#4260
Open
ekatza wants to merge 4 commits intocloudscape-design:mainfrom
Open
feat: Use flexible layout for columns > 4 without minColumnWidth#4260ekatza wants to merge 4 commits intocloudscape-design:mainfrom
ekatza wants to merge 4 commits intocloudscape-design:mainfrom
Conversation
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
This change enables ColumnLayout to automatically use flexible layout when more than 4 columns are specified without an explicit
minColumnWidthprop. Previously, flexible layout was only used whenminColumnWidthwas set, limiting the component to 4 columns maximum in grid mode.The change modifies the condition in
src/column-layout/internal.tsxto useFlexibleColumnLayoutwhen eitherminColumnWidthis provided ORcolumns > 4.Related links, issue #, if available: AWSUI-61702
How has this been tested?
src/column-layout/__tests__/column-layout.test.tsxverifying that 5 columns render correctly withoutminColumnWidthsrc/column-layout/__tests__/with-css.test.tsxverifying flexible layout is used with 5 columnspages/column-layout/min-width.permutations.page.tsxfor visual validationTo validate manually:
/light/column-layout/min-width-permutationsReview checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
interfaces.tsto remove 4-column limitation and document behavior for 5+ columnsCONTRIBUTING.md. - Fully backward-compatible; only affects new use case (columns > 4 without minColumnWidth). Previous 5+ columns without minColumnWidth set was not supported.CONTRIBUTING.md. - Uses existing FlexibleColumnLayout implementationSecurity
checkSafeUrlfunction. - n/aTesting
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.