Skip to content

fix(design-system): stop raw buttons from filling stroke-only shapes in resource icons - #3575

Merged
AlexAndBear merged 1 commit into
mainfrom
fix/resource-icon-stroke-fill
Oct 7, 2026
Merged

AlexAndBear merged 1 commit into
mainfrom
fix/resource-icon-stroke-fill

Conversation

@AlexAndBear

Copy link
Copy Markdown
Member

Description

Some file type icons were drawn with dark (light mode) or light (dark mode) filled shapes in the tiles view, e.g. the paint brush of the Excalidraw / graphic icon.

  • Cause: OcButton sets fill: var(--oc-button-color) on .oc-icon > svg in raw buttons (OcButton.vue:239-241). That overrides the fill="none" on the root of the resource icon SVGs, and shapes that only have a stroke inherit the button color as their fill.
  • Fix: give the stroke-only shapes their own fill="none", so they no longer inherit a fill from outside. Affected icons: graphic (odg, excalidraw), jupyter (+ dark), dicom, code (+ dark).
  • Why not in OcButton: excluding resource icons there would make the design system depend on the oc-resource-icon class from web-pkg; fixing the SVGs keeps the icons correct wherever they are rendered.
Before After
Light Before light After light
Dark Before dark After dark

The code icon looked correct in this tiles view (a .js tile is not rendered inside a raw button here), but its SVG has the same stroke-only path, so it gets the same fix.

Related Issue

How Has This Been Tested?

  • test environment: local dev server, Chromium, light and dark theme
  • test case 1: folder with .excalidraw, .ipynb, .dcm and .js files in tiles view → brush, notebook, X-ray and code icons are drawn as outlines, no filled shapes
  • test case 2: computed fill of the stroke-only shapes is none in light and dark mode (before: rgb(32, 67, 79) / rgb(179, 202, 212))

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear AlexAndBear self-assigned this Oct 7, 2026
@AlexAndBear

Copy link
Copy Markdown
Member Author

"Same but different" on demo in the new menu

image

@AlexAndBear
AlexAndBear merged commit 393175e into main Oct 7, 2026
33 checks passed
@AlexAndBear
AlexAndBear deleted the fix/resource-icon-stroke-fill branch October 7, 2026 09:17
@openclouders openclouders mentioned this pull request Oct 7, 2026
1 task
openclouders pushed a commit that referenced this pull request Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants