spyder-ide / ux-improvements

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

Improvement suggestion: unify opened files' tabs #71

Open ubaldot opened 1 year ago

ubaldot commented 1 year ago

When you split screen you have a repetition of the opened files. This won't bring any major benefit but it subtract precious space on the screen and make it difficult to navigate between the opened files.

My suggestion is to unify the tabs and let them common, see picture below:

image

Sometimes I do use gvim(though I prefer Spyderfor a number of reasons, like for example the variable explorer, the outlinetab, etc. other than it works amazingly just out of the box without getting mad in tewaking) and it has the desired layout, see below:

image

A good key binding for navigating through the opened files could be Ctrl-PgUp and Ctrl-PgDn.

dalthviz commented 1 year ago

Hi @Ubaldo79 thank you for the feedback! I'm not totally sure about this but what do you think @spyder-ide/core-developers ?

Also, just in case, I think currently you can use Ctrl + PgUp and Ctr + PgDn to move around the files. You can also use the File Switcher (Ctrl + P) to move around files:

filemov

Also, currently you can hide the tabs in the Editor if you want by unselecting the option Show tab bar at Preferences > Editor > Show tab bar:

imagen

imagen

Maybe a mix of these elements could be a way to achieve a better workflow for you @Ubaldo79 ? Let us know!

mrclary commented 1 year ago

I understand @Ubaldo79's concern about redundancy. However, when the Editor has a split window, the user must be able to navigate independently in each split window and have each split window indicate which file is currently active, even when not focused. Having the tab bar visible in each split window accomplishes this. Unifying the tab bar would only indicate the currently active document in the currently focused split window; the user would have to give focus to a split window to know which document is active in that split window.

ubaldot commented 1 year ago

@mrclary you got the point, but in all honesty I’d rather have unified tabs thus losing the awareness of what is in the non-active split rather than having a very tiny small space that fills up extremely quickly but knowing what is in the other split just by looking at the tabs.

The former is certainly preferred, every day. :) Especially if you are doing a major work that requires many files to be opened at the same time :) Note that also other editors like vim or vscode has unified tabs. :)

ubaldot commented 1 year ago

@dalthviz great for the C-PgUp/Dn! Hiding the tabs is not a solution, I need to jump from one file to another very often (especially if you are working in test-driven development) :)

Btw, I was not aware of the Crrl-P. That’s sweet!

maurerle commented 1 year ago

Best solution would be to have the two open windows highlighted in different colors, so that on can see which is the active open file and the other opened file in the tabs.

But then it would be hard/impossible to open the same file next to each other to look a different portions of the same file (because it is so large) Also if there are more than 2 windows open one would need a lot of different shades..

Somehow the current solution does not seem that bad and is quite generic.. Even though the current usability also has its flaws..

ubaldot commented 1 year ago

@maurerle the shades are not super important as the user can see the cursor on the active window, but having a shade only on the active window would be actually handy.

I think it would be enough ONE shade only for signaling the active window only, leaving all the others unshaded, and that’d be all. :)

CAM-Gerlach commented 1 year ago

To note, while probably not impossible, this would require a substantial amount of UX redesign and UI work given it the tab bar is currently intrinsic to the split panel.

Hiding the tabs is not a solution, I need to jump from one file to another very often (especially if you are working in test-driven development) :)

Instead of the tab bar, you can use the Outline pane with Show all files turned on (and Follow cursor turned off), which becomes a single unified vertical file switcher that can show far more files than even a full-width horizontal tab bar. This is what I do (and matches the UI of other editors, such as Notepad++), and I find it very effective at switching between the large number of files I tend to have open at once.

Unifying the tab bar would only indicate the currently active document in the currently focused split window; the user would have to give focus to a split window to know which document is active in that split window.

To note, this is what I thought too at first but the path bar in each pane still shows the full file path, albeit perhaps a bit harder to read at a glance.

Best solution would be to have the two open windows highlighted in different colors, so that on can see which is the active open file and the other opened file in the tabs.

This also wouldn't work if the tabs are relatively far apart from one another.

dalthviz commented 1 year ago

Thank you all for the feedback! Just in case, I will move this issue in to the spyder-ide/ux-improvements repo to continue the discussion there

ubaldot commented 1 year ago

Instead of the tab bar, you can use the Outline pane with Show all files turned on (and Follow cursor turned off), which becomes a single unified vertical file switcher that can show far more files than even a full-width horizontal tab bar. This is what I do (and matches the UI of other editors, such as Notepad++), and I find it very effective at switching between the large number of files I tend to have open at once.

This in interesting and I will give it a shot. :) But wouldn’t you lose the wonderful class view when you are working with classes? :) I understand that you cannot have everything 😅

CAM-Gerlach commented 1 year ago

You can still have that, with or without auto-uncollapse depending on what you set Follow cursor position to. There's also the Editor-level class selector somewhat hidden under Source -> Show selector for classes and functions if that's useful to you.

ubaldot commented 1 year ago

Lovely! I ‘ll give it a shot once back home, I am going on the beach now (and for the rest of the weekend) 😊