-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Multi tool select buttons bug #3404
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
Multi tool select buttons bug #3404
Conversation
…ctly Changed Page Select button so that both Select/Deselect All buttons can show up at the same time. Also made it so that Select All button does not show up when all pages are selected, and Deselect All button does not show up when no pages are selected
…F1234/Stirling-PDF into multiToolSelectButtonsBug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses the multi tool select buttons bug by updating the behavior of the "Select All" and "Deselect All" buttons and fixing a bug where pages remained selected when the Page Select was turned off.
- Updated the button's onclick handlers in multi-tool.html to correctly trigger selection/deselection functions.
- Introduced and bound a new toggleDeselectAll method in PdfContainer.js while refactoring the selection logic.
- Modified updateSelectedPagesDisplay in PdfContainer.js to adjust button visibility based on current selection states.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/main/resources/templates/multi-tool.html | Changed onclick handler for the deselect button to call toggleDeselectAll. |
src/main/resources/static/js/multitool/PdfContainer.js | Added toggleDeselectAll and refactored select/deselect logic and UI updates. |
/deploypr |
🚀 PR Test DeploymentYour PR has been deployed for testing! 🔗 Test URL: http://185.252.234.121:3404 This deployment will be automatically cleaned up when the PR is closed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stirling-PDF.PR.3404.-.PDF.Multi.Tool.-.Google.Chrome.2025-04-23.13-29-22.mp4
Hi @JoseQuintas2003, Looks like some great progress. In the video above you can see that the selectall button remains present after turning off selected pages. Would you be able to correct this?
Also:
Stirling-PDF.PR.3404.-.PDF.Multi.Tool.-.Google.Chrome.2025-04-23.13-38-38.mp4
It looks like after you move some pages the deselectAll button never reappears. Would you be able to look into this?
Hey there, great to receive some feedback on my work so far. I'm surprised I didn't notice these bugs, but I suppose it's normal some things might have gone unnoticed. I'll begin making the corrections asap. Thank you for your detailed feedback. |
Deselect All button no longer appears after Page Select is turned off
Deselect All button no longer stays invisible after Page Move
Changed function names for better readibility
Hey there once more @ConnorYoh. I believe I have solved the problems you mentioned in these 3 commits. I hope nothing has escaped me this time, but if there's anything I can help with or improve, then just let me know. Talk to you soon! |
/deploypr |
🚀 PR Test DeploymentYour PR has been deployed for testing! 🔗 Test URL: http://185.252.234.121:3404 This deployment will be automatically cleaned up when the PR is closed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @JoseQuintas2003 Thanks for the changes, looks like you have fixed the bugs however the selectAll button is no longer functioning. I believe its because window.selectAll
is defined twice, once as a function and once as a Boolean.(line 77 and set within the file multiple times but is never used) I think we can now remove the Boolean as you have replaced the need for it.
Stirling-PDF.PR.3404.-.PDF.Multi.Tool.-.Google.Chrome.2025-04-24.10-10-44.mp4
Hey there @ConnorYoh. So sorry I missed that. It seems its a simple solution as you suggested, I'll take care of it. |
@ConnorYoh its done. Hopefully this clears everything. Thanks for the help. I apologize if this took longer than necessary. |
/deploypr |
🚀 PR Test DeploymentYour PR has been deployed for testing! 🔗 Test URL: http://185.252.234.121:3404 This deployment will be automatically cleaned up when the PR is closed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No Apologies necessary, thank you for your efforts and contributing it is really appreciated.
Description of Changes
Changes:
Why the changes were made:
Other challenges:
Relevant Screenshots:
Fig. 1 - Only "Select All" button appears when Page Select is turned on, since no pages are selected
Fig. 2 - Both "Select All" and "Deselect All" buttons appear when one or more, but not all pages are selected
Fig. 3 - Only "Deselect All" button appears when all pages are selected
Fig. 4 - When Page Select is turned off, both "Select All" and "Deselect All" buttons disappear and all pages are deselected
Closes #3206
Checklist
General
Documentation
UI Changes (if applicable)
Testing (if applicable)