Skip to content

Bug/74332: Inconsistent contrast type colors when switching themes#120

Merged
ihordubas99 merged 3 commits intodevfrom
bug/74332-inconsistent-contrast-type-colors-when-switching-themes
May 6, 2026
Merged

Bug/74332: Inconsistent contrast type colors when switching themes#120
ihordubas99 merged 3 commits intodevfrom
bug/74332-inconsistent-contrast-type-colors-when-switching-themes

Conversation

@ihordubas99
Copy link
Copy Markdown
Collaborator

@ihordubas99 ihordubas99 commented Apr 23, 2026

Ticket

https://community.openproject.org/projects/communicator-stream/work_packages/74332

What are you trying to accomplish?

Fix ID and parent/meta element colors not adapting correctly across all theme modes.
In dark high contrast mode the ID and meta colors were not bright enough in inline chips,
and were only accidentally correct in block cards due to interfering OpenProject styles.
In bright high contrast and dark no-contrast modes the block cards had a brighter ID color than expected.

What approach did you choose and why?

Introduced a semantic CSS token --op-wp-meta-color defined inside defaultWpVariables:

  • Default (light, dark no-contrast, bright high-contrast): uses --bn-colors-highlights-gray-text
  • Dark high contrast: uses --bn-colors-editor-text (bright/white)

Both WorkPackageId and MetaItem now reference this token with !important to prevent
OpenProject's global styles from accidentally overriding the correct values.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@ihordubas99 ihordubas99 self-assigned this Apr 23, 2026
@ihordubas99 ihordubas99 force-pushed the bug/74332-inconsistent-contrast-type-colors-when-switching-themes branch from 8c09ac9 to 79c9d78 Compare April 23, 2026 11:47
@ihordubas99 ihordubas99 requested a review from judithroth April 23, 2026 12:09
Copy link
Copy Markdown
Contributor

@judithroth judithroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me so far, but there are still some slight inconsistencies:
Regular size type - border is smaller or missing

Image

on block links it looks good on all sizes:

Image

Also not sure why, but also the font color seems to be a bit darker for the inline chips than for the block cards. I see this on the status and also on the ID:

Image

Same for light mode with high contrast: ID and status font color are off, border is missing:

Image

My suggestion: The status thingie should be reused between both, inline and block level (card) components. Keep the one from the block level (card) components as this is working correctly. It also does not contain the caret which does not work.

@ihordubas99 ihordubas99 requested a review from judithroth April 24, 2026 12:37
Copy link
Copy Markdown
Contributor

@judithroth judithroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your code looks good so far! The status is now working correct in all modes.
However, the ID color is still off a bit. It's quite funny, there are other OP styles interfering with this one and in one case it makes it look correctly in the block styles and in another it makes it look broken in the block styles 😂

Dark high contrast mode:

Image The color value of the ID of the inline styles is not bright enough.

For the block styles, it's correct but only because other OP styles interfer:
Image
It should be the bright value also when the extension is used in a different context than OpenProject.

Also the parent element should be in the same brighter color as the ID uses in dark high contrast mode (inline and block level elements):
Image

Bright high contrast mode

Image Image The ID and parent should have the darker color for all. In the block level elements the color is overwritten and therefore appears correctly, but only in OpenProject. It should also be the darker color in other contexts.

Dark mode no high contrast

Image The block elements have a brighter ID. I think we should use the darker value here for all (id + parent and in inline and block level)

Colors are hard...

@ihordubas99 ihordubas99 requested a review from judithroth May 4, 2026 13:36
Copy link
Copy Markdown
Contributor

@judithroth judithroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything now looks the same for inline and block level work packages ✨
Nice work to unify / standardize the variables for colors!

@ihordubas99 ihordubas99 force-pushed the bug/74332-inconsistent-contrast-type-colors-when-switching-themes branch from 987bfa7 to fe29d8c Compare May 6, 2026 08:58
@ihordubas99 ihordubas99 merged commit 34f933c into dev May 6, 2026
5 checks passed
@ihordubas99 ihordubas99 deleted the bug/74332-inconsistent-contrast-type-colors-when-switching-themes branch May 6, 2026 09:00
@github-actions github-actions Bot locked and limited conversation to collaborators May 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants