[CORL-127] Custom CSS (#2194)

* feat: moved html-webpack-plugin to custom server templates in production

* fix: fixed templates

* fix: removed sri for the time being

* fix: fixed up tests for new field name
This commit is contained in:
Wyatt Johnson
2019-02-13 20:45:11 +00:00
committed by GitHub
parent c91a0fafa5
commit aa2346b715
20 changed files with 493 additions and 393 deletions
@@ -20,7 +20,7 @@ const CustomCSSConfig: StatelessComponent<Props> = ({ disabled }) => (
<FormField>
<HorizontalGutter size="full">
<Localized id="configure-advanced-customCSS">
<Header container={<label htmlFor="configure-advanced-customCssUrl" />}>
<Header container={<label htmlFor="configure-advanced-customCSSURL" />}>
Custom CSS
</Header>
</Localized>
@@ -33,7 +33,7 @@ const CustomCSSConfig: StatelessComponent<Props> = ({ disabled }) => (
styles. Can be internal or external.
</Typography>
</Localized>
<Field name="customCssUrl">
<Field name="customCSSURL">
{({ input, meta }) => (
<>
<TextField
@@ -27,7 +27,7 @@ class CustomCSSConfigContainer extends React.Component<Props> {
const enhanced = withFragmentContainer<Props>({
settings: graphql`
fragment CustomCSSConfigContainer_settings on Settings {
customCssUrl
customCSSURL
}
`,
})(CustomCSSConfigContainer);
@@ -115,7 +115,7 @@ exports[`renders configure advanced 1`] = `
>
<label
className="Typography-root Typography-heading1 Typography-colorTextPrimary Header-root"
htmlFor="configure-advanced-customCssUrl"
htmlFor="configure-advanced-customCSSURL"
>
Custom CSS
</label>
@@ -133,8 +133,8 @@ exports[`renders configure advanced 1`] = `
autoCorrect="off"
className="TextField-input TextField-colorRegular"
disabled={false}
id="configure-advanced-customCssUrl"
name="customCssUrl"
id="configure-advanced-customCSSURL"
name="customCSSURL"
onChange={[Function]}
placeholder=""
spellCheck={false}
@@ -72,7 +72,7 @@ it("change custom css", async () => {
let settingsRecord = cloneDeep(settings);
const updateSettingsStub = createSinonStub(s =>
s.onFirstCall().callsFake((_: any, data: any) => {
expect(data.input.settings.customCssUrl).toEqual("./custom.css");
expect(data.input.settings.customCSSURL).toEqual("./custom.css");
settingsRecord = merge(settingsRecord, data.input.settings);
return {
settings: settingsRecord,
+1 -1
View File
@@ -17,7 +17,7 @@ export const settings = {
closedTimeout: 604800,
autoCloseStream: false,
closedMessage: null,
customCssUrl: null,
customCSSURL: null,
domains: ["localhost:8080"],
editCommentWindowLength: 30000,
communityGuidelines: {