Repository navigation
fix: icons for the tick, arrows and close; autofocus on search and text fields - #32
Merged
Merged
Conversation
A checkbox's ✓, a menu's tick and its submenu's ▸, a select's ▾, a disclosure's
▸ and ▾ and a toast's ✕ were text, drawn only where the system's font has those
characters. Redox's (Fira) has none of them: each drew as a missing glyph's
box. They are unit's own icons now (`paths::CHECK`, `CHEVRON_RIGHT`,
`CHEVRON_DOWN`, `CLOSE`), stroked in the colour the text there had, so they look
the same with every font. A tick and a submenu's arrow keep no gap after them
in a menu row.
Behavioural-change: those marks are SVG icons; a test that found a submenu's
row by its text with the arrow ("Heading▸") finds it by its label alone.
…ge opens `autofocus` on SearchField and TextField, written as the element's `autofocus` attribute, which Blitz (with its `autofocus` feature) and a browser honour: a launcher's search takes what is typed as soon as its window opens.
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.
Two changes found building Redox's launcher on unit (orbital-ui, Blitz on Orbital).
Icons, not characters. A checkbox's ✓, a menu's tick and submenu ▸, a select's ▾, a disclosure's ▸/▾ and a toast's ✕ were text, drawn only where the system's font has those characters. Redox's font (Fira) has none of them, so each drew as a missing-glyph box. They are unit's own icons now (
paths::CHECK,CHEVRON_RIGHT,CHEVRON_DOWN,CLOSE), stroked incurrentColor, so they keep the colour the text had. In a menu row, a tick and a submenu arrow keep no gap after them (.unit-item .unit-svg's margin). The Blitz test that found the "Heading" submenu row by "Heading▸" finds it by "Heading".autofocusonSearchFieldandTextField, written as the element's attribute: Blitz (with itsautofocusfeature) and a browser give that field the keys when the page opens. Defaults to off.Checked on Redox:
cargo fmt --check,cargo clippy --workspace --all-targets -D warningsandcargo test -p unit(79 passed). The gallery's Blitz tests don't link there (OpenSSL's static libcrypto wants zlib), so those are CI's to run. On Orbital, a launcher usingSearchField { autofocus: true }takes typing at once, and the search and clear icons draw.Behavioural-change: those marks are SVG icons instead of text;
autofocusis a new optional prop.