Skip to content

Replace custom images with Themable Codicons #448

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

JustinGrote
Copy link

@JustinGrote JustinGrote commented Mar 7, 2025

Implements VSCode Themable Icons and Themable Colors mostly based on the newer Testing icons to produce a cleaner, more consistent and integrated visual look and feel, which can also be themed by theme authors accordingly.

Includes #450 as a dependency

Recording.2025-03-07.121526.mp4

Screenshot 2025-03-07 063213
Screenshot 2025-03-07 063730

Supporting changes:

  1. Bump node/vscode/eslint/typescript to latest supported release to take advantage of latest API features
  2. Add ts-pattern package for pattern matching of icon status to replace convoluted switch statements

@JustinGrote JustinGrote marked this pull request as ready for review March 7, 2025 14:45
@Copilot Copilot AI review requested due to automatic review settings March 7, 2025 14:45
@JustinGrote JustinGrote requested a review from a team as a code owner March 7, 2025 14:45
Copy link

@Copilot 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.

PR Overview

This PR replaces custom image-based icons with VSCode Themable Codicons to provide a cleaner, more consistent visual style that supports theming. Key changes include:

  • Introducing new type definitions for VSCode theme icons and theme colors.
  • Migrating existing icon lookup functions from custom images to a pattern‑matching based themable icon function.
  • Updating all relevant tree view nodes to use the new themable icon API.

Reviewed Changes

File Description
eslint.config.mjs Added ESLint configuration utilizing the latest TS/JS linting settings
src/treeViews/shared/vscodeThemeIcon.ts Introduces a union type for supported VSCode testing theme icons
src/treeViews/shared/vscodeThemeColor.ts Introduces a union type for supported VSCode testing theme colors
src/treeViews/icons.ts Migrates icon mapping to use ts‑pattern for themable icons
src/treeViews/shared/workflowRunNode.ts Updates icon lookup to use the new themable icon function
src/treeViews/shared/attemptNode.ts Updates icon lookup to use the new themable icon function
src/treeViews/shared/workflowJobNode.ts Updates icon lookup to use the new themable icon function
src/treeViews/workflows/workflowStepNode.ts Updates icon lookup to use the new themable icon function

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

Comments suppressed due to low confidence (1)

src/treeViews/icons.ts:33

  • [nitpick] The mapping for the 'cancelled' status reuses the theme color for skipped states. Consider reviewing if this is intentional or if a dedicated themable color should be used, and add a clarifying comment if necessary.
.with({status: "completed", conclusion: "cancelled"}, () => ["circle-slash", "testing.iconSkipped"])

@JustinGrote JustinGrote force-pushed the feature/themable-icons branch 2 times, most recently from 8c69d50 to 6b26bb5 Compare March 8, 2025 20:11
@JustinGrote
Copy link
Author

@AnthonyBorton please review, thanks :)

- Bump latest esbuild version explicity
- Set CI Node to VSCode 1.98.0 Node Version
- Fixup vscode tooling and enable format-on-save
- Apply prettier configuration for whitespace remediation
- Suppress new typescript warnings from newer TS version, to be fixed later
@JustinGrote JustinGrote force-pushed the feature/themable-icons branch from 6b26bb5 to c4d1902 Compare March 12, 2025 01:45
@JustinGrote JustinGrote force-pushed the feature/themable-icons branch from c4d1902 to 1a2679d Compare March 12, 2025 01:46
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.

1 participant