Add privacy control to projects and inherit it on tasks - #169
Open
raulanatol wants to merge 1 commit into
Open
Conversation
A project can now be marked as private, which makes it (and its tasks) visible only to its creator. The project form gets a "Private project" checkbox, and warns while editing that flipping it changes the visibility of every task in the project. Tasks inherit that privacy: when the selected project is private, the task's own privacy control is shown as inherited and disabled, both in the full task editor and in the quick add modal, matching what the API enforces. Private projects are also marked with a "Private" chip in the project list. Requires the backend change in donetick/donetick#749. Discussion: donetick/donetick#718
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
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.
Frontend side of the project-level privacy discussed in
donetick/donetick discussion #718. Needs the API change in donetick/donetick#749 to do
anything — without it the checkbox posts a field the backend ignores.
What's in it
ProjectModal): a "Private project" checkbox, with helpertext spelling out who can see the project. While editing an existing project,
changing the flag warns that every task in the project will change visibility
too, since the backend propagates it.
ChoreEdit): when the selected project is private, thePublic/Limited radios are disabled and the task is forced to private, with an
"Inherited from the project" note. The "Remember for Future Tasks" shortcut is
hidden in that case — the choice isn't the task's to remember.
AddTaskModal/AdvancedOptionsSection): same treatment forthe "Limited visibility" switch, disabled with the inherited description.
ProjectView): private projects get a "Private" chip,following the existing "Default" chip pattern.
The disabling is UX only: the API forces
is_privateon tasks in a privateproject regardless of what the client sends, so an older client can't opt out.
Verified
vite buildpasses andeslintreports no new problems on the touched files(31 pre-existing problems before and after —
developisn't lint-clean today).Not verified in a browser against a running backend.