-
Notifications
You must be signed in to change notification settings - Fork 4
fix(ui): update dropdown font + bg color #372
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1fa994e
fix(ui): update dropdown font + bg color
sneumannb5 2bbfee6
Merge branch 'main' into fix/ui-windows-dropdown
sneumannb5 4c44682
Merge branch 'main' into fix/ui-windows-dropdown
ConnysCode 6f3a1ca
fix: implement pr feedback
sneumannb5 0e375fb
Merge branch 'fix/ui-windows-dropdown' of github.com:sneumannb5/omadi…
sneumannb5 8fc9167
Merge branch 'main' into fix/ui-windows-dropdown
ConnysCode File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| import { describe, expect, it, vi } from 'vitest'; | ||
|
|
||
| import { LOCALES } from '../../../i18n/locales'; | ||
| import { renderWithIntl } from '../../_lib/test-utils'; | ||
| import { LocaleSwitcher } from '../LocaleSwitcher'; | ||
|
|
||
| vi.mock('next/navigation', () => ({ | ||
| useRouter: () => ({ refresh: vi.fn() }), | ||
| })); | ||
|
|
||
| /** | ||
| * Regression guard for issue #360 — same rationale as ThemeControls.test.tsx: | ||
| * the Windows native combobox widget silently ignores per-`<option>` styling | ||
| * driven by CSS custom properties, so any `bg-[color:var(...)]` / | ||
| * `text-[color:var(...)]` className on `<option>` is a no-op there. Option | ||
| * colors are owned by `[data-theme]`-scoped rules in globals.css with | ||
| * concrete hex values; the per-option className must not come back, or | ||
| * contributors would assume it does something. | ||
| */ | ||
| describe('<LocaleSwitcher />', () => { | ||
| it('renders one select with the expected locale options and no inline color classes', () => { | ||
| const { container } = renderWithIntl(<LocaleSwitcher />); | ||
|
|
||
| const selects = container.querySelectorAll('select'); | ||
| expect(selects).toHaveLength(1); | ||
|
|
||
| const options = container.querySelectorAll('option'); | ||
| expect(options).toHaveLength(LOCALES.length); | ||
|
|
||
| const values = Array.from(options).map((o) => o.getAttribute('value')); | ||
| expect(values).toEqual([...LOCALES]); | ||
|
|
||
| for (const option of options) { | ||
| expect(option.getAttribute('class')).toBeNull(); | ||
| } | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import { describe, expect, it } from 'vitest'; | ||
|
|
||
| import { renderWithIntl } from '../../_lib/test-utils'; | ||
| import { ThemeControls } from '../ThemeControls'; | ||
|
|
||
| /** | ||
| * Regression guard for issue #360 — the previous `<option>` markup carried | ||
| * `className="bg-[color:var(...)] text-[color:var(...)]"` props, which the | ||
| * Windows native combobox widget silently ignores (CSS custom properties do | ||
| * not reach option painting). Option colors now live in `[data-theme]`- | ||
| * scoped rules in globals.css with concrete hex values; the per-option | ||
| * className must not come back, or contributors would assume it does | ||
| * something. | ||
| */ | ||
| describe('<ThemeControls />', () => { | ||
| it('renders both selects with the expected options and no inline color classes', () => { | ||
| const { container } = renderWithIntl(<ThemeControls />); | ||
|
|
||
| const selects = container.querySelectorAll('select'); | ||
| expect(selects).toHaveLength(2); | ||
|
|
||
| const options = container.querySelectorAll('option'); | ||
| expect(options).toHaveLength(6); | ||
|
|
||
| const values = Array.from(options).map((o) => o.getAttribute('value')); | ||
| expect(values).toEqual(['lagoon', 'petrol', 'atelier', 'system', 'light', 'dark']); | ||
|
|
||
| for (const option of options) { | ||
| expect(option.getAttribute('class')).toBeNull(); | ||
| } | ||
| }); | ||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.