Skip to content

feat: add French, the Colony Preferences page and shared themes, and move Spotter's files to the standard Colony folders - #30

Merged
MotherSphere merged 9 commits into
mainfrom
feat/colony-design-system
Oct 12, 2026
Merged

MotherSphere merged 9 commits into
mainfrom
feat/colony-design-system

Conversation

@MotherSphere

@MotherSphere MotherSphere commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Spotter now follows the shared Colony design system end to end: its files live in the standard Colony folders, every screen is drawn from the shared themes and text sizes, Settings became the Colony Preferences page, and the whole interface is available in French.

Files in the standard Colony folders

  • Paths come from colony_ui::paths (Colony/Spotter/ under the platform's config, data and cache folders), one sub-folder per kind of file: <config>/preferences/preferences.json, <config>/credentials/, <data>/library/spotter.db, <data>/exports/, <data>/logs/, <cache>/covers/ and <cache>/achievement_icons/. The old base_path family and its fallback to the working directory are gone.
  • The first start copies the library, exports and log of Spotter 0.3 and earlier (never moves or deletes them), writes a marker so it happens once, and keeps using the old files if the copy fails.
  • Preferences moved from the database to preferences.json, with the shared StandardPreferences flattened in. The old settings row is imported once: the Dark, Darker and Midnight themes, the six accents and the interface scale map to the nearest shared theme, accent and text size.
  • After a failed load, nothing is written, preferences.json included.
  • Without a system keyring, tokens go to <config>/credentials/tokens.json (0600 on Unix).

Shared themes and typography

  • Every colour comes from the active Colony palette. Platforms and statuses use shared accent swatches, and text on a fill uses contrast_on. No colour literal is left in src: the grep git grep -nE 'Color::from_rgba?8?\(|Color \{ *(r|a|g|b):|Color::(WHITE|BLACK)|#[0-9a-fA-F]{6}\b' -- src finds nothing.
  • The fonts come from colony-ui, with their licences. assets/fonts is gone.
  • Every text is sized with sz(), so both text-size preferences reach it, and the dyslexia font reaches Spotter's own text too. No raw size is left: git grep -nE '\.size\([0-9]' -- src finds nothing. The window-wide UiScale is gone.
  • With effects off or reduced motion on, an import adds its games at once instead of cascading them, and the import banner's dots stop moving.

The Preferences page

  • Clicking Spotter at the top of the sidebar opens Preferences in place of the current screen. Clicking it again, Close or Esc goes back to the screen it was opened from.
  • General, Appearance and Accessibility come from the colony-ui kit. Spotter's own Library and Imports categories follow. Sections are collapsible and start closed. Changing the theme raises the "Theme applied." notification, and notifications can be dismissed with a click.
  • Spotter's own options:
    • General: language, start screen, notifications and date format.
    • Appearance: a Layout section (sidebar width, compact list, covers).
    • Accessibility: Color cues (status labels) and Navigation (large click targets).
  • The sidebar follows the Colony order: the name, a list label, the sections, then a keyboard hint.

French

  • Every interface string goes through src/i18n. Spotter's own strings are in en.json and fr.json (342 keys each). The shared labels come from colony_ui::i18n.
  • Plurals, decimals and percentages follow the language.
  • The language follows the system (LC_ALL, LC_MESSAGES, LANG) until one is picked in General.
  • Game statuses keep their English name in the database. The import banner and log no longer find failures by searching their text for "error".
  • The Steam login page shown in the browser is translated and served as UTF-8.
  • Tests fail the build when:
    • the two files hold different keys,
    • a string is empty,
    • the placeholders differ between the two languages,
    • a key that is used is missing, or a key is never used,
    • a key repeats a shared colony-ui label.

Notes

  • colony-ui is pinned at 0.1.6 and iced stays at 0.14.
  • The README, docs/CONFIGURATION.md and the other docs follow the new paths, the Preferences page and the languages.
  • The remaining em and en dashes in code comments and log lines are gone (a \u{2014} escape keeps the one test that checks a legacy "no date" value).
  • Platforms and statuses take a fixed shared accent key rather than app_tint: its name hash gives Steam and PlayStation the same red, and Epic and Nintendo the same indigo.
  • Some technical details from the platform services are not translated. When a network request fails, the service's own error text appears inside a translated message.

Checks

  • cargo check --all-targets: no warnings.
  • cargo test --lib --test unit_tests on Linux passes (67 + 56 tests), including the new tests (paths migration, preferences import, Preferences toggle, reduced motion skipping the import cascade, i18n tables).
  • git grep -nP '\x{2014}|\x{2013}' -- src tests finds nothing.
  • The full CI matrix runs on this PR.

Paths come from colony_ui::paths (config, data and cache under
Colony/Spotter/), one sub-directory per kind of file: the library in
<data>/library/, exports and the automatic backup in <data>/exports/, the
import log in <data>/logs/, covers and achievement icons in the cache. The
hand-built base path and its working-directory fallback are gone.

The first start copies the library (with SQLite, write-ahead log
included), exports and log of Spotter 0.3 and earlier, never moves or
deletes them, writes a marker so the copy runs once, and keeps using the
old files if the copy fails.

Preferences now live in <config>/preferences/preferences.json, with the
shared Colony preferences (colony_ui::preferences::StandardPreferences)
flattened in. The settings row of the old database is imported once:
Spotter's three dark themes, six accents and interface scale map to the
closest shared theme, accent and text size. A preferences file that is not
JSON fails the load, so nothing is written over it.

Without a usable OS keyring, platform tokens go to
<config>/credentials/tokens.json (0600 on Unix) instead of the database;
the database columns are emptied only once the file was written and read
back.

The shared theme, accents, high contrast and the Colony fonts (embedded by
colony-ui, licences included) replace Spotter's own, and the Appearance and
Accessibility settings use the shared sections.
Spotter no longer defines colours. Every widget reads the active Colony
palette (colony_ui::theme::Palette) where it is drawn, so the theme, the
accent and high contrast picked in the settings reach every screen, light
themes included:

- theme.rs loses its colour constants and lighten(); its style helpers take
  palette colours, outline inactive controls with the ink so they show on
  cards and on the page, and label filled buttons with contrast_on.
- ViewTheme is gone; views call Palette directly.
- Platforms and game statuses use the shared accent swatches, distinct and
  the same on every theme (app_tint would give Steam and PlayStation the
  same red).
- Text uses the palette's ink ramp instead of white and invented greys;
  hover states use the palette's hover surfaces instead of white overlays
  that vanished on light themes.
- The two delete confirmations share one modal, the filter, sort, status
  and rating chips share one chip style, and the library card highlights
  on hover.
- The page the browser shows after a Steam login uses the same palette.
…ia font

All of Spotter's text now goes through theme::ui_text(content, base): the
size is colony_ui::sz(base), the product of the Appearance and
Accessibility text sizes (0.7225x to 1.68x), and the font is
colony_ui::ui_font(), so turning on the dyslexia font changes every label
at once instead of only the shared sections. Nerd Font glyphs inside a
label are set in the glyph font, which OpenDyslexic lacks. Text inputs and
the toggles follow the same sizes, and the empty placeholder texts are
plain spaces.
…duced

The cascade that adds newly imported games a few at a time is an
animation, so it now follows colony_ui::effects_enabled(): with effects
off or reduced motion on, every new game lands in the library at once.
The moving dots of the import banner stand still in that case too.
The toasts, the window title and three labels used em dashes; they now use a full stop, a colon or a comma, and the window title is just Spotter.
…potter into French

Preferences:
- Clicking Spotter at the top of the sidebar opens the shared Colony
  Preferences page in place of the current screen; clicking it again, Close
  or Esc goes back to the screen it was opened from.
- General, Appearance and Accessibility come from the colony-ui kit, then
  Spotter's own Library and Imports. Every section is collapsible and starts
  closed. Changing the theme raises the "Theme applied." notification.
- The sidebar follows the Colony order: a list label, the sections, then a
  keyboard hint. Notifications can be dismissed with a click.
- Settings, SettingsMessage and the settings modules are now Preferences.

French:
- Every interface string goes through src/i18n: en.json and fr.json for
  Spotter's own strings, colony_ui::i18n for the shared ones. Plurals,
  decimals and percentages follow the language.
- The language follows the system until one is picked in General.
- Game statuses keep their English name in the database and are shown
  through GameStatus::label; sort orders, date formats, durations and
  achievement displays have translated labels too.
- The import banner and log tell failures by type, not by searching the
  text for "error".
- The Steam login page in the browser is translated and served as UTF-8.
- Tests: both files hold the same keys, no string is empty, placeholders
  match, every key used exists and every key is used, and no key repeats a
  shared label.
@MotherSphere
MotherSphere merged commit 5effd33 into main Oct 12, 2026
4 checks passed
@MotherSphere
MotherSphere deleted the feat/colony-design-system branch October 12, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant