Conversation
Co-authored-by: Xuan Zhang <xuan@arcbox.dev>
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Address the Outline inset issue and add GroupBox variant coverage.
Review effort: Lite
Findings: None
What changed in this PR
Adds optional footers to GroupBox and SettingGroup, keeping footer content outside group surfaces while preserving settings filtering and scrolling.
Changes:
- Added
GroupBox::footerandSettingGroup::footerAPIs. - Added search-visibility regression coverage.
- Updated stories and English/Chinese documentation.
| File | Reviewed changes |
|---|---|
website/zh-CN/component/settings.md |
Documents SettingGroup footers in Chinese. |
website/zh-CN/component/group-box.md |
Documents GroupBox footers in Chinese. |
website/component/settings.md |
Documents the SettingGroup footer API. |
website/component/group-box.md |
Documents the GroupBox footer API. |
crates/story/src/stories/settings_story.rs |
Demonstrates settings footers. |
crates/story/src/stories/group_box_story.rs |
Demonstrates GroupBox footers. |
crates/component/src/setting/tests.rs |
Tests footer visibility during filtering. |
crates/component/src/setting/group.rs |
Exposes callback-based setting footers. |
crates/component/src/group_box.rs |
Adds variant-aware footer rendering; the Outline inset should account for the surface border, with automated coverage for all variants. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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
Settings sometimes need supporting text below a group, outside its background or border. A custom
SettingItemstill renders inside that surface.This adds an optional footer to
GroupBoxand exposes it throughSettingGroup. The footer uses the variant's default horizontal content inset; callers control its typography and color. In Settings, it scrolls and filters with its group without adding a sidebar entry or independently searchable item.Existing groups without footers are unchanged. Includes gallery examples, English/Chinese documentation, and a search-visibility regression test. No
gpui-basechanges.Public API
gpui-componentAdds supporting content below and outside the group's surface.
Renders a group footer using the current window and application context.
Both additions are optional and backward compatible.
Screenshot
How to Test
Passed on Linux with Rust 1.98.1:
cargo fmt --all -- --check cargo test -p gpui-component --locked cargo clippy -p gpui-component -p gpui-component-story \ --all-targets --no-default-features --locked -- -D warnings cargo build -p gpui-component-story --no-default-features --locked python3 script/check-ai docs git diff --check