Skip to content

Conversation

@romanc
Copy link
Owner

@romanc romanc commented Jan 28, 2024

The goal of this branch is to implement an MVP version of cklists. Focus is more on functionality than sparkling UI.

@romanc romanc force-pushed the romanc/checklist-ressource branch from f53b639 to 933aa93 Compare January 29, 2024 06:29
@romanc romanc changed the title Checklist resource (with basic html rebranding) MVP May 12, 2024
@romanc romanc force-pushed the romanc/checklist-ressource branch from 927ec27 to 8600d5e Compare July 13, 2024 09:47
@romanc romanc mentioned this pull request Jul 13, 2024
Roman Cattaneo and others added 24 commits July 13, 2024 12:15
I ran the following `mix`  command to auto-generate a `checklist`
ressource

```
mix phx.gen.html Checklists Checklist checklists title:string description:string user_id:references:users document:map
```
Some rebranding of the default phoenix template to fit our needs.

Icons from uxwing, e.g. https://uxwing.com/check-mark-box-icon/.
Checklists are personal by default and onyl show up publicly (e.g. when
not signed it) or for other signed in users once made public.
* WIP: notes where to log to database
* user has many cklists and cklists belong to a user
* Add tables for checklist runs and activities
* Working checklist runs & activity logs

---------

Co-authored-by: Roman Cattaneo <>
Roman Cattaneo added 16 commits July 13, 2024 12:15
Use change_checklist instead of update_checklist (which is for updating
in the database, meaning the changeset needs to be valid).
Doesn't show errors yet :/ but should work otherwise. Also looks way to
hacky in my oppinion with all the conversions needed.

Also needs cleanup (e.g. of checklitst_controller because it doesn't
need the create method anymore). And we probably want to disable editing
checklists for now (in favor of adding copy-on-write duplication in a
later stage).
Apparently, on_delete: :nothing doesn't really do nothing in postgres
databases. Attempting to delete a cklist after running at least one
instance thus threw an error complaining about issues with database
constriants. This PR now propagates deletes from the checklist table
through the runs table all the way to the activity table, cleaning up
orphaned data on delete.

The proper fix here will be soft deletes, which will be necessary as
soon as we have a more complex sharing scheme.
@romanc romanc force-pushed the romanc/checklist-ressource branch from 8600d5e to 3cad4ee Compare July 13, 2024 10:16
Roman Cattaneo added 2 commits July 13, 2024 12:22
@romanc romanc changed the base branch from main to legacy May 24, 2025 08:09
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.

3 participants