manager icon indicating copy to clipboard operation
manager copied to clipboard

fix: Dark Mode style regressions

Open bnussman-akamai opened this issue 1 year ago โ€ข 0 comments

Description ๐Ÿ“

  • I caused some minor dark mode regressions in https://github.com/linode/manager/pull/11081
  • This fixes the regressions by merging the theme options before calling createTheme

Related Docs ๐Ÿ“–

See https://v5.mui.com/material-ui/customization/theming/#createtheme-options-args-theme

I think the key point is

Only the first argument (options) is processed by the createTheme function.

Calling createTheme before merging the raw options has implications that I didn't foresee. Calling createTheme with the theme options merged first fixes the issues we are seeing

Screenshots of the Issues ๐Ÿ“ท

Screenshot 2024-10-17 at 2 04 37โ€ฏPM Screenshot 2024-10-17 at 2 03 54โ€ฏPM Screenshot 2024-10-17 at 2 02 44โ€ฏPM

How to test ๐Ÿงช

  • Checkout this PR (or just use the preview link)
  • Verify the regressions in the "Screenshots" section are all fixed ๐Ÿ”ง

As an Author I have considered ๐Ÿค”

  • [ ] ๐Ÿ‘€ Doing a self review
  • [ ] โ” Our contribution guidelines
  • [ ] ๐Ÿค Splitting feature into small PRs
  • [ ] โž• Adding a changeset
  • [ ] ๐Ÿงช Providing/Improving test coverage
  • [ ] ๐Ÿ” Removing all sensitive information from the code and PR description
  • [ ] ๐Ÿšฉ Using a feature flag to protect the release
  • [ ] ๐Ÿ‘ฃ Providing comprehensive reproduction steps
  • [ ] ๐Ÿ“‘ Providing or updating our documentation
  • [ ] ๐Ÿ•› Scheduling a pair reviewing session
  • [ ] ๐Ÿ“ฑ Providing mobile support
  • [ ] โ™ฟ Providing accessibility support

bnussman-akamai avatar Oct 17 '24 19:10 bnussman-akamai