From 12bdeac7182516b235bb97b873097da6d30c7b0c Mon Sep 17 00:00:00 2001 From: Mary Kate Date: Wed, 30 Sep 2020 14:09:00 -0500 Subject: [PATCH] updates to Soapbox Config. Remove unnecessary fields, add accordion component --- app/soapbox/features/soapbox_config/index.js | 37 +++++++------ .../features/ui/components/accordion.js | 54 +++++++++++++++++++ app/soapbox/locales/ar.json | 4 +- app/soapbox/locales/ast.json | 4 +- app/soapbox/locales/bg.json | 4 +- app/soapbox/locales/bn.json | 4 +- app/soapbox/locales/br.json | 4 +- app/soapbox/locales/ca.json | 4 +- app/soapbox/locales/co.json | 4 +- app/soapbox/locales/cs.json | 4 +- app/soapbox/locales/cy.json | 4 +- app/soapbox/locales/da.json | 4 +- app/soapbox/locales/de.json | 4 +- app/soapbox/locales/defaultMessages.json | 4 +- app/soapbox/locales/el.json | 4 +- app/soapbox/locales/en.json | 4 +- app/soapbox/locales/eo.json | 4 +- app/soapbox/locales/es-AR.json | 4 +- app/soapbox/locales/es.json | 4 +- app/soapbox/locales/et.json | 4 +- app/soapbox/locales/eu.json | 4 +- app/soapbox/locales/fa.json | 4 +- app/soapbox/locales/fi.json | 4 +- app/soapbox/locales/fr.json | 4 +- app/soapbox/locales/ga.json | 4 +- app/soapbox/locales/gl.json | 4 +- app/soapbox/locales/he.json | 4 +- app/soapbox/locales/hi.json | 4 +- app/soapbox/locales/hr.json | 4 +- app/soapbox/locales/hu.json | 4 +- app/soapbox/locales/hy.json | 4 +- app/soapbox/locales/id.json | 4 +- app/soapbox/locales/io.json | 4 +- app/soapbox/locales/it.json | 4 +- app/soapbox/locales/ja.json | 4 +- app/soapbox/locales/ka.json | 4 +- app/soapbox/locales/kk.json | 4 +- app/soapbox/locales/ko.json | 4 +- app/soapbox/locales/lt.json | 4 +- app/soapbox/locales/lv.json | 4 +- app/soapbox/locales/mk.json | 4 +- app/soapbox/locales/ms.json | 4 +- app/soapbox/locales/nl.json | 4 +- app/soapbox/locales/nn.json | 4 +- app/soapbox/locales/no.json | 4 +- app/soapbox/locales/oc.json | 4 +- app/soapbox/locales/pl.json | 4 +- app/soapbox/locales/pt-BR.json | 4 +- app/soapbox/locales/pt.json | 4 +- app/soapbox/locales/ro.json | 4 +- app/soapbox/locales/ru.json | 4 +- app/soapbox/locales/sk.json | 4 +- app/soapbox/locales/sl.json | 4 +- app/soapbox/locales/sq.json | 4 +- app/soapbox/locales/sr-Latn.json | 4 +- app/soapbox/locales/sr.json | 4 +- app/soapbox/locales/sv.json | 4 +- app/soapbox/locales/ta.json | 4 +- app/soapbox/locales/te.json | 4 +- app/soapbox/locales/th.json | 4 +- app/soapbox/locales/tr.json | 4 +- app/soapbox/locales/uk.json | 4 +- app/soapbox/locales/zh-CN.json | 4 +- app/soapbox/locales/zh-HK.json | 4 +- app/soapbox/locales/zh-TW.json | 4 +- app/styles/basics.scss | 19 ++++++- app/styles/forms.scss | 22 ++++++++ 67 files changed, 240 insertions(+), 144 deletions(-) create mode 100644 app/soapbox/features/ui/components/accordion.js diff --git a/app/soapbox/features/soapbox_config/index.js b/app/soapbox/features/soapbox_config/index.js index 9b8b1942d..0fa43392a 100644 --- a/app/soapbox/features/soapbox_config/index.js +++ b/app/soapbox/features/soapbox_config/index.js @@ -24,6 +24,7 @@ import { SketchPicker } from 'react-color'; import Overlay from 'react-overlays/lib/Overlay'; import { isMobile } from 'soapbox/is_mobile'; import detectPassiveEvents from 'detect-passive-events'; +import Accordion from '../ui/components/accordion'; const messages = defineMessages({ heading: { id: 'column.soapbox_config', defaultMessage: 'Soapbox config' }, @@ -34,8 +35,8 @@ const messages = defineMessages({ homeFooterItemLabel: { id: 'soapbox_config.home_footer.meta_fields.label_placeholder', defaultMessage: 'Label' }, homeFooterItemURL: { id: 'soapbox_config.home_footer.meta_fields.url_placeholder', defaultMessage: 'URL' }, customCssLabel: { id: 'soapbox_config.custom_css.meta_fields.url_placeholder', defaultMessage: 'URL' }, - rawJSONLabel: { id: 'soapbox_config.raw_json_label', defaultMessage: 'Raw JSON data' }, - rawJSONHint: { id: 'soapbox_config.raw_json_hint', defaultMessage: 'Advanced: Edit the settings data directly.' }, + rawJSONLabel: { id: 'soapbox_config.raw_json_label', defaultMessage: 'Advanced: Edit raw JSON data' }, + rawJSONHint: { id: 'soapbox_config.raw_json_hint', defaultMessage: 'Edit the settings data directly. Changes made directly to the JSON file will override the form fields above. Click "Save" to apply your changes.' }, }); const listenerOptions = detectPassiveEvents.hasSupport ? { passive: true } : false; @@ -202,7 +203,7 @@ class SoapboxConfig extends ImmutablePureComponent { /> -
+ {/*
@@ -214,7 +215,7 @@ class SoapboxConfig extends ImmutablePureComponent { onChange={this.handleFileChange(['banner'])} />
-
+ */}
@@ -226,7 +227,7 @@ class SoapboxConfig extends ImmutablePureComponent { />
- + {/* } hint={} @@ -236,7 +237,7 @@ class SoapboxConfig extends ImmutablePureComponent { ['extensions', 'patron', 'enabled'], (e) => e.checked, )} /> - + */} */} - -
- -
-
+ +
+ +
+ } + />