spyder-ide / ux-improvements

Discussion about UX improvements for Spyder 5 and beyond
4 stars 2 forks source link

Zoom-in and out keyboard shortcuts are inconsistent or missing between Editor, Console, Files, Project, etc. #69

Open richlysakowski opened 2 years ago

richlysakowski commented 2 years ago

Description

What steps will reproduce the problem?

the Keyboard shortcut for Zoom-in on the Editor widget is Ctrl-+ the Keyboard shortcut for Zoom-out on the Editor widget is Ctrl--

the Keyboard shortcut for Zoom-in on the Console widget is Ctrl-Shift-+ the Keyboard shortcut for Zoom-out on the Console widget is Ctrl-- the Keyboard shortcut for Zoom-out on the Console widget SHOULD BE Ctrl-Shift--

there is NO Keyboard shortcut for Zoom-in on the Help widget there is NO Keyboard shortcut for Zoom-out on the Help widget It is Mouse Right-Click menu to Zoom-in and Zoom-out

there is NO Keyboard shortcut for Zoom-in on the Files widget there is NO Keyboard shortcut for Zoom-out on the File widget

the Keyboard shortcut for Zoom-in on the Files widget is Ctrl-+ the Keyboard shortcut for Zoom-out on the Files widget is Ctrl--

Yes, I know... "Consistency is the hobgoblin of small minds" However, in this case, having consistency here will be one less thing to think about or discover (especially for beginners)

Please do this when you have time (or send me instructions for how to do it 8^))

Versions

Dependencies


# Mandatory:
atomicwrites >=1.2.0            :  1.4.0 (OK)
chardet >=2.0.0                 :  4.0.0 (OK)
cloudpickle >=0.5.0             :  2.0.0 (OK)
diff_match_patch >=20181111     :  20200713 (OK)
intervaltree >=3.0.2            :  3.0.2 (OK)
IPython >=7.6.0                 :  7.30.1 (OK)
jedi =0.17.2                    :  0.17.2 (OK)
jsonschema >=3.2.0              :  4.3.2 (OK)
keyring >=17.0.0                :  23.4.0 (OK)
nbconvert >=4.0                 :  6.3.0 (OK)
numpydoc >=0.6.0                :  1.1.0 (OK)
paramiko >=2.4.0                :  2.9.1 (OK)
parso =0.7.0                    :  0.7.0 (OK)
pexpect >=4.4.0                 :  4.8.0 (OK)
pickleshare >=0.4               :  0.7.5 (OK)
psutil >=5.3                    :  5.9.0 (OK)
pygments >=2.0                  :  2.11.1 (OK)
pylint >=1.0                    :  2.12.2 (OK)
pyls >=0.36.2;<1.0.0            :  0.36.2 (OK)
pyls_black >=0.4.6              :  0.4.6 (OK)
pyls_spyder >=0.3.0             :  0.3.2 (OK)
qdarkstyle >=2.8                :  3.0.3 (OK)
qtawesome >=0.5.7               :  1.1.1 (OK)
qtconsole >=5.0.1               :  5.2.2 (OK)
qtpy >=1.5.0                    :  2.0.0 (OK)
rtree >=0.8.3                   :  0.9.7 (OK)
setuptools >=39.0.0             :  60.2.0 (OK)
sphinx >=0.6.6                  :  4.3.2 (OK)
spyder_kernels >=1.10.1;<1.11.0 :  1.10.2 (OK)
textdistance >=4.2.0            :  4.2.2 (OK)
three_merge >=0.1.1             :  0.1.1 (OK)
watchdog >=0.10.3               :  2.1.6 (OK)
zmq >=17                        :  22.3.0 (OK)

# Optional:
cython >=0.21                   :  None (NOK)
matplotlib >=2.0.0              :  3.5.1 (OK)
numpy >=1.7                     :  1.21.5 (OK)
pandas >=1.1.1                  :  1.2.5 (OK)
scipy >=0.17.0                  :  1.7.3 (OK)
sympy >=0.7.3                   :  None (NOK)

# Spyder plugins:
spyder_notebook                 :  0.3.2 (OK)
dalthviz commented 2 years ago

Hi @richlysakowski thank you for your feedback and willingness to help! I think that make sense to have this shortcuts consistent around the interface :+1: What do you think @spyder-ide/core-developers ?

impact27 commented 2 years ago

If several files are open in the editor, should all the files be zoomed in at the same time? The current behaviour is to zomm in only on the current file.

CAM-Gerlach commented 2 years ago

Absolutely agree IMO; no reason for users to have to remember different shortcuts for every pane, particularly with the zoom shortcuts for the Console not mirroring one another.

If several files are open in the editor, should all the files be zoomed in at the same time? The current behaviour is to zomm in only on the current file.

I'd say yes, but this is fairly orthogonal to @richlysakowski 's issue, I think.

ccordoba12 commented 2 years ago

A couple of comments about this:

CAM-Gerlach commented 2 years ago

Couldn't we just change them in QtConsole? In that case, the shortcuts aren't even internally consistent within the Console, beyond just not matching the other panes. For Files/Projects zooming could change the UI text size, but I'm not sure how easy/doable that is without some refactoring since its a native QWidget rather than being flat rendered content.

ccordoba12 commented 2 years ago

Couldn't we just change them in QtConsole?

Sure, that'd be the idea.

For Files/Projects zooming could change the UI text size

I think increasing font size without icon size would be really odd. Also, I don't know if it's feasible.

CAM-Gerlach commented 2 years ago

Sure, that'd be the idea.

:+1:

I think increasing font size without icon size would be really odd. Also, I don't know if it's feasible.

Yeah, I understand—I don't see it as a blocker on the rest of these changes.

richlysakowski commented 2 years ago

To provide some clarification (I hope).... Initially having the same keyboard shortcuts for all text-based window-pane widgets that do not have icons (i.e., Editor, Console, Help, Variable Explorer, Find, History).

The Editor's keyboard shortcuts are the preferred ones for all text-based widgets (Zoom-in with Ctrl+, and Zoom-Out with Ctrl-) .

The Control+ and Control- are consistent across webbrowsers, so these are favored over Ctrl-Shft- or Ctrl-Shft-.

Zoom-in/Zoom-Out are also fairly frequent operations, so single-finger shortcuts are preferred over multi-fingered combinations.

######################### I am not sure what the right keyboard shortcuts are for the icon-containing widgets (Files, Projects, Plots, etc.) that have icons and BMPs or other graphics objects.

Keep up the good work! I love Spyder. I use it to train my students and for my own development work, because it offers a high level of functionality without the complexity or configuration issues of VScode or PyCharm.

Thank you for actually looking into this. I will check back in on this later.

dalthviz commented 2 years ago

Should we move this to the ux-improvements repo @ccordoba12 ?

ccordoba12 commented 2 years ago

Initially having the same keyboard shortcuts for all text-based window-pane widgets that do not have icons (i.e., Editor, Console, Help, Variable Explorer, Find, History).

The only text-based panes are: Editor, IPython console, Help and History.

Since it's not easy to provide zoom in/out functionality for the other panes (and it seems you find that very important), what if we instead provide keyboard shortcuts to do that for the entire interface? This could provide a more consistent experience for non-text based panes.

ccordoba12 commented 2 years ago

Should we move this to the ux-improvements repo @ccordoba12 ?

Sure, let's move it there.

ccordoba12 commented 2 years ago

@richlysakowski, could you explain why you'd like to see this functionality in Spyder for all panes?