-
Notifications
You must be signed in to change notification settings - Fork 0
MVP #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
romanc
wants to merge
42
commits into
legacy
Choose a base branch
from
romanc/checklist-ressource
base: legacy
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
MVP #11
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
romanc
commented
Jan 28, 2024
f53b639 to
933aa93
Compare
927ec27 to
8600d5e
Compare
Merged
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 <>
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.
8600d5e to
3cad4ee
Compare
This resolves issue #16.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The goal of this branch is to implement an MVP version of cklists. Focus is more on functionality than sparkling UI.