Skip to content

Commit e17db88

Browse files
authored
Remove omitAppProvider (#6753)
1 parent ceff5fb commit e17db88

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

.changeset/chilly-birds-switch.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@shopify/polaris': patch
3+
'polaris.shopify.com': patch
4+
---
5+
6+
Remove omitAppProvider front matter

polaris-react/.storybook/polaris-readme-loader.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,19 @@ module.exports = function loader(source) {
2929
readme.name,
3030
);
3131

32+
const omitAppProvider = ['Frame', 'AppProvider', 'CustomProperties'].includes(
33+
readme.name,
34+
);
35+
3236
const csfExports = readme.examples.map((example) => {
3337
return `
3438
const ${example.storyName}Component = (${example.code})();
3539
export function ${example.storyName}() {
36-
return <div data-omit-app-provider="${readme.omitAppProvider}"><${
37-
example.storyName
38-
}Component /></div>;
40+
return <${example.storyName}Component />;
3941
}
4042
4143
${example.storyName}.storyName = ${JSON.stringify(example.name)};
42-
${example.storyName}.args = {omitAppProvider: ${readme.omitAppProvider}};
44+
${example.storyName}.args = {omitAppProvider: ${omitAppProvider}};
4345
${example.storyName}.parameters = {
4446
layout: '${hasFullscreenLayout ? 'fullscreen' : 'padded'}',
4547
docs: {
@@ -253,7 +255,6 @@ function parseCodeExamples(data) {
253255
category: matter.data.category,
254256
component: examples.length ? toPascalCase(matter.data.name) : undefined,
255257
examples,
256-
omitAppProvider: matter.data.omitAppProvider || false,
257258
};
258259
}
259260

polaris-react/src/components/AppProvider/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ keywords:
1414
- application wrapper
1515
- wrapper
1616
- sdk
17-
omitAppProvider: true
1817
---
1918

2019
# App provider

polaris-react/src/components/CustomProperties/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ keywords:
77
- color scheme
88
- light mode
99
- dark mode
10-
omitAppProvider: true
1110
---
1211

1312
# Custom Properties

polaris-react/src/components/Frame/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ keywords:
1515
- top bar
1616
- menu
1717
- toast
18-
omitAppProvider: true
1918
---
2019

2120
# Frame

polaris.shopify.com/src/scripts/migrate-content.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ const migrateFile = async (filePath) => {
4949
const contentNoExample = fileContent
5050
.replace(exampleContent, "")
5151
.replace("---\n\n## Examples", "")
52-
.replace("\nomitAppProvider: true", "")
5352
.replace("\n---", `\n${exampleFrontMatter}\n---`);
5453

5554
fs.writeFileSync(fileDir, contentNoExample);

0 commit comments

Comments
 (0)