Skip to content

simplify colors no opacity - #634

Merged
Havunen merged 14 commits into
devfrom
feat/disabled-colors-no-opacity
Oct 18, 2026
Merged

Havunen merged 14 commits into
devfrom
feat/disabled-colors-no-opacity

Conversation

@Havunen

@Havunen Havunen commented Oct 18, 2026 •

Copy link
Copy Markdown
Member
  • Shared disabled colors. Translucent colors get half their alpha; opaque colors blend halfway toward the theme’s panel background while staying opaque. One interaction style/state pair controls the dimming. See theme.rs (crates/gitcomet-ui-kit/src/theme.rs:462) and interaction.rs (crates/gitcomet-ui-kit/src/interaction.rs:249).
  • Button decorations dim consistently. Buttons now accept typed ButtonSlot values for icons, spinners, shortcut keys, and custom content. Built-in slots dim automatically; custom builders receive the dimming state and handle their own colors. Callers across toolbars and dialogs were migrated. See button.rs (crates/gitcomet-ui-kit/src/components/button.rs:33).
  • Disabled settings and filters use that shared behavior. The environment-locked update-check toggle now has a proper disabled state, including dimmed switch parts and no hover highlight. History chips and file filters also compute their disabled colors explicitly. See settings_rows.rs (crates/gitcomet-ui-kit/src/components/settings_rows.rs:361).
  • Source guards prevent opacity from creeping back. Kit, media, and terminal code prohibit element opacity; the app keeps an explicit allowlist for remaining animations and row effects. The scanner also fixes a blind spot where an external test module caused subsequent production code to be skipped. See render_guards.rs (crates/gitcomet-ui-gpui/src/render_guards.rs:261).
  • Small cleanup. The empty tab-drag preview loses its unnecessary zero opacity, and redundant cursor settings are removed where the interaction helper already supplies them.

Havunen and others added 11 commits October 18, 2026 12:02
gpui-ce is turning element opacity into offscreen groups that defeat
partial redraw, so disabled controls now paint computed colours instead
of `.opacity(0.5)`. AppTheme::disabled_color halves a translucent
colour's alpha and mixes an opaque one toward the panel surface.

InteractionStyle::disabled_opacity becomes the opt-in dim_when_disabled
plus InteractionStyle::color, so one style/state pair decides a
control's fills, text, borders and icons. Button slots are a typed
ButtonSlot (icon, spinner, keycaps, or a custom builder that receives
the disabled state), so slot content dims with the button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Button slots now ask the same InteractionStyle/state pair as the
button's own colours, through the new InteractionStyle::dims, so one
decision covers both. Test helpers share colour_close.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The update-check row locked by the environment used `.opacity(0.6)`.
It is now a kit settings_disabled_toggle_row: a disabled interaction
state whose label, separator, track and knob dim through the shared
InteractionStyle colour, and which no longer shows a hover highlight.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gpui-ce turns any opacity below 1.0, zero included, into a
viewport-sized offscreen group. The empty 1px carrier paints nothing
without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The kit has no element opacity left; the app's remaining uses are
listed by file and count, so a new one, or an entry nothing needs any
more, fails a source guard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
production_sources stopped at the first `#[cfg(test)]\nmod tests`,
including an out-of-line `mod tests;`, so the kit's source guards never
saw the rest of about a dozen files. Both scanners now share
production_text, which ends only at an inline test module.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The guard now also counts `Some` writes to an `opacity` field, names the
gpui-ce change (#330) it guards against, groups the app's allowlist by
reason, and runs over the terminal and media crates as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
InteractionStyle::apply sets the cursor on every path, so a `.cursor()`
earlier in the same element's chain never takes effect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Havunen
Havunen marked this pull request as ready for review October 18, 2026 11:07
Havunen and others added 3 commits October 18, 2026 14:55
The gpui-ce bump re-resolved bindgen 0.73.2 onto syn 2 while its
prettyplease 0.3 stays on syn 3. bindgen passes a syn::File between the
two, so the macOS build failed with E0277. Linux never builds bindgen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cla-assistant

cla-assistant Bot commented Oct 18, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ Havunen
❌ Sampo Kivistö


Sampo Kivistö seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Havunen
Havunen merged commit b9f9916 into dev Oct 18, 2026
24 of 25 checks passed
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