-
Notifications
You must be signed in to change notification settings - Fork 645
PageLayout.Pane: Add sticky prop
#2212
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
Merged
Merged
Changes from 23 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
2bd4a0f
Add storybook story to test sticky behavior
colebemis 68a8934
First draft of sticky implementation
colebemis e1f1db0
Update stories
colebemis ab32ec4
Fix overflow
colebemis 0bab542
wip
colebemis 7220176
Create useStickyPaneHeight hook
colebemis aa74e26
Update comments
colebemis 62c86b5
Add TODO comments
colebemis 08f8df7
Avoid recalculating sticky pane height when sticky is disabled
colebemis ad0519f
Calculate intital height
colebemis be186f9
Handle elastic scroll in safari
colebemis a9fa86d
Clean up max() functions
colebemis 60cc14d
Merge branch 'main' into pagelayout-sticky-prop
colebemis 3e6a769
Add docs
colebemis c68f1eb
Create serious-pots-confess.md
colebemis c723deb
Merge branch 'main' into pagelayout-sticky-prop
colebemis d7180a8
Update serious-pots-confess.md
colebemis 7caa413
Merge branch 'pagelayout-sticky-prop' of github.com:primer/react into…
colebemis c7e7149
Update tests
colebemis f81704f
Import React in tests
colebemis 1dcea16
Remove position: relative from content region
colebemis ebb7ed0
Merge branch 'main' into pagelayout-sticky-prop
colebemis b07f807
Update snapshots
colebemis 52e174f
Handle nested scroll containers
colebemis 55fcd74
Update sticky prop docs
colebemis 867c9bd
Update sticky pane docs example
colebemis 41fed71
Merge branch 'main' into pagelayout-sticky-prop
colebemis 295a1ae
Update src/PageLayout/PageLayout.stories.tsx
colebemis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| --- | ||
| "@primer/react": minor | ||
| --- | ||
|
|
||
| Add a `sticky` prop to the `PageLayout.Pane` component that provides a convenient way for you to make side panes sticky: | ||
|
|
||
| ```diff | ||
| <PageLayout> | ||
| - <PageLayout.Pane>...</PageLayout.Pane> | ||
| + <PageLayout.Pane sticky>...</PageLayout.Pane> | ||
| <PageLayout.Content>...</PageLayout.Content> | ||
| </PageLayout> | ||
| ``` |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.