Conventions
The house rules every change follows: siblings, settings helpers, words, the guide and permanent web addresses.
These rules come from the app's CLAUDE.md. Follow them in every change, by hand or with an AI helper.
Siblings#
Most features come in pairs: one for events, one for tasks. Before changing either half of a pair, open its sibling and match it: placement, row order, spacing, label and tooltip wording, and the helper it is built with.
| Events | Tasks |
|---|---|
Settings › Active calendars (page_active) | Settings › Task lists (page_lists) |
| Default calendar | Default task list |
the event editor (event_form) | the task editor (task_form) |
the Event tab of the new block window (dlg_create) | its Task tab |
Both settings pages are topped by collection_top. Both editors are in src/dialogs.rs.
A change is finished when a picture of each sibling shows the same layout (see Testing). A new feature with an events half and a tasks half gets both, built alike, and a line in the app's CLAUDE.md.
Settings helpers#
Build settings rows from the helpers in src/settings.rs:
| Helper | What it draws |
|---|---|
heading | a page's or a section's title |
row | a named setting with its tooltip and (i) |
combo | a dropdown |
add_row | a name field with a "+ Add …" button |
collection_top | title, description, default picker and add row |
row_lead | the show box and colour button in front of a calendar's or list's name |
color_button | that colour button alone, as on the Tags page |
When two pages need the same widget, it becomes a helper there.
Words#
Every text a person reads goes through strings.rs:
| Call | Use it for |
|---|---|
tr("Save") | plain text |
trf("Could not reach the server ({}).", &[&e]) | text with values filled in; {n} picks a value by number, and {{ is a plain brace |
trn(n, "{} open task", "{} open tasks", &[&n]) | text that counts something, so 1 reads "1 open task" |
later("…") | text in a const table, translated when it is shown |
strings::english(text) gives back the English words. Settings rows use it for their guide link.
Translations go in a file under src/strings/ and into CATALOGS. There are none yet. The language comes from KATLENDAR_LANG, then LC_ALL, LC_MESSAGES and LANG.
Write words the way the rest of the app does: plain, short, and saying what to do next.
The guide#
A feature that works in an unusual way gets an (i) beside its name. A new (i) or settings row needs its heading on the guide page, and the heading goes into REQUIRED. See Guide links.
A change people can see also needs its guide page updated, in the site repo.
Web addresses#
The app links only to addresses on katlendar.date. Copies already installed keep them forever, so they never change or go away. The site sends each one on to wherever its page lives.
| Address | In the app |
|---|---|
https://katlendar.date/releases.json | update::FEED |
https://katlendar.date/download | update::RELEASES_PAGE |
https://katlendar.date/help/google, /help/microsoft | older copies' sign-in guides; the site sends them to the guide |
https://katlendar.date/guide/ | guide::HOME |
https://katlendar.date/guide/<page>/#<heading> | guide::url |
A new link in the app gets a new address on katlendar.date, a line in the app's CLAUDE.md and a row in the site's README.
The exceptions are addresses of other services the app talks to: GitHub's API as the update check's fallback, sign-in pages, and calendar and map servers.
Commits and pull requests#
- Work on a branch and open a pull request to
main. - CI runs
cargo teston Linux andcargo checkon Windows and macOS. It must pass before merging. - Keep
.claude/out of git.