Repository navigation
feat: rebuild Preferences, typography and sidebar navigation on the shared colony-ui kit - #95
Merged
Merged
Conversation
…y-ui 0.1.6 Preferences are colony-ui's StandardPreferences, flattened into preferences.json under the field names it already had, applied at boot and changed through one Preference(Change) message. A file from 0.10.4 or older loses the accent it was given by default (blue), once, and keeps everything else; a prefs_version field remembers that the migration ran. The Preferences page is the kit's: General, Appearance, Accessibility, then Storage, Shortcuts and About. Appearance and Accessibility come from PreferencesView, with Colony's keyboard navigation between Motion and Reading. Fonts, text sizes and motion come from colony-ui: the bundled font files are gone, glyphs are drawn in the Nerd Font whatever the dyslexia setting, and every animation is gated on effects_enabled(). The sidebar is built from identity_button, nav_label, nav_item and nav_hint, selected by background, and grows with the text scale. Also: escaped glyphs in categories.json, Light/Dark from the palette's own lightness, badge text legible on light badges, the shields colour names in config/, and the English words and false claims left in the French interface.
validate-manifest's checks move to manifest.rs and the logging setup to logging.rs, unchanged. main.rs keeps the argument dispatch, the startup order and the iced launch. The exit codes every org release reads are now under test.
A glyph inside a label's string was drawn in the interface font, which is OpenDyslexic while the dyslexia font is on, and OpenDyslexic has none of them. Buttons now set the glyph and the label as two texts, and the two locale strings that carried a glyph no longer do.
HTTP streaming, file safety and archive extraction, digest and metadata verification, app install and launcher self-update each get a file, with their tests. A pure move: every item keeps its body and its doc comment, and download/mod.rs re-exports the same API. The architecture map, the contributor guide and release-signing.md point at the new paths.
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.
Why
Colony's Preferences page, fonts, text sizing and sidebar were the hand-written originals that colony-ui 0.1.6 now ships as a shared kit. Keeping both meant two copies drifting apart, and a few defects only Colony's copy had.
Changes
Preferences
colony-ui0.1.6 (iced stays at 0.14.0). The ten Appearance and Accessibility preferences are itsStandardPreferences, flattened intopreferences.jsonunder the field names the file already used, applied at boot and changed through a singlePreference(Change)message."selected_accent": "blue"for everyone who never picked an accent, and applied it over the theme's own. It becomes the theme's own accent, once: a newprefs_versionfield keeps a blue picked later. Values this build does not understand fall back to their defaults and the rest of the file is kept.PreferencesView, with Colony's keyboard navigation between Motion and Reading. Colony's own sections use the kit's collapsible sections, rows, dropdowns and toggles, and fold again when the page closes. The hand-written theme picker, the accent hex table and the white check marks are gone.en.rsandfr.rs.Typography, motion, navigation
src/ui/assets/fonts/is removed and the README links the licences in colony-ui.sz(), every font through its accessors (no synthesized weights). Nerd Font glyphs are drawn in the Nerd Font, apart from their labels, so they survive the dyslexia font. Markdown table headers, cells and badges follow the text scale; badge text iscontrast_onthe badge colour.effects_enabled().identity_button,nav_label,nav_itemstyling andnav_hint: selection by accent background withcontrast_ontext. Its width, like the category list's, grows with the text scale.categories.jsonwrites its glyphs as\uXXXXescapes, with a test. Light/Dark comes from the palette's own lightness rather than a local luma formula.French interface
Layout
validate-manifestmoves tomanifest.rs(output and exit codes unchanged, now under test) and the logging setup tologging.rs.main.rskeeps argument dispatch and the launch.download.rs(2068 lines) becomesdownload/withhttp.rs,files.rs,verify.rs,install.rsandlauncher.rs, a pure move with the tests next to their code.config/shields-colors.json; a colour string with a multi-byte character no longer panics the parser.docs/architecture.md,docs/tutorial.md,docs/faq.md,CONTRIBUTING.mdanddocs/release-signing.mdfollow.Testing
cargo test --bin colony: 164 passed locally, including the new 0.10.4 preferences fixture, the accent migration, the category order, key parity, escaped glyphs, shields colours andvalidate-manifestexit codes.