-
Notifications
You must be signed in to change notification settings - Fork 25
feat: revert material design color hacks #912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
The PR reverts previous custom color hacks, aligning component styles back to Material Design color roles by updating theme variables and CSS class usage.
- SidebarNavItem: removed dynamic binding for
color-roleand updated hover/focus background to usesurface-container-highest. - ResourceTile: dropped the
oc-card-defaultclass, added a new selector for static container background, and adjusted hover/selected color roles. - OcTable: replaced all
surface-containerandsecondary-containermappings in hover, highlighted, and accentuated rows to their Material Design equivalents.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/web-runtime/src/components/SidebarNav/SidebarNavItem.vue | Made color-role static and updated focus/hover background to use surface-container-highest |
| packages/web-pkg/src/components/FilesList/ResourceTile.vue | Removed oc-card-default, added .oc-tile-card.oc-card background rule, and updated hover/selected colors |
| packages/design-system/src/components/OcTable/OcTable.vue | Swapped table row hover, highlighted, and accentuated colors to Material Design roles |
Comments suppressed due to low confidence (2)
packages/web-runtime/src/components/SidebarNav/SidebarNavItem.vue:6
- Consider adding a visual regression or unit test to verify active/inactive states of the nav item correctly apply the intended Material Design colors after this change.
color-role="secondaryContainer"
packages/web-runtime/src/components/SidebarNav/SidebarNavItem.vue:6
- The dynamic binding for
color-rolewas removed, causing active nav items to lose their intended 'surface' color. Consider restoring:color-role="active ? 'surface' : 'secondaryContainer'"if active styling is still required.
color-role="secondaryContainer"
df0d6fa to
b601585
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Though the left sidebar animation on click feels weird now because the nav highlighter gets white while moving and then settles behind the blue-ish active color.
| .oc-tile-card.oc-card { | ||
| background-color: var(--oc-role-surface-container); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing for now because it has always been like this, but having non-scoped and therefore global css instructions for the oc-tile class here feels a bit odd, we should improve that some day.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's more to finetune on the technical side 😅 At this point it might also make sense to introduce an OcCard component, which then has a color prop for defining the background-color. We sometimes need that (most of the time we don't), and when we need it it always gets hacky.
Good spot, changed the nav highlighter to |
feat: revert material design color hacks
Description
Reverting color hacks that deviated our design away from material design. Download new theme.json and logos and test with a docker-compose overlay:
Download the following files and move them to the
web-themefolder (or whichever folder you mount into the dev stack)theme.json


Related Issue
Pre-requisite for merging our new theme in the opencloud repo, which will ultimately close #402 and works towards #513
Types of changes