spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.33k stars 1.61k forks source link

Add controls for long plot list navigation #13050

Open eafpres opened 4 years ago

eafpres commented 4 years ago

Problem Description

Feature Request

With lots of plots, it's slow to move far, UX would improve with more controls

What steps reproduce the problem?

  1. Run code that generates 50 plots
  2. Navigate plots and get frustrated

What is the expected output? What do you see instead?

It would be very nice to be able to jump farther in the plots than is currently provided. A great first step would be jump to beginning (e.g. <<) and jump to end (e.g. >>)

Paste Traceback/Error Below (if applicable)

NA

Versions

Spyder 4.1.2
Python 3.7.6 64-bit
Qt 5.9.6
PyQt5 5.9.2
Windows 10

Dependencies

# Mandatory:
atomicwrites >=1.2.0           :  1.3.0 (OK)
chardet >=2.0.0                :  3.0.4 (OK)
cloudpickle >=0.5.0            :  1.3.0 (OK)
diff_match_patch >=20181111    :  20181111 (OK)
intervaltree                   :  None (OK)
IPython >=4.0                  :  7.12.0 (OK)
jedi =0.15.2                   :  0.15.2 (OK)
nbconvert >=4.0                :  5.6.1 (OK)
numpydoc >=0.6.0               :  0.9.2 (OK)
paramiko >=2.4.0               :  2.7.1 (OK)
parso =0.5.2                   :  0.5.2 (OK)
pexpect >=4.4.0                :  4.8.0 (OK)
pickleshare >=0.4              :  0.7.5 (OK)
psutil >=5.3                   :  5.6.7 (OK)
pygments >=2.0                 :  2.5.2 (OK)
pylint >=0.25                  :  2.4.4 (OK)
pyls >=0.31.9;<0.32.0          :  0.31.9 (OK)
qdarkstyle >=2.8               :  2.8 (OK)
qtawesome >=0.5.7              :  0.6.1 (OK)
qtconsole >=4.6.0              :  4.6.0 (OK)
qtpy >=1.5.0                   :  1.9.0 (OK)
rtree >=0.8.3                  :  0.9.3 (OK)
sphinx >=0.6.6                 :  2.3.1 (OK)
spyder_kernels >=1.9.0;<1.10.0 :  1.9.0 (OK)
watchdog                       :  None (OK)
zmq >=17                       :  18.1.1 (OK)

# Optional:
cython >=0.21                  :  0.29.13 (OK)
matplotlib >=2.0.0             :  2.2.3 (OK)
numpy >=1.7                    :  1.17.4 (OK)
pandas >=0.13.1                :  1.0.3 (OK)
scipy >=0.17.0                 :  1.3.3 (OK)
sympy >=0.7.3                  :  1.5.1 (OK)
dalthviz commented 4 years ago

Hi @eafpres thanks for the feedback! I think it could be nice to have such a feature indeed. What do you guys think @jnsebgosselin @ccordoba12 @goanpeca ?

goanpeca commented 4 years ago

Sounds good to me. A question: When in the thumbnail scrollbar, is it possible to use Cmd/Ctrl+home / end and have this effect?

eafpres commented 4 years ago

Just tested ctrl-home, ctrl-end, no effect (while code is running). Other controls work at this time. Would have been an excellent work around!

ccordoba12 commented 4 years ago

This is an excellent point! We'll try to take a look at it for 4.2.0 (to be released at the end of August).

jnsebgosselin commented 4 years ago

So basically, we need to add a First plot and Last plot button and assign the Cmd/Ctrl+home / end to them?

eafpres commented 4 years ago

So basically, we need to add a First plot and Last plot button and assign the Cmd/Ctrl+home / end to them?

That sounds right to me; however Cmd/Ctrl+home / end does work when the focus is in the code panel, the console panel, and the variable explorer. So there would need to be an action to shift the focus to the plots list. Currently, this is NOT necessary to just scroll it--hover does the job. But hovering in the plot list when the last focus was one of the other panels and using Cmd/Ctrl + home / end moves to the top/bottom of that previous panel.

jnsebgosselin commented 4 years ago

[...] So there would need to be an action to shift the focus to the plots list. Currently, this is NOT necessary to just scroll it--hover does the job. But hovering in the plot list when the last focus was one of the other panels and using Cmd/Ctrl + home / end moves to the top/bottom of that previous panel.

I think this can already be done through the switch to plots shortcut.

image

eafpres commented 4 years ago

I think this can already be done through the switch to plots shortcut. I think that and/or clicking in plots is sufficient. Thanks for the clarifications.