Skip to content
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

feat: Added column persistence to MySubmissionsTable #1507

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jasonchung1871
Copy link
Collaborator

Description

MySubmissionsTable now persists the column selection for the currently active form in local storage. This adds a new package called @vueuse/core. This allows us to store data in the local session storage. We've replaced filterData with mySubmissionPreferences which is in the form store. mySubmissionPreferences is stored to local storage using vueuse/core.

This was a requested feature. It allows for a similar user experience on the previous submissions page to the form submissions page.

Type of Change

feat (a new feature)

test (add missing tests or correct existing tests)

This is a breaking change because ... We've introduced a new package called @vueuse/core. This may break things on the front end, but should not affect data on the backend.

Checklist

  • I have read the CONTRIBUTING doc
  • I have checked that unit tests pass locally with my changes
  • I have run the npm script lint on the frontend and backend
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • I have approval from the product owner for the contribution in this pull request

Further comments

MySubmissionsTable now persists the column selection for the currently active form in local storage.
Copy link

@WalterMoar
Copy link
Collaborator

WalterMoar commented Sep 25, 2024

Works great for one form, but in Chrome (and others?) if I save preferences for a second form then it looks like it overwrites the first preferences. Also, I think that all deployments in dev (standard dev and the PRs) will share the same preferences, yes? Probably not important as long as someone's settings for dev aren't overwritten by PR settings (collisions with the form ID are unlikely).

@jasonchung1871
Copy link
Collaborator Author

Works great for one form, but in Chrome (and others?) if I save preferences for a second form then it looks like it overwrites the first preferences. Also, I think that all deployments in dev (standard dev and the PRs) will share the same preferences, yes? Probably not important as long as someone's settings for dev aren't overwritten by PR settings (collisions with the form ID are unlikely).

Yeah, I didn't know how we wanted to handle this. I think the maximum storage we can store is 5 MB, so I just set it to replace the existing submission columns. I'm uncertain how this will affect forms with thousands of fields, but we will have to see.

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.

2 participants