Normalize colors to semantic theme tokens (#5494), plus schema-form JSON view and endpoint card fixes - #5496
Merged
norman-abramovitz merged 4 commits intoJun 25, 2026
Conversation
Replace raw Tailwind palette utilities (gray/blue/red/etc.) and hard-coded hex/rgb values with the app's semantic theme tokens across the frontend, so colors adapt to dark mode and follow the theming/branding work. - Neutral/structural colors -> content-text/-muted/-border, bg-content-bg, ring-primary. These resolve via .dark-theme, so the redundant dark: variants are dropped. - Semantic accent foreground -> text-danger/-success/-warning/-info. - Tinted surfaces (alerts, badges) -> semantic *-50/-900 scale with paired dark: variants, since the scale tokens are static. - Checkbox/radio accents -> accent-primary/ring-primary; neutral status dots -> bg-tentative; chart series resolve theme CSS vars at runtime. - SCSS/@apply hex -> var(--...). The snackbar keeps a deliberate inverse (dark) overlay in both themes. Also tidies two schema-renderer nits surfaced while reviewing: scalar inputs no longer duplicate the description as a placeholder (it already shows as help text), and the enum select's placeholder option is muted until a value is chosen. Specs updated where they asserted the previous raw class names. Refs cloudfoundry#5494
The JSON view previously seeded only the parameters the user had entered, so an empty or partly-filled form showed an empty (or partial) editor and the available parameters were not discoverable. Always overlay the current values onto a full schema-derived skeleton when switching to the JSON view, so every field is visible: set values appear filled in, untouched ones as empty placeholders. The placeholders are stripped from the data that is actually submitted, so an untouched field is shown but not sent, and falsy-but-set values (false / 0) are preserved. - schemaToSkeleton(): build the full key skeleton from a (resolved) schema. - mergeSkeleton(): overlay current values onto the skeleton. - stripEmpty(): drop unset values (null / "" / [] / empty objects) from the submitted params and from advisory validation, so warnings stay relevant. - JSON output is pretty-printed for readability. Pure helpers are unit-tested; component specs cover the empty-skeleton and value-overlay cases.
On the endpoints card view, a long endpoint URL pushed the copy and duplicate-warning icons past the right edge of the card, because the address text did not truncate. Constrain the address with min-w-0 + truncate (full URL still available via tooltip) and size the warning icon to match, so the icons stay within the card on long URLs.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Three related changes, one per commit.
Normalize hard-coded colors to semantic theme tokens (Closes Normalize remaining hard-coded / light-only colors to semantic theme tokens (light/dark) #5494)
Replace raw Tailwind palette utilities and hard-coded hex/rgb across the
frontend with the app's semantic tokens (content-*, bg-content-bg,
ring-primary, text-danger/-success/-warning/-info, accent-primary, the
*-50/-900 accent scales, bg-tentative). Neutrals and accent foregrounds
resolve via .dark-theme and adapt to dark mode with no dark: variant;
tinted surfaces keep paired dark: variants; chart series resolve theme
CSS vars at runtime. Groundwork for the theming/branding work.
Show schema parameter keys in the Form/JSON view (follow-up to Use the Monaco editor for raw-JSON service parameters #5488)
The service-instance parameter editor's JSON view now always shows the
full schema skeleton with current values overlaid, so every parameter is
visible (set values filled, the rest as empty placeholders). Placeholders
are stripped from the submitted params, so an untouched field is shown
but not sent. Also drops a duplicate description-as-placeholder on scalar
inputs and mutes the enum select's placeholder until a value is chosen.
Keep endpoint card address icons inside the card
Long endpoint URLs pushed the copy/warning icons past the card edge in
card view; the address now truncates (full URL on hover).
Testing
that asserted prior raw class names.
endpoints, create-service form + JSON view).