From aa8e1e2d7ac3d2a06e48c7bdc7a2e85887137b60 Mon Sep 17 00:00:00 2001 From: Nick Funk Date: Fri, 6 Sep 2019 12:29:27 -0600 Subject: [PATCH] [CORL-560] Update Admin > Config area to match new designs (#2514) * Add solid background to Moderate > Config area headers CORL-560 * Update Config > General section text and font weight CORL-560 * Update ordering of Config > Moderation page items CORL-560 * Update text and font weights in Configure > Moderation page CORL-560 * Update text and font weight on Configure > Organization page CORL-560 * Update text and font weight on Configure > Banned and Suspect Words page CORL-560 * Update text and font weight on Configure > Authentication page CORL-560 * Update text and font weights on Configure > Email page CORL-560 * Update text and font weights on Configure > Advanced page CORL-560 * Repair tests around the styling changes made to the moderation config area CORL-560 * Fix capitalization on the Config > General page CORL-560 * Make email checkbox light themed so its text shows up on new headers CORL-560 * Update Header width to account for padding Prevents it from sticking out over the edge of the page layout CORL-560 * Align "Sort by" text to the drop down in Admin > Config > General > Reactions CORL-560 * Update Admin > Config > General snapshot to adjust for vertical aligned text Vertical flex aligned the "Sort by" text to a combo box in a previous changed CORL-560 * Rename "Perspective Toxic Comment Filter" header to "Toxic Comment Filter" CORL-560 * Use overlay scrolling if available to prevent scroll bar width popping CORL-560 * Remove overflow-y: overlay CORL-560 * Rename Akismet Spam Detection to Spam Detection CORL-560 * Make all non-complex text fields full width in Admin > Config CORL-560 * Remove Authentication Integrations header Area underneath was empty CORL-560 * Re-arrange SSO Key Field layout CORL-560 * Create new typography types for bodyShort and fieldDescription CORL-560 * Update Admin > Config to use bodyShort, fieldDescription typography CORL-560 * Add a slight padding on InputLabel CORL-560 * Add padding on either side of Admin > Config section content CORL-560 --- .../__snapshots__/resetPassword.spec.tsx.snap | 2 +- .../client/admin/routes/Configure/Header.css | 10 +- .../client/admin/routes/Configure/Header.tsx | 2 +- .../admin/routes/Configure/SectionContent.css | 4 + .../admin/routes/Configure/SectionContent.tsx | 19 + .../__snapshots__/Header.spec.tsx.snap | 2 +- .../Advanced/CommentStreamLiveUpdates.tsx | 25 +- .../sections/Advanced/CustomCSSConfig.tsx | 59 +- .../Configure/sections/Advanced/EmbedCode.tsx | 35 +- .../Advanced/PermittedDomainsConfig.tsx | 73 +- .../sections/Auth/AccountFeaturesConfig.tsx | 207 +-- .../sections/Auth/AuthIntegrationsConfig.tsx | 5 - .../Configure/sections/Auth/ClientIDField.tsx | 1 + .../sections/Auth/ClientSecretField.tsx | 3 +- .../sections/Auth/LocalAuthConfig.tsx | 4 +- .../Configure/sections/Auth/OIDCConfig.tsx | 17 +- .../Configure/sections/Auth/RedirectField.tsx | 2 +- .../sections/Auth/RegistrationField.tsx | 13 +- .../Configure/sections/Auth/SSOKeyField.css | 15 +- .../Configure/sections/Auth/SSOKeyField.tsx | 77 +- .../sections/Email/EmailConfigContainer.tsx | 12 +- .../routes/Configure/sections/Email/SMTP.tsx | 2 +- .../General/ClosedStreamMessageConfig.tsx | 48 +- .../General/ClosingCommentStreamsConfig.tsx | 91 +- .../sections/General/CommentEditingConfig.tsx | 79 +- .../sections/General/CommentLengthConfig.tsx | 213 +-- .../sections/General/GuidelinesConfig.tsx | 88 +- .../General/LocaleConfigContainer.tsx | 43 +- .../sections/General/ReactionConfig.tsx | 264 +-- .../General/SitewideCommentingConfig.tsx | 115 +- .../sections/Moderation/APIKeyField.tsx | 3 +- .../sections/Moderation/AkismetConfig.tsx | 132 +- .../sections/Moderation/ModerationConfig.tsx | 4 +- .../sections/Moderation/PerspectiveConfig.tsx | 366 ++-- .../Moderation/PreModerationConfig.tsx | 55 +- .../Moderation/RecentCommentHistoryConfig.tsx | 181 +- .../ModerationConfig.spec.tsx.snap | 4 +- .../OrganizationContactEmailConfig.tsx | 62 +- .../Organization/OrganizationNameConfig.tsx | 57 +- .../Organization/OrganizationURLConfig.tsx | 52 +- .../WordList/BannedWordListConfig.tsx | 69 +- .../WordList/SuspectWordListConfig.tsx | 68 +- .../createPassword.spec.tsx.snap | 10 +- .../createUsername.spec.tsx.snap | 10 +- .../__snapshots__/advanced.spec.tsx.snap | 276 +-- .../__snapshots__/auth.spec.tsx.snap | 815 +++++---- .../__snapshots__/general.spec.tsx.snap | 1601 +++++++++-------- .../__snapshots__/moderation.spec.tsx.snap | 1514 ++++++++-------- .../__snapshots__/organization.spec.tsx.snap | 156 +- .../__snapshots__/wordList.spec.tsx.snap | 190 +- .../admin/test/configure/advanced.spec.tsx | 4 +- .../admin/test/configure/general.spec.tsx | 24 +- .../admin/test/configure/moderation.spec.tsx | 18 +- .../test/configure/organization.spec.tsx | 4 +- .../admin/test/configure/wordList.spec.tsx | 4 +- .../invite/__snapshots__/invite.spec.tsx.snap | 4 +- .../createPassword.spec.tsx.snap | 10 +- .../createUsername.spec.tsx.snap | 10 +- .../test/__snapshots__/signUp.spec.tsx.snap | 52 +- .../__snapshots__/FormField.spec.tsx.snap | 2 +- .../InputDescription/InputDescription.tsx | 2 +- .../InputDescription.spec.tsx.snap | 2 +- .../ui/components/InputLabel/InputLabel.css | 1 + .../ui/components/Typography/Typography.css | 8 + .../ui/components/Typography/Typography.tsx | 4 + src/core/client/ui/shared/typography.css | 8 + src/core/client/ui/theme/mixins.css | 16 + src/core/client/ui/theme/variables.ts | 11 + src/locales/da/admin.ftl | 1 - src/locales/en-US/admin.ftl | 95 +- src/locales/pt-BR/admin.ftl | 1 - 71 files changed, 3861 insertions(+), 3575 deletions(-) create mode 100644 src/core/client/admin/routes/Configure/SectionContent.css create mode 100644 src/core/client/admin/routes/Configure/SectionContent.tsx diff --git a/src/core/client/account/test/__snapshots__/resetPassword.spec.tsx.snap b/src/core/client/account/test/__snapshots__/resetPassword.spec.tsx.snap index e040fa260..6befa3d10 100644 --- a/src/core/client/account/test/__snapshots__/resetPassword.spec.tsx.snap +++ b/src/core/client/account/test/__snapshots__/resetPassword.spec.tsx.snap @@ -52,7 +52,7 @@ Make sure it is unique and be sure to keep it secure. Password

Must be at least 8 characters

diff --git a/src/core/client/admin/routes/Configure/Header.css b/src/core/client/admin/routes/Configure/Header.css index 625823009..6459c5f15 100644 --- a/src/core/client/admin/routes/Configure/Header.css +++ b/src/core/client/admin/routes/Configure/Header.css @@ -1,7 +1,11 @@ .root { - padding-bottom: calc(0.5 * var(--mini-unit)); - border-bottom: 1px solid var(--palette-text-primary); + border-style: none; + border-radius: 1px; + background: var(--palette-text-primary); + color: var(--palette-text-light); + padding: var(--spacing-2); margin-bottom: calc(1.5 * var(--mini-unit)); display: block; - width: 100%; + width: calc(100% - 2 * var(--spacing-2)); + font-family: var(--font-family-sans-serif); } diff --git a/src/core/client/admin/routes/Configure/Header.tsx b/src/core/client/admin/routes/Configure/Header.tsx index efb12dd71..ef5f90167 100644 --- a/src/core/client/admin/routes/Configure/Header.tsx +++ b/src/core/client/admin/routes/Configure/Header.tsx @@ -10,7 +10,7 @@ type Props = PropTypesOf; const Header: FunctionComponent = ({ children, className, ...rest }) => ( diff --git a/src/core/client/admin/routes/Configure/SectionContent.css b/src/core/client/admin/routes/Configure/SectionContent.css new file mode 100644 index 000000000..4ec171a81 --- /dev/null +++ b/src/core/client/admin/routes/Configure/SectionContent.css @@ -0,0 +1,4 @@ +.sectionContent { + padding-left: var(--spacing-2); + padding-right: var(--spacing-2); +} diff --git a/src/core/client/admin/routes/Configure/SectionContent.tsx b/src/core/client/admin/routes/Configure/SectionContent.tsx new file mode 100644 index 000000000..64845d6af --- /dev/null +++ b/src/core/client/admin/routes/Configure/SectionContent.tsx @@ -0,0 +1,19 @@ +import React, { FunctionComponent } from "react"; + +import { HorizontalGutter } from "coral-ui/components"; + +import styles from "./SectionContent.css"; + +interface Props { + children?: React.ReactNode; +} + +const SectionContent: FunctionComponent = ({ children }) => { + return ( + + {children} + + ); +}; + +export default SectionContent; diff --git a/src/core/client/admin/routes/Configure/__snapshots__/Header.spec.tsx.snap b/src/core/client/admin/routes/Configure/__snapshots__/Header.spec.tsx.snap index 21a12c578..8b1daa60a 100644 --- a/src/core/client/admin/routes/Configure/__snapshots__/Header.spec.tsx.snap +++ b/src/core/client/admin/routes/Configure/__snapshots__/Header.spec.tsx.snap @@ -3,7 +3,7 @@ exports[`renders correctly 1`] = ` child diff --git a/src/core/client/admin/routes/Configure/sections/Advanced/CommentStreamLiveUpdates.tsx b/src/core/client/admin/routes/Configure/sections/Advanced/CommentStreamLiveUpdates.tsx index a15d7c1a6..a3556bf25 100644 --- a/src/core/client/admin/routes/Configure/sections/Advanced/CommentStreamLiveUpdates.tsx +++ b/src/core/client/admin/routes/Configure/sections/Advanced/CommentStreamLiveUpdates.tsx @@ -5,6 +5,7 @@ import { FormField, HorizontalGutter, Typography } from "coral-ui/components"; import Header from "../../Header"; import OnOffField from "../../OnOffField"; +import SectionContent from "../../SectionContent"; interface Props { disabled: boolean; @@ -15,19 +16,21 @@ const CommentStreamLiveUpdates: FunctionComponent = ({ disabled }) => (
}> - Comment Stream Live Updates + Comment stream live updates
- } - > - - When enabled, there will be real-time loading and updating of comments - as new comments and replies are published - - - + + } + > + + When enabled, there will be real-time loading and updating of + comments as new comments and replies are published + + + +
); diff --git a/src/core/client/admin/routes/Configure/sections/Advanced/CustomCSSConfig.tsx b/src/core/client/admin/routes/Configure/sections/Advanced/CustomCSSConfig.tsx index 52f46a478..52fed6edb 100644 --- a/src/core/client/admin/routes/Configure/sections/Advanced/CustomCSSConfig.tsx +++ b/src/core/client/admin/routes/Configure/sections/Advanced/CustomCSSConfig.tsx @@ -15,6 +15,7 @@ import { } from "coral-ui/components"; import Header from "../../Header"; +import SectionContent from "../../SectionContent"; interface Props { disabled: boolean; @@ -28,32 +29,38 @@ const CustomCSSConfig: FunctionComponent = ({ disabled }) => ( Custom CSS - } - > - - URL of a CSS stylesheet that will override default Embed Stream - styles. Can be internal or external. - - - - {({ input, meta }) => ( - <> - - - - )} - + + } + > + + URL of a CSS stylesheet that will override default Embed Stream + styles. Can be internal or external. + + + + {({ input, meta }) => ( + <> + + + + )} + + ); diff --git a/src/core/client/admin/routes/Configure/sections/Advanced/EmbedCode.tsx b/src/core/client/admin/routes/Configure/sections/Advanced/EmbedCode.tsx index 99b2d78b0..4a49d5c0d 100644 --- a/src/core/client/admin/routes/Configure/sections/Advanced/EmbedCode.tsx +++ b/src/core/client/admin/routes/Configure/sections/Advanced/EmbedCode.tsx @@ -8,6 +8,7 @@ import { GetMessage, withGetMessage } from "coral-framework/lib/i18n"; import { HorizontalGutter, Typography } from "coral-ui/components"; import Header from "../../Header"; +import SectionContent from "../../SectionContent"; import styles from "./EmbedCode.css"; @@ -78,23 +79,25 @@ const EmbedCode: FunctionComponent = ({ staticURI, getMessage }) => { return ( -
Embed Code
+
Embed code
- - - Copy and paste the code below into your CMS to embed Coral comment - streams in each of your site’s stories. - - -