From e3572643017ac9d00730d72f60128abd1b32ad23 Mon Sep 17 00:00:00 2001 From: Johnn Mis Date: Fri, 26 Feb 2021 09:57:20 -0600 Subject: [PATCH 1/8] Support and Choose buttons had wrong color contrast on dark mode Signed-off-by: Johnn Mis --- packages/core/src/components/SupportButton/SupportButton.tsx | 5 ++++- packages/theme/src/themes.ts | 1 + .../scaffolder/src/components/TemplateCard/TemplateCard.tsx | 5 ++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/core/src/components/SupportButton/SupportButton.tsx b/packages/core/src/components/SupportButton/SupportButton.tsx index eea2b000ca..0afc2eea1f 100644 --- a/packages/core/src/components/SupportButton/SupportButton.tsx +++ b/packages/core/src/components/SupportButton/SupportButton.tsx @@ -43,6 +43,9 @@ const useStyles = makeStyles(theme => ({ minWidth: 260, maxWidth: 400, }, + primary: { + color: theme.palette.primary.light, + }, })); const SupportIcon = ({ icon }: { icon: string | undefined }) => { @@ -98,7 +101,7 @@ export const SupportButton = ({ children }: PropsWithChildren) => { From 66eac454b1e3c58fd7ccc34a6bb518ef82e57890 Mon Sep 17 00:00:00 2001 From: Johnn Mis Date: Mon, 1 Mar 2021 13:53:41 -0600 Subject: [PATCH 2/8] Lighter color for better accessibility in Add Item button Signed-off-by: Johnn Mis --- packages/theme/src/themes.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/theme/src/themes.ts b/packages/theme/src/themes.ts index 3823e94b31..515b973488 100644 --- a/packages/theme/src/themes.ts +++ b/packages/theme/src/themes.ts @@ -104,6 +104,9 @@ export const darkTheme = createTheme({ primary: { main: '#2E77D0', }, + secondary: { + main: '#FF88B2', + }, tonalOffset: 0.45, banner: { info: '#2E77D0', From 4618774ffaaf0fb4dcf5acdcb7d23e6cb860021d Mon Sep 17 00:00:00 2001 From: Johnn Mis Date: Mon, 1 Mar 2021 15:12:09 -0600 Subject: [PATCH 3/8] added changset Signed-off-by: Johnn Mis --- .changeset/spicy-bats-smoke.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .changeset/spicy-bats-smoke.md diff --git a/.changeset/spicy-bats-smoke.md b/.changeset/spicy-bats-smoke.md new file mode 100644 index 0000000000..eb8ce90d85 --- /dev/null +++ b/.changeset/spicy-bats-smoke.md @@ -0,0 +1,8 @@ +--- +'@backstage/core': patch +'@backstage/theme': patch +'@backstage/plugin-scaffolder-backend': patch +--- + +Changed color for Add Item, Support & Choose buttons with low contrast/readibility in dark mode +Added a default type when is not defined in the schema to prevent id collision From bd38f96d128e50aa6b29e289cb254fce1047cc60 Mon Sep 17 00:00:00 2001 From: Johnn Mis Date: Mon, 1 Mar 2021 17:43:20 -0600 Subject: [PATCH 4/8] Typos Signed-off-by: Johnn Mis --- .changeset/spicy-bats-smoke.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/spicy-bats-smoke.md b/.changeset/spicy-bats-smoke.md index eb8ce90d85..cd6889c8ad 100644 --- a/.changeset/spicy-bats-smoke.md +++ b/.changeset/spicy-bats-smoke.md @@ -4,5 +4,5 @@ '@backstage/plugin-scaffolder-backend': patch --- -Changed color for Add Item, Support & Choose buttons with low contrast/readibility in dark mode +Changed color for Add Item, Support & Choose buttons with low contrast/readability in dark mode Added a default type when is not defined in the schema to prevent id collision From ad882c8cf8e546fc1587a77936134e6c73d32c5e Mon Sep 17 00:00:00 2001 From: Johnn Mis Date: Fri, 5 Mar 2021 16:34:32 -0600 Subject: [PATCH 5/8] Moving logical OR assignment to transformSchemaToProps Signed-off-by: Johnn Mis --- plugins/scaffolder/src/components/MultistepJsonForm/schema.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/scaffolder/src/components/MultistepJsonForm/schema.ts b/plugins/scaffolder/src/components/MultistepJsonForm/schema.ts index 7de3994a8e..0e1c0a4b50 100644 --- a/plugins/scaffolder/src/components/MultistepJsonForm/schema.ts +++ b/plugins/scaffolder/src/components/MultistepJsonForm/schema.ts @@ -63,6 +63,7 @@ function extractUiSchema(schema: JsonObject, uiSchema: JsonObject) { export function transformSchemaToProps( inputSchema: JsonObject, ): { schema: FormProps['schema']; uiSchema: FormProps['uiSchema'] } { + inputSchema.type = inputSchema.type || 'object'; const schema = JSON.parse(JSON.stringify(inputSchema)); delete schema.title; // Rendered separately const uiSchema = {}; From b133533bfb17e11bf1f01b9791e304ff2efb24ca Mon Sep 17 00:00:00 2001 From: Johnn Mis Date: Mon, 8 Mar 2021 09:45:18 -0600 Subject: [PATCH 6/8] Removing id collision fix Signed-off-by: Johnn Mis --- plugins/scaffolder/src/components/MultistepJsonForm/schema.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/scaffolder/src/components/MultistepJsonForm/schema.ts b/plugins/scaffolder/src/components/MultistepJsonForm/schema.ts index 0e1c0a4b50..7de3994a8e 100644 --- a/plugins/scaffolder/src/components/MultistepJsonForm/schema.ts +++ b/plugins/scaffolder/src/components/MultistepJsonForm/schema.ts @@ -63,7 +63,6 @@ function extractUiSchema(schema: JsonObject, uiSchema: JsonObject) { export function transformSchemaToProps( inputSchema: JsonObject, ): { schema: FormProps['schema']; uiSchema: FormProps['uiSchema'] } { - inputSchema.type = inputSchema.type || 'object'; const schema = JSON.parse(JSON.stringify(inputSchema)); delete schema.title; // Rendered separately const uiSchema = {}; From c6b0fbe350733f80e53ad4ab2357d141f35f093a Mon Sep 17 00:00:00 2001 From: Johnn Mis Date: Mon, 8 Mar 2021 10:14:08 -0600 Subject: [PATCH 7/8] Updated changeset Signed-off-by: Johnn Mis --- .changeset/spicy-bats-smoke.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/.changeset/spicy-bats-smoke.md b/.changeset/spicy-bats-smoke.md index cd6889c8ad..37228166d0 100644 --- a/.changeset/spicy-bats-smoke.md +++ b/.changeset/spicy-bats-smoke.md @@ -1,8 +1,6 @@ --- '@backstage/core': patch '@backstage/theme': patch -'@backstage/plugin-scaffolder-backend': patch --- Changed color for Add Item, Support & Choose buttons with low contrast/readability in dark mode -Added a default type when is not defined in the schema to prevent id collision From 6dac0c2415eea7ad34e67f5dd7ef3d724ce79d3d Mon Sep 17 00:00:00 2001 From: Johnn Mis Date: Tue, 16 Mar 2021 08:58:37 -0600 Subject: [PATCH 8/8] Replacing overall instead of granular colors Signed-off-by: Johnn Mis --- packages/core/src/components/SupportButton/SupportButton.tsx | 5 +---- packages/theme/src/themes.ts | 3 +-- .../scaffolder/src/components/TemplateCard/TemplateCard.tsx | 5 +---- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/packages/core/src/components/SupportButton/SupportButton.tsx b/packages/core/src/components/SupportButton/SupportButton.tsx index 0afc2eea1f..eea2b000ca 100644 --- a/packages/core/src/components/SupportButton/SupportButton.tsx +++ b/packages/core/src/components/SupportButton/SupportButton.tsx @@ -43,9 +43,6 @@ const useStyles = makeStyles(theme => ({ minWidth: 260, maxWidth: 400, }, - primary: { - color: theme.palette.primary.light, - }, })); const SupportIcon = ({ icon }: { icon: string | undefined }) => { @@ -101,7 +98,7 @@ export const SupportButton = ({ children }: PropsWithChildren) => {