--- urn: "urn:penemure:c025dbb4-8ac2-4985-b348-0dff9b10619f" backend: "pub" ancestors: - 📁 Penemure created: 2025-02-03 07:36:34.931395+00:00 updated: 2025-02-03 09:30:00.279996+00:00 tags: milestone: "1.0" --- # 📁 Editable Tables We need editable tables, that's really a killer feature of notion. That you can sql select some data, and the results you get back, are actually mutable in place. So let's try and implement that. Let's build a table real quick with some notable properties: - a non mutable field (id) - a mutable object attribute (title) - oh wait, we have three variants of that mutable object attribute, and the edit should essentially go to the last one. - a tag based attribute - a tag based attribute that I didn't used to fill in automatically so will be missing in places. ```query-table-edit GROUP SELECT id, title, title_plain, title_txt, status, priority FROM task ORDER BY id ASC ``` id | title | title_plain | title_txt | status | priority -- | ----- | ----------- | --------- | ------ | -------- 004894e3-7e64-4475-940e-e329dea20b54 | 📝 RSS | 📝 RSS | RSS | backlog | medium 082445d6-a97f-432c-a692-b15f0bcb5cbb | 📝 customised manifest for form pages | 📝 customised manifest for form pages | customised manifest for form pages | backlog | high 09a23b9f-b798-4197-9e31-1b7fc412121a | 📝 Custom Emoji / Icons | 📝 Custom Emoji / Icons | Custom Emoji / Icons | Done | Low 0a3fc124-03a3-4315-8143-3f92c3932828 | 📝 need to redo attachments now | 📝 need to redo attachments now | need to redo attachments now | in-progress | 19adaaea-ef36-463e-949d-36aba7e80ad7 | 📝 Starting time logging from a page, default to that as the title. | 📝 Starting time logging from a page, default to that as the title. | Starting time logging from a page, default to that as the title. | backlog | medium 1bdddab5-c28e-47f4-a6fd-610fff4ff5f6 | 📝 Link backend to the backend's "home" if it exists, in note metadata | 📝 Link backend to the backend's "home" if it exists, in note metadata | Link backend to the backend's "home" if it exists, in note metadata | backlog | medium 299e94f0-88fe-423f-a3fd-d92be09227a5 | 📝 tags needs to be completely redone (again) | 📝 tags needs to be completely redone (again) | tags needs to be completely redone (again) | in-progress | 2aa2d81a-a043-4e87-abeb-6252ce60da71 | 📝 a second templated task | 📝 a second templated task | a second templated task | backlog | medium 2fd1bd59-3029-4b12-b62e-141354d3a92c | 📝 attachments deleted when editing | 📝 attachments deleted when editing | attachments deleted when editing | Backlog | Low 31f89251-f274-4c92-94ca-2e5ea2d753f2 | 📝 Logging: changing the title doesn't get saved | 📝 Logging: changing the title doesn't get saved | Logging: changing the title doesn't get saved | | 331f68de-5f6c-4458-b166-f4d23b681994 | 📝 separate template tags and regular ones | 📝 separate template tags and regular ones | separate template tags and regular ones | Backlog | 3b1142c2-dfa7-4130-b846-a3f7659ea670 | 📝 maybe do not allow selection of backend for logging time, superfluous, based on project only. | 📝 maybe do not allow selection of backend for logging time, superfluous, based on project only. | maybe do not allow selection of backend for logging time, superfluous, based on project only. | | 3e1c8460-570c-40c7-9a50-514316c06e3e | 📝 select text + auto-create issues from it | 📝 select text + auto-create issues from it | select text + auto-create issues from it | done | 41bdd446-932c-4c95-b35f-f326eeba028c | 📝 What I'm doing automation | 📝 What I'm doing automation | What I'm doing automation | Backlog | Low 550d497d-7e20-4d28-a08d-edd4077ff392 | 📝 Prevent circular parenting | 📝 Prevent circular parenting | Prevent circular parenting | Done | 55d5e8a6-ca25-4029-aab6-b60d5aa3c617 | 📝 add stars/fav/bookmarks | 📝 add stars/fav/bookmarks | add stars/fav/bookmarks | Backlog | Low 56495dc2-6b1c-4300-b3e5-68bc4bd726e4 | 📝 Git based Overlay Filesystem | 📝 Git based Overlay Filesystem | Git based Overlay Filesystem | done | 5e6b0a58-58a8-411b-ba89-b21cc496e197 | 📝 a templated task | 📝 a templated task | a templated task | done | low 640e4949-6883-478d-a22c-19fa68961e08 | 📝 duplicating turned URN refs into links properly | 📝 duplicating turned URN refs into links properly | duplicating turned URN refs into links properly | backlog | low 6e7b16c8-9465-4d9d-9fc1-03e1178c9315 | 📝 edit total time (updates end time.) rather than start/end | 📝 edit total time (updates end time.) rather than start/end | edit total time (updates end time.) rather than start/end | backlog | 78b539ad-f3f3-4847-9d6d-a9bfdc8ef849 | 📝 data logging | 📝 data logging | data logging | backlog | 7a1bb42d-eb09-4ce1-8356-0d4cd57cb7c5 | 📝 Templates | 📝 Templates | Templates | done | 81df246f-2e36-4fb1-9c81-4e9cb74adcae | 📝 Issue with Status Field | 📝 Issue with Status Field | Issue with Status Field | done | 8c51eadd-51a6-430a-8ff8-4f7410fcba46 | 📝 Mentions | 📝 Mentions | Mentions | done | 8ddfb721-f660-4785-9346-78185704c414 | 📝 metadata for file uploads? | 📝 metadata for file uploads? | metadata for file uploads? | backlog | low 99c43a8b-675a-40ad-89da-98193cf28ad9 | 📝 log time should order by end time not update time | 📝 log time should order by end time not update time | log time should order by end time not update time | | a4feed42-d56b-44b2-ac65-124422048b4d | 📝 Fix encoding of values into form | 📝 Fix encoding of values into form | Fix encoding of values into form | Done | a9d4275a-656d-4265-b886-dcc5dcb9f8cd | 📝 select tasks which changed from any State to completed within a specific time period | 📝 select tasks which changed from any State to completed within a specific time period | select tasks which changed from any State to completed within a specific time period | backlog | medium ae29780d-9b2a-4394-bbac-848b90beeaf4 | 📝 If no blocks, auto open children | 📝 If no blocks, auto open children | If no blocks, auto open children | Backlog | Low b8f6f0b1-d936-4e00-be32-3a444846bd1e | 📝 Get it Working | 📝 Get it Working | Get it Working | in-progress | b9f4c2d4-2ce9-46d6-984e-616340eff5d7 | 📝 Manifest.json | 📝 Manifest.json | Manifest.json | done | medium c8f5e888-65e2-4876-9baa-7cf7c27c498e | 📝 hashtags? | 📝 hashtags? | hashtags? | backlog | d2aefd7d-dde3-4ac6-810a-4fbf635e0f33 | 📝 fix night mode colours on gantt | 📝 fix night mode colours on gantt | fix night mode colours on gantt | done | medium d32d9e9a-38b3-4f3f-aca3-e79c4554b176 | 📝 Mention | 📝 Mention | Mention | done | d6ce8729-d114-41c2-abfc-c62f1d580876 | 📝 A public issue | 📝 A public issue | A public issue | backlog | d7854764-54f5-45ee-8933-a62f1285eb73 | 📝 persist start time of time logs when changed | 📝 persist start time of time logs when changed | persist start time of time logs when changed | backlog | medium da961955-1450-468c-a118-27e087c40730 | 📝 block transclude and search | 📝 block transclude and search | block transclude and search | in-progress | e9aca66a-6f4f-4d58-a157-c7e25863bb97 | 📝 add function/flag to determine if a grouped result set is empty | 📝 add function/flag to determine if a grouped result set is empty | add function/flag to determine if a grouped result set is empty | done | medium f503acb6-07f6-409f-8ff5-6295f48e8d59 | 📝 Block Properties | 📝 Block Properties | Block Properties | backlog | fb2a9bd6-a259-4ba7-8b88-46f3cecf79fc | 📝 Logging: auto-save title + body field too | 📝 Logging: auto-save title + body field too | Logging: auto-save title + body field too | | ff3237ca-0c2f-4c2f-8760-9cc81fd592d5 | 📝 edit title/project of older entries | 📝 edit title/project of older entries | edit title/project of older entries | backlog | {: Title="None"} we'll need to - [x] add ID to every query, just, as a dupe, and then extract that into the `ResultSet` - [x] add that into the HTML - [ ] a new /patch route that accepts a tuple `(id, column, value)` - [ ] JS to enable this ## Misc Thoughts we do sort of want to communicate to the frontend what the type of that column is. We'll need that for someday-UI, is it a status tag (enum) that needs to be rendered with the select box when clicked on? Do we care that this impacts 'real' sql queries? Or do we operate under the assumption that $someday we'll have a UI that hides the SQL and correctly applies `GROUP`/`SQL` based on ## Work Log ```chart-gantt GROUP SELECT title_plain AS title, url, start_date AS time_start, end_date AS time_end FROM log WHERE parents LIKE '%SELF%' ``` title | url | time_start | time_end ----- | --- | ---------- | -------- ⏰ progress on editable tables | /penemure/note/bc71f53c-8c6b-4e26-855d-9e8143e9b899.html | 1738568581.0 | 1738575197.0 {: Title="None"}