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

[publication] Fix number of files in Upload tab #9179

Merged
merged 9 commits into from
Apr 16, 2024

Conversation

CamilleBeau
Copy link
Contributor

Brief summary of changes

In this PR, the uploadForm.js file is modified to increase / decrease the numFiles value according to whether a file was actually selected or not. If a file is selected, the numFiles increases. If a file is not selected, the numFiles decreases.

This prevents the bug where "File to Upload" field is added indefinitely if the file is browsed and then cancelled.

  • Have you updated related documentation?

Testing instructions (if applicable)

  1. Go to the upload tab and upload a file.
  2. Upload another file
  3. Click browse next to the second file that was uploaded, and then cancel
  4. Check that the file is removed, and that no extra "File to upload" fields are added (there should always be only one blank "File to upload" field)
  5. Make sure that every time you browse and select a field, there is exactly one more "File to upload" field added to the bottom of the form.
  6. If you have developer tools, check that the "numFiles" prop accurately reflects the number of file upload fields.

Link(s) to related issue(s)

CHANGELOG.md Outdated Show resolved Hide resolved
@jeffersoncasimir jeffersoncasimir self-assigned this Apr 11, 2024
Copy link
Contributor

@jeffersoncasimir jeffersoncasimir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue appears to be resolved for new (proposed) projects, in uploadForm.js, but not when editing an existing project, in viewProject.js. (Tested on my VM)

@CamilleBeau
Copy link
Contributor Author

The issue appears to be resolved for new (proposed) projects, in uploadForm.js, but not when editing an existing project, in viewProject.js. (Tested on my VM)

@jeffersoncasimir Fixed! Sorry about that

@driusan
Copy link
Collaborator

driusan commented Apr 15, 2024

@CamilleBeau conflicts in the changelog
@jeffersoncasimir I'm assuming the changelog conflict won't prevent re-testing, can you re-check this?

@jeffersoncasimir jeffersoncasimir added the Passed Manual Tests PR has undergone proper testing by at least one peer label Apr 16, 2024
@jeffersoncasimir
Copy link
Contributor

The issue has been resolved!

@CamilleBeau
Copy link
Contributor Author

The issue has been resolved!

Thanks! Conflict resolved.

@driusan driusan merged commit 92dbd76 into aces:main Apr 16, 2024
28 checks passed
@ridz1208 ridz1208 added this to the 26.0.0 milestone Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Passed Manual Tests PR has undergone proper testing by at least one peer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[publication] 'File to upload' dialog bug
4 participants