Add gate_overlay primitive + icon_text_button for auth-gated chrome - #24
Merged
Conversation
TokitoAI/tokito #523: the chat panel needs a designed sign-in gate instead of a bare inline error line when the AI gateway returns 401. - icon_text_button: text_button with a leading Phosphor glyph, sharing the same fill/ink/border visuals via a new button_visuals() helper (text_button refactored onto the same helper, no behavior change). - gate_overlay: a full-bleed gated/locked state — heavy scrim (egui has no real backdrop blur, so a near-opaque base + a soft two-ring accent glow approximates depth), a centred brand tile with a small corner badge glyph, a display-weight heading, a muted subline, and a primary CTA. Generalized: icon/heading/body/button label are caller-supplied and it returns whether the CTA was clicked, so any future gated/empty chrome state can reuse it — not just the Tokito Cloud sign-in gate. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
4 tasks
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.
Summary
icon_text_button:text_buttonwith a leading Phosphor glyph — shares fill/ink/border visuals withtext_buttonvia a new privatebutton_visuals()helper (refactored, no behavior change totext_button).gate_overlay: a full-bleed gated/locked state primitive — heavy scrim (egui has no real backdrop blur, so a near-opaque base fill + a soft two-ring accent glow approximates depth), a centred brand tile with a small corner badge glyph, a display-weight heading (TextStyle::Heading), a muted subline, and a primary CTA button. Generalized: icon/heading/body/button label are all caller-supplied, and it returns whether the CTA was clicked — so any future gated/empty chrome state can reuse it.Why
TokitoAI/tokito#523 needs a designed auth-gate state for the chat panel when the AI gateway returns HTTP 401, replacing a bare italic error line. Per
memory/ui-design-language.md's STRICT rule, the new primitive lands here first; tokito wires it up as the consumer in a follow-up PR (pinned to this branch's SHA during co-development, then repinned to the merge commit once this lands onmaster).Test plan
cargo buildcargo fmt --all -- --checkcargo clippy --all-targets -- -D warningsRUSTDOCFLAGS="-D warnings" cargo doc --no-deps#[cfg(test)]incomponents.rs, notests/dir, CI doesn't runcargo test) — matched by not adding one; components are verified via the consuming app.🤖 Generated with Claude Code