Skip to content

feat(desktop): configurable date format + calendar date-property picker#671

Merged
h4yfans merged 2 commits into
mainfrom
date-format-setting
Jul 2, 2026
Merged

feat(desktop): configurable date format + calendar date-property picker#671
h4yfans merged 2 commits into
mainfrom
date-format-setting

Conversation

@h4yfans

@h4yfans h4yfans commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a configurable date format and replaces free-text date-property entry with a calendar pop-up picker.

  • New setting — Settings → General → Date Format: MM/DD/YYYY (US), DD/MM/YYYY, YYYY-MM-DD, DD.MM.YYYY (default). Device-local (not synced); mirrors the Clock Format setting end-to-end.
  • Applied everywhere a full calendar date is shown: note property rows, folder-table date columns, task due dates, doc-info panels, tab/wiki preview cards, version history. Relative labels ("2h ago"), times, and calendar weekday/month headers are intentionally left as-is.
  • Date property picker — clicking a date property opens a calendar popover (reuses the existing DatePickerCalendar); you can also type the date, parsed in the chosen format.

Implementation

  • dateFormat enum added to GeneralSettingsSchema (+ app-core defaults, preload DTO, i18n, settings UI). No new IPC channel — the generic General get/set handlers carry it.
  • Central lib/format-date.ts (formatDate / parseDateInput) + reactive useDateFormat hook; the module cache is kept in sync globally via useThemeSync.
  • Date is now an "always interactive" property type (like select/status): a self-managed Radix popover trigger, so the picker reopens reliably and the type icon only tints during an actual edit.

Testing

  • pnpm --filter @memry/desktop typecheck
  • pnpm --filter @memry/contracts test — 75 pass, incl. new dateFormat enum case ✅
  • Renderer tests: format-date, editors, PropertyRow, property-cell
  • pnpm lint, pnpm ipc:check, i18n:check, pnpm docs:build

h4yfans added 2 commits July 2, 2026 23:59
- Add device-local dateFormat general setting (MM/DD/YYYY, DD/MM/YYYY, YYYY-MM-DD, DD.MM.YYYY), mirroring clockFormat
- Central lib/format-date.ts (formatDate/parseDateInput) + reactive useDateFormat hook + global cache sync in useThemeSync
- Apply the setting to every full-date display: property rows, folder table, task due dates, doc-info panels, tab/wiki previews, version history
- Replace free-text date-property entry with a self-managed calendar popover picker (reuses DatePickerCalendar)
@github-actions github-actions Bot added documentation Improvements or additions to documentation enhancement New feature or request test labels Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

React Doctor found no issues. 🎉

Reviewed by React Doctor for commit 86e2f68.

@h4yfans h4yfans marked this pull request as ready for review July 2, 2026 23:00
@h4yfans h4yfans merged commit 1042be2 into main Jul 2, 2026
13 of 15 checks passed
@h4yfans h4yfans deleted the date-format-setting branch July 2, 2026 23:01
h4yfans added a commit that referenced this pull request Jul 3, 2026
Desktop tests (Unit coverage step) had accumulated pre-existing failures
masked behind the CLI-test red (which skipped the desktop step):
- crdt-provider: add repairEmptyBlockIds to blocknote-converter mock (#679)
- date rendering (date-grouping, format-task-due, tab-preview-card,
  missing-small-components, component-major-surfaces): expect DD.MM.YYYY
  default from configurable date format (#671)
- general-section.i18n: tabCloseButton is selects[3] after the added
  dateFormat select (#671)
- settings-sections: editor/journal switch indices shift +1 after the
  calendar notes-on-calendar switch (#667)
- missing-small-components: add getI18n to react-i18next mock (fixes an
  unhandled rejection that failed the whole run)

E2E auth-state-machine: recovery-phrase words are semantic <li> after the
React Doctor a11y pass (#639) dropped explicit role=listitem; query by 'li'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant