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
Added the Selection of cells till Top and Bottom #7177
Conversation
Thanks for making a pull request to JupyterLab! To try out this branch on binder, follow this link: |
How about the new toTop and toBottom parameters default to false? Then the current code does not need to change, and it is backwards compatible so this can go in for 1.2. |
Thanks! I left a few review comments. |
Thanks! I added a few more comments inline. |
@jasongrout do I need to change any more files for accepting the pull request? |
Can you look at the two outstanding comments above? |
I have made the necessary changes, @jasongrout is the file ok? |
@jasongrout any more changes to be made, before merging? |
Thanks for your patience. I think the only thing left is picking the right keyboard shortcuts. The survey on macOS in #7177 (comment) indicates that probably Accel-Shift-Up/Down is the right keystroke on a mac. As I mention in #7177 (comment), I'm hoping someone will have time to experiment a bit on windows/linux to see if the corresponding Ctrl-Shift-Up/Down is natural there compared to common applications. |
For Ubuntu(Linux):
LibreOffice Calc : Shift + Home, Shift + End -> Selects upto the last extreme top of current column and last extreme bottom of current column respectively. |
Thanks. Can you try a file browser list of files? That is a common object list that people will have experience with. Also, do you happen to know of an application that has a gnome listbox to see the behavior there? |
I have tried with the gedit's( file->open), file browser list, using Shift + Home and Shift + End selects some items, but not upto the top or bottom respectively, and consecutively it repeats selecting the same number of items before or after the currently selected items respectively. I suppose after searching in nautlius(file browser of Gnome) the results are displayed in a list box, and the results are same as the file browser above. |
We're trying on windows:
|
@bw-space - based on these survey results, how about we have Last Extreme behavior, with the following two sets of shortcuts: Shift Home / Shift End
|
In other words, let's do Shift Home / Shift End as keybindings and we can merge this, and later we can do the mac-specific keybindings when we figure out a good way to do it. |
@@ -87,11 +87,21 @@ | |||
"keys": ["Shift K"], | |||
"selector": ".jp-Notebook:focus" | |||
}, | |||
{ | |||
"command": "notebook:extend-marked-cells-top", | |||
"keys": ["Shift PageUp"], |
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.
"keys": ["Shift PageUp"], | |
"keys": ["Shift Home"], |
{ | ||
"command": "notebook:extend-marked-cells-below", | ||
"keys": ["Shift ArrowDown"], | ||
"selector": ".jp-Notebook:focus" | ||
}, | ||
{ | ||
"command": "notebook:extend-marked-cells-bottom", | ||
"keys": ["Shift PageDown"], |
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.
"keys": ["Shift PageDown"], | |
"keys": ["Shift End"], |
I suggested the changes to the keybindings above. If those look good to you (given the survey results above), feel free to commit the suggestions, and then I can merge. Thanks again for working on this, and your patience in the process. |
@jasongrout, I am very thankful to you for helping me in the process, you have been one of my constant guides. I am looking forward to solve more of the issues :D . It's feels great to contribute here. |
I put in a PR to make it possible for us to have platform-specific bindings: #7335. So after that is merged, we can introduce the mac-specific binding too. |
One last test - and it works great! Thanks again. I look forward to working with you again on another issue. |
@meeseeksdev backport to 1.x |
…7-on-1.x Backport PR #7177 on branch 1.x (Added the Selection of cells till Top and Bottom)
Thanks a lot, and same here. It would be great to have platform specific key bindings. |
@jasongrout there has been a slight error in the key bindings above, and has been corrected.
|
References
This Pull Request solves the issue: #6783
Code changes
The following files were changed:
in which two new command definitions i.e extendBottom and extendTop have been added.
in which two new shortcut keys are defined i.e Shift+PageUp and Shift+PageDown to select to top and bottom respectively.
in which the function definitions extendSelectionAbove and extendSelectionBelow have been added an extra parameter to identify selections till top or only one cell above and vice versa, respectively.
User-facing changes
Backwards-incompatible changes