-
Notifications
You must be signed in to change notification settings - Fork 732
refactor-remove-unused-css-variables #11576
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
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
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
This PR refactors CSS variables to remove unused or redundant variants and standardize the design system. It updates the @gitbutler/design-core package from version 1.5.1 to 1.6.0, which introduces a more granular hover state system and consolidates various background color variables. The changes replace deprecated variable names with their standardized equivalents throughout the codebase, including replacing hardcoded color values with proper design system variables and standardizing art/illustration CSS variable names.
Key Changes
- Introduces specific hover background variables (
--hover-bg-1,--hover-bg-2,--hover-bg-muted,--hover-danger-bg, etc.) to replace the generic--hover-bgand component-specific muted variants - Consolidates muted background variables from
--clr-bg-1-muted,--clr-bg-2-mutedto--clr-bg-mutedfor non-interactive states and--hover-bg-*for interactive states - Replaces hardcoded color values (like
#666) with design system variables (likevar(--clr-text-2)) - Standardizes art/illustration SVG color variables from numbered variants to simpler names
- Removes unused
CodegenSidebarEntry.sveltecomponent - Updates InfoMessage component API from 'error' to 'danger' style option
Reviewed changes
Copilot reviewed 64 out of 67 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Updates @gitbutler/design-core dependency from 1.5.1 to 1.6.0 across all packages |
| packages/ui/src/styles/core/variables.css | Replaces generic --hover-bg with specific hover variables for different background levels and semantic colors |
| packages/ui/src/styles/components/text-input.css | Updates disabled/readonly states to use --clr-bg-muted |
| packages/ui/src/lib/components/*.svelte | Multiple component files updated to use new hover background variables |
| apps/web/src/routes/**/*.svelte | Replaces hardcoded colors with design system variables and updates hover states |
| apps/desktop/src/components/**/*.svelte | Updates hover states, background colors, and removes unused component file |
| apps/desktop/src/lib/assets/empty-state/*.svg | Standardizes art-related CSS variable names in SVG illustrations |
| */package.json | Updates @gitbutler/design-core version in package manifests |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
This pull request focuses on updating the color variable usage throughout the desktop app to improve consistency, maintainability, and theming flexibility. Most changes involve replacing older or less descriptive CSS variables with new, more standardized ones (such as switching from
--clr-bg-1-mutedto--hover-bg-1). Additionally, there are minor UI tweaks to text styles and icon usage, and a full removal of theCodegenSidebarEntry.sveltecomponent.Color variable standardization and UI consistency:
Replaced various background and hover color variables (e.g.,
--clr-bg-1-muted,--clr-theme-danger-bg-muted,--clr-theme-pop-bg-muted, etc.) with new standardized variables like--hover-bg-1,--hover-bg-2,--hover-danger-bg,--hover-purple-bg,--clr-bg-muted, and--clr-theme-danger-bgacross many Svelte components for improved theming consistency. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19]Updated the
@gitbutler/design-coredependency from version1.5.1to1.6.0inpackage.jsonto align with the new color variable usage.UI and accessibility improvements:
Adjusted text styling and opacity in
ChromeHeader.sveltefor better visual hierarchy, including changing font weights and text colors for branch names and read-only indicators. [1] [2]Updated the external link icons in
GeneralSettingsModalContent.svelteto use a Unicode arrow instead of an SVG icon and adjusted the hover and icon styling for a cleaner look. [1] [2]Component removal:
CodegenSidebarEntry.sveltecomponent, including its script, markup, and styles, indicating a possible refactor or replacement elsewhere in the codebase.Note: There is a likely temporary/test change where a hover background is set to
redinBranchesCardTemplate.svelte, which may need review.