Skip to content

[persons] Add display preference fields to the person model#1160

Merged
frankrousseau merged 2 commits into
cgwire:mainfrom
frankrousseau:add-person-display-preferences
Jul 13, 2026
Merged

[persons] Add display preference fields to the person model#1160
frankrousseau merged 2 commits into
cgwire:mainfrom
frankrousseau:add-person-display-preferences

Conversation

@frankrousseau

Copy link
Copy Markdown
Contributor

Problem

Solution

  • Add use_12_hour_clock (boolean, default false) and display_date_format (string, default YYYY-MM-DD) to the person model, editable by each person on their own profile
  • Reject unsupported display_date_format values (outside YYYY-MM-DD, DD/MM/YYYY, MM/DD/YYYY) with a 400 on creation and update
  • Nullable migration so existing rows keep working; clients fall back to the 24-hour clock and the ISO format

frankrousseau and others added 2 commits July 13, 2026 10:35
Two per-user display preferences surfaced in the Kitsu profile page:
an opt-in 12-hour clock and the format used for displayed dates. Both
are first-class person fields, validated on creation and update, so
they follow the user across browsers and stay editable by the person
on their own profile. Existing rows read as NULL and the clients fall
back to the 24-hour clock and the ISO date format.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@frankrousseau
frankrousseau force-pushed the add-person-display-preferences branch from 0d5d87a to 7e37f97 Compare July 13, 2026 08:36
@frankrousseau
frankrousseau merged commit f43be8e into cgwire:main Jul 13, 2026
4 of 5 checks passed
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