Skip to content

templates: a required marker is coloured by a token Harmonia defines (#7155) - #7204

Merged
delchev merged 1 commit into
masterfrom
issue-7155-required-marker-negative
Sep 9, 2026
Merged

templates: a required marker is coloured by a token Harmonia defines (#7155)#7204
delchev merged 1 commit into
masterfrom
issue-7155-required-marker-negative

Conversation

@delchev

@delchev delchev commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

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-view and document/document-view show 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 — the HarmoniaDateFormatIT shape) asserts the two things the drift needed:

  • every marker on every surface carries the same class — and a surface matching no marker fails too, since markup that moved past the sweep is how a drifted token stays invisible;
  • that class is one the pinned Harmonia stylesheet really defines, read out of the codbex__harmonia webjar 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-destructive re-introduced into one template (my/my-form-view.html.template colours a required marker with [text-destructive] instead of text-negative).

formatter:format + formatter:validate clean on both touched modules.

Noticed, not touched

components/security/security-oauth2/src/main/resources/static/tenant-selection.html:93 uses border-destructive on the error alert — the identical defect (no such class in the Harmonia dist; the token is border-negative), on the tenant picker. Out of this issue's scope, left for its own issue.

Fixes #7155

…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>
@delchev
delchev merged commit 6d0ec05 into master Sep 9, 2026
10 checks passed
@delchev
delchev deleted the issue-7155-required-marker-negative branch September 9, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

templates: the my/partner required marker uses text-destructive - a class the Harmonia build does not define

1 participant