Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/unlucky-coats-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': patch
---

Moved `Frame` scrollbar from main to content and set overflow-y from scroll to auto behind a feature flag
13 changes: 12 additions & 1 deletion polaris-react/src/components/Frame/Frame.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
}

.Content-TopBarAndReframe {
overflow-y: scroll;
overflow-y: auto;
/* stylelint-disable-next-line polaris/conventions/polaris/custom-property-allowed-list -- top bar global space */
margin-bottom: var(--pg-top-bar-height);
margin-right: var(--p-space-050);
Expand All @@ -293,6 +293,17 @@
}
}

.ScrollbarSafeArea-TopBarAndReframe {
@media (--p-breakpoints-md-up) {
/* stylelint-disable -- polaris/conventions/polaris/custom-property-allowed-list -- Polaris component custom properties */
width: calc(
100vw - var(--pg-navigation-width) -
var(--pc-app-provider-scrollbar-width) - var(--p-space-150)
);
/* stylelint-enable -- polaris/conventions/polaris/custom-property-allowed-list */
}
}

.GlobalRibbonContainer {
position: fixed;
z-index: var(--p-z-index-3);
Expand Down
12 changes: 11 additions & 1 deletion polaris-react/src/components/Frame/Frame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,17 @@ class FrameInner extends PureComponent<CombinedProps, State> {
styles['Content-TopBarAndReframe'],
)}
>
{children}
{features?.dynamicTopBarAndReframe ? (
<div
className={
styles['ScrollbarSafeArea-TopBarAndReframe']
}
>
{children}
</div>
) : (
children
)}
</div>
</main>
</div>
Expand Down