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

refactor: Forms 1533 bulk upload separation #1528

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jasonchung1871
Copy link
Collaborator

@jasonchung1871 jasonchung1871 commented Oct 29, 2024

Description

This pull request puts us closer to utilizing tree-shaking that Vue 3 provides. It also adds fills some of our technical debt in regards to testing for the front end. This separates the bulk upload functionality found in the FormViewer out into the FormViewerMultiUpload file where it should have been originally. This reduces the complexity of FormViewer since the bulk upload wasn't necessary for it to work. This also converts the FormViewerMultiUpload file from the options API to the composition API.

Summary: The code for bulk upload has been removed from FormViewer and placed into FormViewerMultiUpload. There were some minor changes like variable names or function names, just to make things clearer, and added comments. The delay function was moved out into a composable function so that it could be mocked in the test. Options API to composition API changes are changes made in how a variable is accessed, going from this.variable = 0 to variable.value = 0.

Type of Change

refactor (change to improve code quality)

test (add missing tests or correct existing tests)

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

The multi upload functionality has been separated from FormViewer, including the tests. They weren't necessary to all be dumped in FormViewer.

TODO: Tests for FormViewerMultiUpload
A lot of tests added for FormViewerMultiUpload. Nearly 100%.
Copy link

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.

1 participant