forms
forms copied to clipboard
feat: Add forms `state` to close and archive forms
- Resolves #1834
- Resolves #1101
I recommend to hide white space when review.
This adds a new field "state" to a form, this field is 0
by default which means the form is in active state.
Currently two other states are implemented:
-
closed
when then form was manually closed -
archived
when the form was archived
Closed forms do not allow any new submissions, archived forms even do not allow any modification. Archived forms are shown in a separate list on the side bar to save space.
Screenshots
open list | closed list |
---|---|
Rebased, squashed and fixed the tests. Ready for review :)
Only the codecov actions fails... see the PR for updating it...
Meaning that is unrelated.
Only the codecov actions fails... see the PR for updating it...
But the error here is just an invalid token. I experimented with the token yesterday. Perhaps we just need to paste it once more into the repository secrets.
The other PR is about stable3.
Also please add the new prop to the docs :)
Also please add the new prop to the docs :)
@Chartman123 already done :)
We should ask the designers about their opinion. IIRC Jan didn't want to have the archived forms in the App Navigation but in a modal...
I have added screenshots and requested a review from @jancborchardt :)
Yeah, "Archived forms" would be better as a sticky entry on the bottom left which opens a modal, just like in Contacts and Calendar.
Thank you @jancborchardt ! I now changed it to show the archived forms in a dialog / modal instead:
https://github.com/nextcloud/forms/assets/1855448/81451fa8-c5da-4669-b521-64004d5deea5
One more thing: Do you really want to move closed/expired forms into a separate area in the App Navigation? I think this is not necessary as we already have the archiving for hiding them from the list and the subtitle for the closed/expired forms to identify them directly.
Think of a freshly expired form: if you have a large list of forms, you would have to scroll first to see the latest results.
Think of a freshly expired form: if you have a large list of forms, you would have to scroll first to see the latest results.
My idea was that closed / expired forms are not that important anymore, so grouping them allow to better manage the active forms (e.g. you have 20+ forms active).
But if we agree on not grouping its fine for me to revert that :)
Yes I understand that and agree that after a while they will be less important. But for that one can archive the form. So I'd be happier without this grouping :)
Yes I understand that and agree that after a while they will be less important. But for that one can archive the form. So I'd be happier without this grouping :)
Done
One more comment: the state
is not imported in FormsMigrator.php
. The linked file related props are also missing, but I'm not sure if they really make sense when you import a Form in another instance. The state however could make sense, so I think we should add it there.
Please integrate the fix for #1991 into this PR. Should be easy to fix and you can directly address the new state prop as well :)
- The layout of the left navigation is a bit off, lot of whitespace (e.g. below the "Your forms" heading) and the entries are too big. Since there is no subline, they should be single-line entries like in Files or the left navigation of Mail, not multiline list items like in Talk or the message list in Mail.
This is only true for forms without expiration date. Then the expiration is shown in the subline. Also closed forms show the information in the subline. So no changes needed here :)
Thank you for the feedback, I resolved the comments :)
https://github.com/nextcloud/forms/assets/1855448/17aa10b9-57ee-49e9-9747-594226924215
Should be ready to merge now