Skip to content

Add form switcher #1160

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

Merged
merged 64 commits into from
Jun 16, 2025
Merged

Add form switcher #1160

merged 64 commits into from
Jun 16, 2025

Conversation

kalilsn
Copy link
Contributor

@kalilsn kalilsn commented Apr 15, 2025

Issue(s) Resolved

Resolves #1037
Resolves #1036

High-level Explanation of PR

This PR adds the form switcher component to forms and the pub details page, and fully implements the new form permissions introduced in #1134.

  • Forms can now only be used to edit pubs of the same pub type as the form
  • Contributors can only edit and view pubs using the forms attached to their membership
  • Contributors to a pub without any forms can only view the pub, not edit it
  • PubIds for new pubs are now generated by the database. Because we no longer have the pubId when a file is uploaded, we now upload files with a temporary/ prefix initially, then move them to the pubId based path after the form is submitted and the pub is created. To avoid orphaned files, I've added a lifecycle policy to delete temporary/ files after 90 days.

Test Plan

Screenshots (if applicable)

Notes

@kalilsn kalilsn changed the title Remove extra character from croccrocid to fix api validation errors Add form switcher Apr 15, 2025
@kalilsn kalilsn changed the base branch from main to kalilsn/memberships-have-forms April 15, 2025 14:30
@kalilsn kalilsn force-pushed the kalilsn/form-switcher branch from 13ee081 to 8948d60 Compare April 21, 2025 03:56
@kalilsn kalilsn force-pushed the kalilsn/memberships-have-forms branch from f3c9d0e to 87cecc5 Compare April 21, 2025 04:57
@kalilsn kalilsn force-pushed the kalilsn/form-switcher branch from a6adb69 to ff6774d Compare April 21, 2025 04:58
@kalilsn kalilsn added the preview Auto-deploys a preview application label Apr 21, 2025
@3mcd 3mcd temporarily deployed to gh-654103159-pr-1160 April 21, 2025 05:06 Inactive
@kalilsn kalilsn force-pushed the kalilsn/form-switcher branch from 5719a72 to 28d6c2a Compare April 22, 2025 14:31
@3mcd 3mcd temporarily deployed to gh-654103159-pr-1160 April 22, 2025 14:36 Inactive
@3mcd 3mcd temporarily deployed to gh-654103159-pr-1160 April 22, 2025 19:35 Inactive
@kalilsn kalilsn force-pushed the kalilsn/form-switcher branch from 3252290 to 27d51b4 Compare April 22, 2025 20:10
@3mcd 3mcd temporarily deployed to gh-654103159-pr-1160 April 22, 2025 20:15 Inactive
Base automatically changed from kalilsn/memberships-have-forms to main April 22, 2025 20:34
@kalilsn kalilsn force-pushed the kalilsn/form-switcher branch from 27d51b4 to 05289b7 Compare April 22, 2025 20:36
@3mcd 3mcd temporarily deployed to gh-654103159-pr-1160 April 22, 2025 20:41 Inactive
@3mcd 3mcd temporarily deployed to gh-654103159-pr-1160 June 2, 2025 14:05 Inactive
@3mcd 3mcd temporarily deployed to gh-654103159-pr-1160 June 2, 2025 14:35 Inactive
@3mcd 3mcd temporarily deployed to gh-654103159-pr-1160 June 2, 2025 16:24 Inactive
@3mcd 3mcd temporarily deployed to gh-654103159-pr-1160 June 12, 2025 17:19 Inactive
@3mcd 3mcd temporarily deployed to gh-654103159-pr-1160 June 16, 2025 10:30 Inactive
@3mcd 3mcd temporarily deployed to gh-654103159-pr-1160 June 16, 2025 12:29 Inactive
@3mcd 3mcd temporarily deployed to gh-654103159-pr-1160 June 16, 2025 13:34 Inactive
@3mcd 3mcd temporarily deployed to gh-654103159-pr-1160 June 16, 2025 14:34 Inactive
@3mcd 3mcd temporarily deployed to gh-654103159-pr-1160 June 16, 2025 15:17 Inactive
@3mcd 3mcd temporarily deployed to gh-654103159-pr-1160 June 16, 2025 15:54 Inactive
@3mcd 3mcd temporarily deployed to gh-654103159-pr-1160 June 16, 2025 16:56 Inactive
@3mcd 3mcd requested a deployment to gh-654103159-pr-1160 June 16, 2025 17:20 Pending
@3mcd 3mcd had a problem deploying to gh-654103159-pr-1160 June 16, 2025 17:27 Error
@tefkah tefkah merged commit ddc18a7 into main Jun 16, 2025
17 checks passed
@tefkah tefkah deleted the kalilsn/form-switcher branch June 16, 2025 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Auto-deploys a preview application
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update contributor role permissions to include form view/edit layer Form view switcher
3 participants