-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Top Bar Feature] Remove all references to
dynamicTopBarAndReframe
…
…feature (#12359) ### WHY are these changes introduced? Fixes Shopify/polaris-internal#481 As part of the clean up around the dynamicTopBarAndReframe cleanup, we want to revert all updates for this feature within `@shopify/polaris` back to its initial state. ### WHAT is this pull request doing? Remove all references to code changes around the `dynamicTopBarAndReframe` and ensure behaviour is reverted back to how it was before the feature was introduced. ### How to 🎩 🖥 [Local development instructions](https://github.com/Shopify/polaris/blob/main/README.md#install-dependencies-and-build-workspaces) 🗒 [General tophatting guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md) 📄 [Changelog guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog) Flow sandbox with snapshot: https://flow.polaris-top-bar-test.marc-thomas.eu.spin.dev/dev-sandbox/overview/0190a740-3aad-7a63-a48b-30c3578f9a83 ### 🎩 checklist - [x] Tested a [snapshot](https://github.com/Shopify/polaris/blob/main/documentation/Releasing.md#-snapshot-releases) - [x] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) - [x] Tested on [multiple browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers) - [x] Tested for [accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md) - [x] Updated the component's `README.md` with documentation changes - [x] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide
- Loading branch information
Showing
10 changed files
with
77 additions
and
364 deletions.
There are no files selected for viewing
This file contains 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,5 @@ | ||
--- | ||
'@shopify/polaris': minor | ||
--- | ||
|
||
Removed all references to the dynamicTopBarAndReframe feature and revert functionality back to how it was |
This file contains 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 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 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 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 |
---|---|---|
|
@@ -35,18 +35,10 @@ export default { | |
} as Meta<typeof Frame>; | ||
|
||
export const InAnApplication = { | ||
render: (_args: Args, {globals: {dynamicTopBarAndReframe}}) => ( | ||
<InAnApplicationComponent | ||
dynamicTopBarAndReframe={dynamicTopBarAndReframe} | ||
/> | ||
), | ||
render: (_args: Args) => <InAnApplicationComponent />, | ||
}; | ||
|
||
function InAnApplicationComponent({ | ||
dynamicTopBarAndReframe, | ||
}: { | ||
dynamicTopBarAndReframe: boolean; | ||
}) { | ||
function InAnApplicationComponent() { | ||
const defaultState = useRef({ | ||
emailFieldValue: '[email protected]', | ||
nameFieldValue: 'Jaded Pixel', | ||
|
@@ -365,7 +357,6 @@ function InAnApplicationComponent({ | |
}, | ||
}, | ||
}} | ||
features={{dynamicTopBarAndReframe}} | ||
> | ||
<Frame | ||
logo={logo} | ||
|
@@ -387,16 +378,10 @@ function InAnApplicationComponent({ | |
} | ||
|
||
export const WithAnOffset = { | ||
render: (_args: Args, {globals: {dynamicTopBarAndReframe}}) => ( | ||
<WithAnOffsetComponent dynamicTopBarAndReframe={dynamicTopBarAndReframe} /> | ||
), | ||
render: (_args: Args) => <WithAnOffsetComponent />, | ||
}; | ||
|
||
function WithAnOffsetComponent({ | ||
dynamicTopBarAndReframe, | ||
}: { | ||
dynamicTopBarAndReframe: boolean; | ||
}) { | ||
function WithAnOffsetComponent() { | ||
const defaultState = useRef({ | ||
emailFieldValue: '[email protected]', | ||
nameFieldValue: 'Jaded Pixel', | ||
|
@@ -715,7 +700,6 @@ function WithAnOffsetComponent({ | |
}, | ||
}, | ||
}} | ||
features={{dynamicTopBarAndReframe}} | ||
> | ||
<Frame | ||
logo={logo} | ||
|
@@ -743,16 +727,10 @@ function WithAnOffsetComponent({ | |
} | ||
|
||
export const WithSidebar = { | ||
render: (_args: Args, {globals: {dynamicTopBarAndReframe}}) => ( | ||
<WithSidebarEnabled dynamicTopBarAndReframe={dynamicTopBarAndReframe} /> | ||
), | ||
render: (_args: Args) => <WithSidebarEnabled />, | ||
}; | ||
|
||
function WithSidebarEnabled({ | ||
dynamicTopBarAndReframe, | ||
}: { | ||
dynamicTopBarAndReframe: boolean; | ||
}) { | ||
function WithSidebarEnabled() { | ||
const defaultState = useRef({ | ||
emailFieldValue: '[email protected]', | ||
nameFieldValue: 'Jaded Pixel', | ||
|
@@ -1080,7 +1058,6 @@ function WithSidebarEnabled({ | |
}, | ||
}, | ||
}} | ||
features={{dynamicTopBarAndReframe}} | ||
> | ||
<Frame | ||
logo={logo} | ||
|
@@ -1118,18 +1095,10 @@ function WithSidebarEnabled({ | |
} | ||
|
||
export const WithoutATopBar = { | ||
render: (_args: Args, {globals: {dynamicTopBarAndReframe}}) => ( | ||
<WithoutATopBarComponent | ||
dynamicTopBarAndReframe={dynamicTopBarAndReframe} | ||
/> | ||
), | ||
render: (_args: Args) => <WithoutATopBarComponent />, | ||
}; | ||
|
||
function WithoutATopBarComponent({ | ||
dynamicTopBarAndReframe, | ||
}: { | ||
dynamicTopBarAndReframe: boolean; | ||
}) { | ||
function WithoutATopBarComponent() { | ||
const defaultState = useRef({ | ||
emailFieldValue: '[email protected]', | ||
nameFieldValue: 'Jaded Pixel', | ||
|
@@ -1395,7 +1364,6 @@ function WithoutATopBarComponent({ | |
}, | ||
}, | ||
}} | ||
features={{dynamicTopBarAndReframe}} | ||
> | ||
<Frame | ||
logo={logo} | ||
|
Oops, something went wrong.