Skip to content

feat: turn pages into simple databases - #46

Merged
AmrMsCLL merged 1 commit into
mainfrom
feat/note-databases
Oct 5, 2026
Merged

AmrMsCLL merged 1 commit into
mainfrom
feat/note-databases

Conversation

@AmrMsCLL

@AmrMsCLL AmrMsCLL commented Oct 5, 2026

Copy link
Copy Markdown
Member

Stacked on #45.

What changes

  • Any page can be turned into a database. Pages inside it get typed properties: text, number, select, multi-select, date, checkbox, person (a member of the space) and link (http/https).
  • Four views, with the chosen one saved on the database: a table with inline editing, a board grouped by a select property (drag cards between columns, add in a column), a list, and a month calendar by a date property (add a page on a day).
  • A "Properties" dialog adds, renames, retypes and removes properties and their options.
  • A page inside a database shows its properties above its content.
  • Changing properties drops values that no longer fit: removed properties, changed types and removed options. Turning a database back into a page, which asks for confirmation first, deletes its pages' property values but keeps the pages.
  • The month-grid range used by Agenda moved to agenda.ts (monthDays) so the calendar view shares it.

API

  • GET/PUT/DELETE /notes/:id/database
  • PATCH /notes/:id/properties with { values: { [propertyId]: value | null } }
  • Notes gain database: boolean. GET /notes/:id gains row (the parent database's properties and this page's values, or null).

Migration

20261005080000_note_databases creates database_schemas (item_id pk, properties jsonb, view, group_by, date_by, updated_at) and note_properties (item_id, property_id, value jsonb), both cascading from items.

Verification

  • Server integration: test/integration/note-databases.spec.ts, test/integration/notes.spec.ts (8 passed).
  • Frontend: test/notes.spec.tsx, test/agenda.spec.tsx (12 passed).
  • Lint and build pass. Checked on the local stack: turning a page into a database, setting values on its pages, and the board and calendar views.

@github-actions github-actions Bot added the size/xl Over 600 changed lines, excluding lockfiles label Oct 5, 2026
@AmrMsCLL
AmrMsCLL force-pushed the feat/note-templates branch from b25b216 to 3405f2e Compare October 5, 2026 19:04
Base automatically changed from feat/note-templates to main October 5, 2026 19:05
@AmrMsCLL
AmrMsCLL force-pushed the feat/note-databases branch from 172c3a0 to 7f0881b Compare October 5, 2026 19:05
@AmrMsCLL
AmrMsCLL merged commit b850e9f into main Oct 5, 2026
6 checks passed
@AmrMsCLL
AmrMsCLL deleted the feat/note-databases branch October 5, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xl Over 600 changed lines, excluding lockfiles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant