1
0
Fork 0
forked from OpenNeo/impress
impress/app/javascript/wardrobe-2020
Emi Matchu fcc17d3dcf Whoops, fix some style regressions for the React app!
Ah beans, I didn't notice when doing my Turbo fixes in
40804c1543, that I had accidentally
prevented Chakra from applying some of its usual global styles! This
caused some minor visual regressions in various parts of the app, e.g.,
the default border color for the search field in the wardrobe app
became way darker.

Here, instead of copy-pasting the styles and missing some parts, we
scope the global styles a bit more carefully: we first use
`extendTheme` with the same code as Impress 2020 to get a good
`globalStyles` function that includes Chakra's defaults, *then* delete
the key from the theme.

Then, in `ScopedCSSReset`, we use code similar to Chakra's own global
style application code: call the `globalStyles` function with the
current theme and color mode, use Chakra's `css` function to convert
values like `green.800` to CSS values, prepend our scoping rule onto
the selectors, and drop it into our Emotion CSS.

Tbh I was worried because when I first noticed this issue while on my
trip, I saw the black item search box border, and was like "ah dang,
did I destroy all the color in the app by breaking the part where
Chakra defines its CSS color variables??" And no, that's not actually
what happened, a lot of the app still had its colors!

So this was less pressing than I had thought, but still good to get
fixed!
2024-03-31 01:20:45 -07:00
..
components Skip rendering layers without a usable image 2024-02-01 08:55:42 -08:00
images Use hourglass icon for Retired UCs 2024-02-01 06:48:40 -08:00
ItemPage Load item compatibility data from the Rails app, not impress-2020 2023-11-11 08:15:10 -08:00
loaders Remove our testing-escape-hatch for item search from the console 2024-02-27 16:25:17 -08:00
WardrobePage Add "Baby Body Paint" warning to Known Glitches badge in-app, too 2024-02-27 19:22:08 -08:00
apolloClient.js Filter by Alt Style in item search and item appearance API calls 2024-02-01 04:58:30 -08:00
AppProvider.js Whoops, fix some style regressions for the React app! 2024-03-31 01:20:45 -07:00
impress-2020-config.js Add support_staff flag to user record; they can use Support tools 2024-01-29 04:21:19 -08:00
index.js Remove the item page drawer, just link to the item page instead 2023-11-03 16:56:51 -07:00
ItemPageOutfitPreview.js Oops, fix species name in zones tooltip 2023-11-11 11:57:43 -08:00
util.js Optionally use local instance of impress-2020 during development 2024-01-28 07:00:29 -08:00