Update Layout component#562
Closed
flacoman91 wants to merge 2 commits intomainfrom
Closed
Conversation
|
Collaborator
Author
|
closing. this is going to merge in with #560 to make it easier to preview changes on Complaint Explorer |
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.
Summary of changes
Layout behavior (CSS) —
src/components/Layout/layout.scssright: -1.875emon.content--2-1 .content__main::after, so the vertical rule never renders. We add the full::afterrule (mirroring1-3, withborder-rightandposition: relativeon main).inline-blockcolumns, so.content__mainis only as tall as its content and the::afterline stops there. We make.content--1-3 .wrapper/.content--2-1 .wrappera flex row withalign-items: stretch, reset children todisplay: blockandmargin-right: 0, and setflex/max-widthso the 25/75 and 66.67/33.33 splits stay aligned with the DS.37.5625em,margin-right: 0 !importanton.content--2-1 .content__mainand.content--1-3 .content__sidebar(comment in file says this fixes content overflowing the sidebar).Storybook — examples match CFPB markup and Controls behavior
layout-main.stories.tsx: SharedrenderMainLayout()solayoutin Controls reorders Sidebar vs Content (1-3→ sidebar first;2-1→ main first). Docs note about DOM order.layout-wrapper.stories.tsx: Children order Content then Sidebar to match default2-1.layout-content.stories.tsx,layout-sidebar.stories.tsx: Same 2-1 order and explicitlayout='2-1'onLayout.Main.TODO: