Onboarding · Help: help panel, cheatsheet, what's new, feedback, support, inline help

HelpPanel searches articles and opens one, its body in Markdown, with a
way back; focus follows to All articles and back to the search, a
link to help:<key> opens another, and Contact support and Keyboard
shortcuts wait at its foot. KeyboardShortcutCheatsheet puts
settings::KeyboardShortcutsList in a dialog with its search focused;
WhatsNewDialog puts data_display::Changelog in one with Got it.
FeedbackWidget asks how it is going with four faces and a note, and
thanks. ContactSupport sends a topic and a message, spins while the
owner sends, and empties the message with focus back in it. InlineHelp
is a quiet line with Learn more. HelpTooltip moves to primitives,
where FormLabel's help mark shows it; ToggleGroup keys its toggles by
its own id. EmptyStateWithAction points to feedback::EmptyState.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-09-27 15:05:06 -04:00
1 parent a066179699
commit 5f5e2f73e1
20 files changed
+1662 -122

No files matched your search

+3
View File
@@ -162,6 +162,7 @@ icons! {
Folder => "folder",
Forward => "forward",
Frame => "frame",
Frown => "frown",
Fullscreen => "fullscreen",
Gauge => "gauge",
GitBranch => "git-branch",
@@ -195,6 +196,7 @@ icons! {
Key => "key",
Keyboard => "keyboard",
Languages => "languages",
Laugh => "laugh",
Layers => "layers",
LayoutDashboard => "layout-dashboard",
LayoutGrid => "layout-grid",
@@ -214,6 +216,7 @@ icons! {
MapPin => "map-pin",
Map => "map",
Maximize2 => "maximize-2",
Meh => "meh",
MemoryStick => "memory-stick",
Menu => "menu",
Merge => "merge",
+1 -1
View File
@@ -29,4 +29,4 @@ pub use layer::{Raised, raise};
pub use measure::{IntersectionObserver, Measure};
pub use pressable::Pressable;
pub use severity::Severity;
pub use tooltip::{Tooltip, TooltipTrigger};
pub use tooltip::{HelpTooltip, Tooltip, TooltipTrigger};
+32 -2
View File
@@ -7,10 +7,10 @@ use gpui::{
prelude::*,
};
use super::raise;
use super::{Icon, IconName, raise};
use crate::{
motion,
theme::{ActiveTheme, Elevation, Radius, TextSize},
theme::{ActiveTheme, Elevation, IconSize, Radius, TextSize},
};
type Content = Rc<dyn Fn(&mut Window, &mut App) -> AnyElement>;
@@ -193,3 +193,33 @@ fn hide(trigger: &mut TriggerState, cx: &mut Context<TriggerState>) {
trigger._pending = None;
cx.notify();
}
/// A help mark, ?, whose tip shows on hover.
#[derive(IntoElement)]
pub struct HelpTooltip {
id: ElementId,
text: SharedString,
}
impl HelpTooltip {
pub fn new(id: impl Into<ElementId>, text: impl Into<SharedString>) -> Self {
Self {
id: id.into(),
text: text.into(),
}
}
}
impl RenderOnce for HelpTooltip {
fn render(self, _: &mut Window, cx: &mut App) -> impl IntoElement {
div()
.id(self.id)
.flex_none()
.child(
Icon::new(IconName::CircleHelp)
.size(IconSize::Xs)
.color(cx.theme().colors.fg_subtle),
)
.tooltip(Tooltip::text(self.text))
}
}