Mark topbar nav arrows as visibly disabled until history wires up
The back/forward arrows in the topbar were styled as live buttons (cursor_pointer, hover swap) but they had no on_click — they were clickable affordances that did nothing. Per the "no fake handlers" rule that's worse than no button at all: it lies to the user. Pull the cursor and hover off, drop the text color to INK_5 so they read as the design's `disabled` state (`var(--ely-ink-5)`), and leave them untouched until real per-tab history lands in BrowserCore. When the navigation API arrives the call site can swap to a live variant.
This commit is contained in:
@@ -203,6 +203,11 @@ where
|
||||
.into_any_element()
|
||||
}
|
||||
|
||||
/// Topbar nav arrow placeholder. Per-tab back/forward history is not yet
|
||||
/// wired through `BrowserCore`, so the buttons render in the design's
|
||||
/// `disabled` state — visible at INK_5, no hover, no cursor pointer —
|
||||
/// to honor the "no fake handlers, no mockup" rule. When real history
|
||||
/// navigation lands the caller can flip these to a clickable variant.
|
||||
fn render_nav_arrow(id: &'static str, icon: IconName) -> AnyElement {
|
||||
div()
|
||||
.id(SharedString::from(id))
|
||||
@@ -211,10 +216,7 @@ fn render_nav_arrow(id: &'static str, icon: IconName) -> AnyElement {
|
||||
.flex()
|
||||
.items_center()
|
||||
.justify_center()
|
||||
.cursor_pointer()
|
||||
.text_color(rgb(colors::INK_3))
|
||||
.hover(|style| style.bg(rgba(OMNIBAR_BG)).text_color(rgb(colors::INK)))
|
||||
.active(|style| style.opacity(0.82))
|
||||
.text_color(rgb(colors::INK_5))
|
||||
.child(icon)
|
||||
.into_any_element()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user