-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Improve scrollbar experience in the admin #9701
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
Changes from all commits
afbf1de
97b1727
3d2009e
923538e
365259f
bb8f9ca
11d8d6e
b487d43
60dd950
99fc385
064f672
bb25a06
971f35f
218bd3e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@shopify/polaris': minor | ||
| --- | ||
|
|
||
| Updated the Frame and Topbar components to stay clear of a scrollbar. This reduces the overall jumpiness in the UI when scrollbars appear and disappear when using a Polaris app. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -142,14 +142,16 @@ export const TopBar: React.FunctionComponent<TopBarProps> & { | |
|
|
||
| return ( | ||
| <div className={styles.TopBar}> | ||
| <div className={styles.LeftContent}> | ||
| {navigationButtonMarkup} | ||
| {contextMarkup} | ||
| </div> | ||
| <div className={styles.Search}>{searchMarkup}</div> | ||
| <div className={styles.RightContent}> | ||
| <div className={styles.SecondaryMenu}>{secondaryMenu}</div> | ||
| {userMenu} | ||
| <div className={styles.Container}> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is going to conflict with what I just drafted here, where I'm converting the TopBar to a grid layout in order to achieve newly desired alignment of the elements. Specifically, the search field. I'm guessing the Container is being added in this manner to constrain the width, but also allow the TopBar div to stretch the width of the screen. I suppose with the change I have above, the grid styles would then need to be applied to a child div of the Container div. What are your thoughts? Something we'll need to be cognizant of with the ordering of delivering this and what I have staged.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Correct!
Yeah, this sounds right to me. I'm basically just adding another child in here and adding |
||
| <div className={styles.LeftContent}> | ||
| {navigationButtonMarkup} | ||
| {contextMarkup} | ||
| </div> | ||
| <div className={styles.Search}>{searchMarkup}</div> | ||
| <div className={styles.RightContent}> | ||
| <div className={styles.SecondaryMenu}>{secondaryMenu}</div> | ||
| {userMenu} | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be 3d? Might be slightly more performant:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
translate3dis more performant because it runs the process in the GPU but I haven't looked at this in awhile so it's worth double checkingThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what I learned way back when too, but I wouldn't be surprised if the whole "trigger GPU" trick has passed its best before date 😀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking it would be more performant because it shouldn't have to trigger the gpu. There's no visibility in this but yes, probably negligible