Skip to content

Commit bf6795e

Browse files
committed
fix: updating schema form + temporarily disabling lang settings to work with component previews in Pattern Lab; updating CORS settings
1 parent 18d88d9 commit bf6795e

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

docs-site/.boltrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const config = {
66
// array of languages to compile the design system. note, these are ignored when the --i18n flag is set to false
77
// Note: if lang is defined, the first item is currently the one used by default in the Pattern Lab build, pending further iterations on this!
88
// lang: ['en', 'ja'],
9-
lang: ['en'],
109

1110
renderingService: false, // starts PHP service for rendering Twig templates
1211
openServerAtStart: false,

docs-site/src/components/schema-form/schema-form.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,7 @@ export default class SchemaForm extends Component {
121121
render() {
122122
const { layout } = this.props;
123123

124-
const iframeHead = `<link rel="stylesheet" href="/build/bolt-global${
125-
bolt.config.lang ? '-' + bolt.data.config.lang[0] : ''
126-
}.css"> <script src="/build/bolt-global.js" async></script>`;
124+
const iframeHead = `<link rel="stylesheet" href="/build/bolt-global.css"> <script src="/build/bolt-global.js" async></script>`;
127125

128126
const schema = SchemaForm.prepareSchema(this.props.schema);
129127
const isHorizontal = layout === 'horizontal';
@@ -149,6 +147,7 @@ export default class SchemaForm extends Component {
149147
}}>
150148
<div
151149
key="1"
150+
style="width: 100%;"
152151
data-grid={{
153152
w: 1,
154153
h: 3,

packages/build-tools/create-webpack-config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,9 @@ async function createWebpackConfig(buildConfig) {
474474
hot: config.prod ? false : true,
475475
noInfo: true, // webpackTasks.watch handles output info related to success & failure
476476
publicPath,
477+
headers: {
478+
'Access-Control-Allow-Origin': '*',
479+
},
477480
};
478481
}
479482

serve.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,19 @@
4242
"value": "application/schema+json"
4343
}
4444
]
45+
},
46+
{
47+
"source": "**/*",
48+
"headers": [
49+
{
50+
"key": "Access-Control-Allow-Origin",
51+
"value": "*"
52+
},
53+
{
54+
"key": "Access-Control-Allow-Headers",
55+
"value": "Origin, X-Requested-With, Content-Type, Accept, Range"
56+
}
57+
]
4558
}
4659
]
4760
}

0 commit comments

Comments
 (0)