Repository navigation
text: Support list and blockquote style overrides - #3687
Merged
huacnlee merged 2 commits intoOct 26, 2026
Merged
Conversation
citizenhicks
marked this pull request as ready for review
October 25, 2026 11:51
Rename list_marker_style to list_style, including the Base style builder and reader, Component facade, tests and both documentation locales. Preserve rendering behavior. AI-assisted rename and validation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add
list_style(StyleRefinement)andblockquote_style(StyleRefinement)overrides toTextView, followinginline_code_stylefrom #3663. Each refinement applies after the resolved theme or explicit style and surface-color adaptation; unspecified properties keep the existing defaults, and explicit refinements stay unchanged on inverted surfaces.Defaults are empty refinements, so rendering is unchanged unless an override is set. Code blocks, tables, rules, and done tasks keep the shared
muted_foregroundandbordercolors. The public ComponentTextViewStylefields are unchanged. English and Chinese Base and Component docs describe both overrides.Example
Public API
gpui-base
TextViewStyle::with_list_style(self, style: StyleRefinement) -> Self— Set explicit list refinements.TextViewStyle::list_style(&self) -> &StyleRefinement— Read the explicit list refinement.TextViewStyle::with_blockquote_style(self, style: StyleRefinement) -> Self— Set explicit blockquote refinements.TextViewStyle::blockquote_style(&self) -> &StyleRefinement— Read the explicit blockquote refinement.TextView::list_style(self, style: StyleRefinement) -> Self— Refine list markers over the resolved style.TextView::blockquote_style(self, style: StyleRefinement) -> Self— Refine blockquotes over the resolved style.gpui-component
text::TextView::list_style(self, style: StyleRefinement) -> Self— Apply the list override through the Component facade.text::TextView::blockquote_style(self, style: StyleRefinement) -> Self— Apply the blockquote override through the Component facade.Breaking Changes
None. The additions are new builders and readers; existing APIs, defaults, and public Component style fields are unchanged.
The list API is named after the Markdown List block; its rendering scope is described above.
How to Test
cargo test -p gpui-base --features test-support --lib text::— covers the empty defaults, builders, style equality, refinements kept on an inverted surface, and a render test that the view-level refinements keep properties set on the globalTextViewDefaultsstyle. A renderer regression checks that nested table columns are measured with the blockquote's font family and weight.cargo test -p gpui-component --features test-support textcargo clippy -p gpui-base -p gpui-component --locked -- --deny warningscargo fmt --check -p gpui-base -p gpui-componentlist_style(StyleRefinement::default().text_color(..))andblockquote_style(StyleRefinement::default().border_color(..)). Only the markers, unchecked checkbox outlines, and the quote bar change color.Validation: targeted text tests passed (400 Base and 69 Component). Clippy with warnings denied, package formatting, and
git diff --checkpassed. Manual visual and cross-platform checks were not run.Rename validation: Base and Component test targets compiled with
cargo check -p gpui-base -p gpui-component --features gpui-base/test-support,gpui-component/test-support --tests --locked.cargo fmt --all --checkandgit diff --checkpassed. No tests were rerun for the naming-only revision. The rename, documentation updates, and compilation checks were AI-assisted.Checklist
cargo runfor story tests related to the changes.Implementation, tests, and documentation were generated with AI assistance and reviewed by the author.