fix(webapp): restore hostname suggestion contrast - #1929
Conversation
Let maintainers know that an action is required on their side
|
Implementation notesRoot cause
Because nothing in the app declared a colour for that element, the rendered text colour was entirely owned by the PrimeNG token. Whenever that token resolved close to the panel background, the options were invisible until hover swapped the row background.
Why the existing styles did not help
The only occurrences of Roughly 190 lines of the file matched nothing. The chip and multi-select rules were doubly dead: the app's single Changes
Testing
Beyond that, I rendered the exact PrimeNG 20 overlay DOM against the real compiled stylesheet in headless Edge and measured computed colours. The harness injects a deliberately hostile Before, in the light theme: 1.01:1 is invisible text, and the control shows why After: Autocomplete now matches One pre-existing observation, not addressed here: the selected-row colours give 4.47:1 in the dark theme, marginally under WCAG AA. The measurement is identical for
Regression windowIntroduced by the PrimeNG 20 migration (#1652), first released in v2025.3.4, which matches the version on the ticket. #1845 later resynchronised Note Written by Copilot (claude-opus-5), reviewed by Krista House (@kristahouse). |
There was a problem hiding this comment.
Pull request overview
Restores readable hostname autocomplete suggestions under PrimeNG 20 in light and dark themes.
Changes:
- Adds autocomplete design tokens to the application preset.
- Updates autocomplete CSS selectors and option states for PrimeNG 20.
- Removes obsolete template properties and panel styling hooks.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
webapp/apps/gateway-ui/src/client/app/styles/dvl.preset.ts |
Defines autocomplete theme tokens. |
webapp/apps/gateway-ui/src/client/app/modules/web-client/form/web-client-form.component.html |
Uses the current autocomplete configuration. |
webapp/apps/gateway-ui/src/assets/css/override/_p-autocomplete.scss |
Ports autocomplete overrides to current PrimeNG classes. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The hostname suggestion list did not set its own text colour, so options were painted with whatever colour the PrimeNG theme supplied. When that colour was close to the panel background the suggestions were invisible until the pointer moved over them. The styles meant to prevent this had been written against PrimeNG 18 class names and stopped matching anything when the app moved to PrimeNG 20. They are now ported to the current class names and the suggestion list is themed like every other dropdown, so options stay readable in both light and dark themes. Issue: DGW-337 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
5f2ecef to
a12c59f
Compare
|
Follow-up after review: fixed a padding regression introduced by this PR's own cleanup, and verified both states visually and by measurement. Padding regression (fixed)The dropdown arrow button is absolutely positioned and floats over the input rather than sitting beside it, so the input carries In PrimeNG 18 both rules were gated on That matters because the template gates the button on The fix re-scopes both rules under .p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input { flex: 1 1 auto; width: 1%; }It is also sturdier than what it replaced. A class name can be renamed again in a future major, but the structural relationship cannot silently disappear — if the button is not rendered, the selector stops matching, which is the correct behaviour by construction. Measured on real compiled builds, before and after:
Why the app stylesheet, not just the preset
Note on the failure modeBoth defects in this PR were the same shape: a dead PrimeNG selector that was not merely inert leftover, but silently carrying behaviour. Worth keeping in mind at the next PrimeNG major — the risk of a version bump is not only the styles that stop applying, but the conditions that quietly stop being conditions. Note Human-tuned, LLM-assisted content. |
The hostname suggestion list did not set its own text colour, so options were painted with whatever colour the PrimeNG theme supplied. When that colour was close to the panel background the suggestions were invisible until the pointer moved over them.
The styles meant to prevent this had been written against PrimeNG 18 class names and stopped matching anything when the app moved to PrimeNG 20. They are now ported to the current class names and the suggestion list is themed like every other dropdown, so options stay readable in both light and dark themes.
Issue: DGW-337