You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yyqdbngt (via GitHub)" <gi...@apache.org> on 2026/09/05 20:58:34 UTC
[PR] [ISSUE-3782][test] Deepen themePreference tests with media query and exact-true compact parsing [rocketmq-dashboard]
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE-3782][test] Deepen themePreference tests with media query and exact-true compact parsing [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed pull request #3783: [ISSUE-3782][test] Deepen themePreference tests with media query and exact-true compact parsing
URL: https://github.com/apache/rocketmq-dashboard/pull/3783
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org