Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 page unreadable #1309

Closed
jt-nti opened this issue Jul 4, 2023 · 3 comments · Fixed by #1317
Closed

404 page unreadable #1309

jt-nti opened this issue Jul 4, 2023 · 3 comments · Fixed by #1317

Comments

@jt-nti
Copy link
Contributor

jt-nti commented Jul 4, 2023

Detailed description

The 404 page seems to be broken in the v3 releases of the Carbon theme- it has dark text on a dark background making it completely unreadable, except for the large colourful 404.

For example, see https://merative.github.io/spm-ui-addon-devenv/underview

Previous releases of the theme seem to work ok.

For example, see https://merative.github.io/acd-containers/about/underview/

Additional information

I was able to work around the issue by shadowing the FourOhFour component and providing a fixed theme to Layout

jt-nti/cicsdev.github.io@8d2e6b0#diff-c344e11cd21f5403a22a6256b9fd1d7c9455cc8972ba55d98531d14332e26703R14

const FourOhFour = ({ links }) => (
  <Layout homepage={false} theme='g10'>

I think updating the FourOhFour component to pass the interiorTheme to Layout might be part of the solution, although I suspect some additional style changes might also be necessary.

@alisonjoseph
Copy link
Member

alisonjoseph commented Jul 19, 2023

Hi, I think the issue is due to correct tokens not being used in https://github.com/carbon-design-system/gatsby-theme-carbon/blob/main/packages/gatsby-theme-carbon/src/components/FourOhFour/FourOhFour.module.scss

You can view the Carbon tokens here https://carbondesignsystem.com/guidelines/color/tokens

The 404 page looks to currently be set to pull in the theme that is set for the homepage, but I'm not 100% sure. Ideally we wouldn't want to hard code a theme for this page, it should work in all themes. 🤞

@jt-nti
Copy link
Contributor Author

jt-nti commented Jul 20, 2023

Thanks Alison, I'll have a look at the tokens and see if I can get it working without the hard coded theme hack.

jt-nti added a commit to jt-nti/gatsby-theme-carbon that referenced this issue Jul 21, 2023
Fixes carbon-design-system#1309

Signed-off-by: James Taylor <jamest@uk.ibm.com>
@jt-nti
Copy link
Contributor Author

jt-nti commented Jul 24, 2023

@alisonjoseph I've had a go at using the new Carbon tokens to fix this issue #1317, and it seems to work better than my workaround hack, although I haven't managed to check what it looks like with a dark theme: my homepage uses the dark theme but the 404 page always seems to use a light theme for me.

I also noticed that the correct Carbon tokens don't seem to be used elsewhere either, but I think that's probably a separate issue.

It would be good to get a fix in for the unreadable 404 page to start with- if you think the current PR is ok, I can set it as ready for review. (I think it's an improvement at least!)

Thanks.

eng618 pushed a commit to jt-nti/gatsby-theme-carbon that referenced this issue Aug 19, 2023
Fixes carbon-design-system#1309

Signed-off-by: James Taylor <jamest@uk.ibm.com>
jt-nti added a commit to jt-nti/gatsby-theme-carbon that referenced this issue Feb 9, 2024
Fixes carbon-design-system#1309

Signed-off-by: James Taylor <jamest@uk.ibm.com>
eng618 pushed a commit to jt-nti/gatsby-theme-carbon that referenced this issue Feb 15, 2024
Fixes carbon-design-system#1309

Signed-off-by: James Taylor <jamest@uk.ibm.com>
eng618 pushed a commit to jt-nti/gatsby-theme-carbon that referenced this issue Feb 15, 2024
Fixes carbon-design-system#1309

Signed-off-by: James Taylor <jamest@uk.ibm.com>
eng618 pushed a commit that referenced this issue Feb 15, 2024
Fixes #1309

Signed-off-by: James Taylor <jamest@uk.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants