Skip to content

Add select all command for file browser listing #17571

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

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

Conversation

RRosio
Copy link
Contributor

@RRosio RRosio commented May 15, 2025

References

This aims to address #16690

Code changes

  • Register select all command as a shortcut and context menu item
    • Adding the context menu option was not mentioned in the original issue, but I followed the pattern I saw for other commands. However, I can remove it if this is not the desired behavior. I did wonder if it might be redundant given that the DirListing checkbox already exists.
  • Adds a selectAll function to the DirListing and FileBrowser classes

User-facing changes

The user will now see the Select All option, and its corresponding shortcut, in the context menu after right-clicking on a file.

Screen.Recording.2025-05-15.at.4.36.23.PM.mov

Backwards-incompatible changes

None to my knowledge

Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

@RRosio
Copy link
Contributor Author

RRosio commented May 16, 2025

For jupyterlab visual regression tests, these context-menu tests could be addressed with snapshot updates

[jupyterlab] › test/jupyterlab/contextmenu.test.ts:50:7 › Application Context Menu › Open file browser context menu on folder 
[jupyterlab] › test/jupyterlab/contextmenu.test.ts:66:7 › Application Context Menu › Open file browser context menu on file 
[jupyterlab] › test/jupyterlab/contextmenu.test.ts:81:7 › Application Context Menu › Open file browser context menu on notebook with kernel 
  • The windowed-notebook I'm not too sure about... It doesn't seem to have been failing/flaky as of late, so I can investigate the cause a bit more.
    -[jupyterlab] › test/jupyterlab/windowed-notebook.test.ts:75:5 › should not update height when hiding

For the documentation visual regression tests, all three may be addressed with snapshot updates

[documentation] › test/documentation/customization.test.ts:89:7 › Default › should use default context menu 
[documentation] › test/documentation/general.test.ts:299:7 › General › Shareable link ──────────
[documentation] › test/documentation/general.test.ts:640:7 › General › Open With ───────────────

If keeping the context menu item for Select All is preferred, I can ping the bot to update the snapshots.

@RRosio RRosio marked this pull request as ready for review May 28, 2025 02:12
@krassowski krassowski added this to the 4.5.0 milestone May 28, 2025
RRosio and others added 2 commits May 30, 2025 23:48
Copy link
Member

@krassowski krassowski left a comment

Choose a reason for hiding this comment

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

Thank you @RRosio!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ctrl + A in file browser listing should select all files
2 participants