Skip to content

fix(icons): update video icons to hook into contextual theme#5702

Merged
jmuzina merged 1 commit intomainfrom
WD-31531-video-icon-theming
Dec 1, 2025
Merged

fix(icons): update video icons to hook into contextual theme#5702
jmuzina merged 1 commit intomainfrom
WD-31531-video-icon-theming

Conversation

@jmuzina
Copy link
Member

@jmuzina jmuzina commented Nov 26, 2025

Done

Updates some video icons (pause, play, stop, restart) to adapt to parent/contextual theme. Previously, they used an older (deprecated) theming system and did not adapt their colors when children of elements that used theme overrides (icons in light theme pages that are children of is-dark elements, for example).

Fixes #5700
Fixes WD-31531

QA

  • No visual diffs are expected in this PR because no current examples show these icons existing inside parents with them overrides. So, I have made codepens to demonstrate the changes.
    • Open before codepen demonstrating the icons not adapting to parent theme. Observe the icons, both inside and outside of the tooltips, and see that the icons inside dark-theme areas do not correctly use a light color, thus making them very hard to see.
    • Open after codepen demonstrating the same icons, now adapting to parent theme. Observe the icons, both inside and outside of the tooltips, and see that the icons always use paths that have a good contrast with the background (dark on light, light on dark).

Check if PR is ready for release

If this PR contains Vanilla SCSS or macro code changes, it should contain the following changes to make sure it's ready for the release:

  • PR should have one of the following labels to automatically categorise it in release notes:
    • Feature 🎁, Breaking Change 💣, Bug 🐛, Documentation 📝, Maintenance 🔨.
  • Vanilla version in package.json should be updated relative to the most recent release, following semver convention
    • if existing APIs (CSS classes & macro APIs) are not changed it can be a bugfix release (x.x.X)
    • if existing APIs (CSS classes & macro APIs) are changed/added/removed it should be a minor version (x.X.0)
    • see the wiki for more details
  • Any changes to component class names (new patterns, variants, removed or added features) or macros should be listed on the what's new page.

Screenshots

Before

2025-11-26_14-16

After

2025-11-26_14-16_1

@webteam-app
Copy link

@jmuzina jmuzina added Review: Percy +1 and removed Review: Percy needed This PR needs a review of Percy for visual regressions labels Nov 26, 2025
@jmuzina jmuzina marked this pull request as ready for review November 26, 2025 19:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR modernizes the theming system for four video control icons (play, pause, stop, restart) to enable proper contextual theming. Previously, these icons used a deprecated selector-based approach that failed to adapt their colors when nested within elements using theme overrides. The update refactors them to use the modern vf-themed-icon mixin based on CSS custom properties, ensuring the icons properly inherit theme colors from parent contexts and provide appropriate contrast in both light and dark themes.

Key Changes:

  • Refactored icon definitions to follow the three-part pattern (URL function, basic mixin, themed mixin)
  • Replaced deprecated selector-based theme switching with CSS custom property-based contextual theming
  • Updated dark theme color for play, pause, and stop icons from gray (#e5e5e5) to white for better contrast

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
scss/_patterns_icons.scss Simplified icon pattern mixins to use new -themed variants
scss/_base_icon-definitions.scss Added URL functions and refactored icon definitions to support contextual theming
package.json Bumped version from 4.37.1 to 4.37.2 for bug fix release

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@dgtlntv dgtlntv left a comment

Choose a reason for hiding this comment

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

LGTM :)

@jmuzina jmuzina merged commit 2b94b6d into main Dec 1, 2025
24 checks passed
@jmuzina jmuzina deleted the WD-31531-video-icon-theming branch December 1, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add color theme support to play, restart, pause, stop icons

5 participants