yyqdbngt opened a new pull request, #3783:
URL: https://github.com/apache/rocketmq-dashboard/pull/3783

   ### Motivation
   
   The existing `themePreference` tests cover mode persistence and the basic 
compact toggle, but the `getSystemDarkMode` media-query helper and the strict 
string parsing of the compact flag were untested.
   
   ### Changes
   
   - `only treats the exact string true as compact`: values such as `TRUE` or 
`1` stored for the compact key are not treated as compact, only the literal 
`true` is.
   - `defaults to non-dark when the media query is unavailable`: 
`getSystemDarkMode` degrades to `false` when `window.matchMedia` is absent.
   - `reflects the prefers-color-scheme media query when available`: when the 
media query reports dark, the helper returns `true` and queries the exact media 
feature string.
   
   ### Verification
   
   ```
   ./node_modules/.bin/vitest run src/theme/themePreference.test.ts   # 6 passed
   ./node_modules/.bin/tsc --noEmit                                  # clean
   ./node_modules/.bin/eslint src/theme/themePreference.test.ts      # clean
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to