templates: a required marker is coloured by a token Harmonia defines (#7155) - #7204
Merged
Conversation
…7155) The `*` beside a required field's label on the four self-service views (`my-form-view`, `my-document-view`, `partner-form-view`, `partner-document-view`) carried `class="text-destructive"` - a Tailwind-shaped name with zero occurrences in the pinned Harmonia dist, where the token is `negative`. An undefined utility class is not an error anywhere: the asterisk still rendered, in the inherited text colour, so on exactly those four surfaces it read as a literal character beside the label instead of the required signal the power `manage` form and `document` views show in red. Both markers on each of the four move to `text-negative` - the one on the checkbox branch and the pre-existing one on the generic label two lines above, which was equally wrong. All sixteen required markers across the seven generated Harmonia surfaces now carry the same class. `HarmoniaRequiredMarkerIT` guards the drift that produced this: every marker on every surface must carry the same class, and that class must be one the pinned Harmonia stylesheet really defines - read out of the `codbex__harmonia` webjar on the test classpath, so a version that renamed the token fails the test rather than quietly greying out every asterisk. A surface matching no marker fails too, since markup that moved past the sweep is how a drifted token stays invisible. Fixes #7155 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The
*beside a required field's label on the four self-service views (my-form-view,my-document-view,partner-form-view,partner-document-view) carriedclass="text-destructive"— a Tailwind-shaped name with zero occurrences in the pinned Harmonia dist, where the token isnegative.An undefined utility class is not an error anywhere: the asterisk still rendered, in the inherited text colour. So on exactly those four surfaces it read as a literal character beside the label instead of the required signal the power
manage/form-viewanddocument/document-viewshow in red — and only there, which is what let the drift live.The change
Both markers on each of the four move to
text-negative:All sixteen required markers across the seven generated Harmonia surfaces now carry the same class.
The guard
HarmoniaRequiredMarkerIT(HTTP-free, boots no context — theHarmoniaDateFormatITshape) asserts the two things the drift needed:codbex__harmoniawebjar on the test classpath rather than restated as a literal — so a Harmonia version that renamed the token fails this test instead of quietly greying out every asterisk in the fleet.Verified both ways: green with the fix, and red with
text-destructivere-introduced into one template (my/my-form-view.html.template colours a required marker with [text-destructive] instead of text-negative).formatter:format+formatter:validateclean on both touched modules.Noticed, not touched
components/security/security-oauth2/src/main/resources/static/tenant-selection.html:93usesborder-destructiveon the error alert — the identical defect (no such class in the Harmonia dist; the token isborder-negative), on the tenant picker. Out of this issue's scope, left for its own issue.Fixes #7155