Skip to content

Conversation

octref
Copy link
Contributor

@octref octref commented Mar 1, 2018

@isidorn Not done yet. I found panelService is not returning the panels in correct order when some of them were hidden / move-around.

Any idea how can I retrieve the order and visibility of the panels? IPanel and IPanelIdentifier don't seem to have it.

@octref octref requested a review from isidorn March 1, 2018 07:35
@isidorn
Copy link
Collaborator

isidorn commented Mar 1, 2018

@octref only the compositeBar inside the panel has that knowledge, try getting it from there.
Nothing for endgame -> march

@isidorn isidorn added this to the March 2018 milestone Mar 1, 2018
@octref
Copy link
Contributor Author

octref commented Mar 1, 2018

I also wanted to suggest having Ctrl-Tab and Ctrl-Shift-Tab bound to them using panelFocus. But it seems we don't have that when condition and have to do terminal/output/problems/debug-console focus. But when I look even closer there seems to be no output focus or debug-console focus...

Just want to know if you are pro or against adding those two shortcuts behind the when clause and if I should look deeper into this.

@isidorn
Copy link
Collaborator

isidorn commented Mar 1, 2018

Against since it will break muscle memory of users. Currently ctrl-tab changes the editor no matter the focus. I would not just change this.

@octref
Copy link
Contributor Author

octref commented Mar 1, 2018

@isidorn How about cmd + ] and [? They are bound to indentLine or outdentLine by default on editorTextFocus. I'm thinking about making them go to next/prev Viewlet or Panel Item when Sidebar or Panel has focus.

@isidorn
Copy link
Collaborator

isidorn commented Mar 1, 2018

@octref let's start without a default shortcut and if we see that this action is popular we can easily add one later. This is a better strategy than adding first since it is later hard to remove

@isidorn isidorn modified the milestones: March 2018, On Deck Mar 2, 2018
@octref octref force-pushed the octref/panel-actions branch from 6dbac1a to 9ece20e Compare March 26, 2018 07:47
@octref
Copy link
Contributor Author

octref commented Mar 26, 2018

@isidorn I'm not sure if I understood your suggested approach, but this seems to work fine.

@isidorn
Copy link
Collaborator

isidorn commented Mar 26, 2018

@octref thanks for your PR. However this week we are in endgame and on Thu I go on vacation so I will review this next milestone. Hope that makes sense.

@isidorn isidorn modified the milestones: On Deck, April 2018 Mar 26, 2018
@octref
Copy link
Contributor Author

octref commented Mar 26, 2018

Sure, see you next month :)

@isidorn
Copy link
Collaborator

isidorn commented Apr 19, 2018

@octref thanks again for your PR. However I find it strange that we add next / previous panel and we do not add next / previous viewlet.
How does this go together with the Views > Open View action.
From the implementation perspecitve everything looks great. Except that I would try to do more code reuese between the two actions. Since they are doing everything the same just the +1 or -1 on to which panel to navigate.

fyi @sandy081 since he is tackling various views this milestone

@isidorn isidorn modified the milestones: April 2018, On Deck Apr 19, 2018
@octref octref force-pushed the octref/panel-actions branch from 30e0514 to 204653f Compare April 19, 2018 16:17
@octref
Copy link
Contributor Author

octref commented Apr 19, 2018

@isidorn

However I find it strange that we add next / previous panel and we do not add next / previous viewlet.

I think it's better to do that as another PR. I can do it too.

How does this go together with the Views > Open View action.

I never used it. I believe that action serves a different purpose than this one. Ideally in each group (editor, viewlets, panels) I just want an action to go to the prev/next thing visually, not to recall names of each parts of VS Code and jump to it.

What I asked for in #15262 (UI part aside) is contextual ctrl+tab. Ideally I hope we can have these commands / when clauses

Ctrl-Shift-Tab:

  • workbench.action.previousPanelItem when panelFocus
  • workbench.action.previousViewlet when viewletFocus (or sidebarFocus)
  • workbench.action.previousEditor when editorFocus

Ctrl-Tab:

  • workbench.action.nextPanelItem when panelFocus
  • workbench.action.nextViewlet when viewletFocus (or sidebarFocus)
  • workbench.action.nextEditor when editorFocus

Except that I would try to do more code reuese between the two actions.

I addressed that.

@isidorn
Copy link
Collaborator

isidorn commented Apr 20, 2018

@octref thanks. The PR looks good to me know. And these actions make sense.
Let's see what @bpasero and @sandy081 think about introducing these actions and if they are ok we can merge it in.

@bpasero bpasero self-assigned this Apr 20, 2018
@bpasero bpasero modified the milestones: On Deck, April 2018 Apr 20, 2018
@sandy081
Copy link
Member

I think having similar action to navigate viewlets is good. How about navigating views inside viewlet?

@bpasero bpasero modified the milestones: April 2018, May 2018 Apr 20, 2018
@bpasero
Copy link
Member

bpasero commented Apr 20, 2018

@isidorn if you want to merge for April, feel free to review. otherwise running out of time, moving to May.

@isidorn
Copy link
Collaborator

isidorn commented Apr 20, 2018

@bpasero I reviewed this and the code is good. I just need your blessing to add the "Next Panel" / "Previosu Panel" actions. You do not have to look at the code

@bpasero
Copy link
Member

bpasero commented Apr 20, 2018

@isidorn oh OK. We can have the actions but I am with @sandy081 and think for consistency we could have the same actions for viewlets as well. I am not sure about navigating within viewlets to other views, for that you could probably just "Tab".

@octref I think commands like "Previous Panel item" should user uppercase all the way (e.g. Previous Panel Item)

@bpasero bpasero removed their assignment Apr 20, 2018
@bpasero bpasero modified the milestones: May 2018, On Deck Apr 20, 2018
@isidorn
Copy link
Collaborator

isidorn commented Apr 20, 2018

@bpasero great, thanks for feedback
@octref then this PR is good, just update the label and once you provide the viewlet actions PR I will merge both these things in. In the meantime let's keep this on deck.

@octref octref force-pushed the octref/panel-actions branch from 7b34089 to e8f6c02 Compare April 23, 2018 16:35
@octref
Copy link
Contributor Author

octref commented Apr 23, 2018

@isidorn @bpasero I've cleaned up the API a bit, including

  • getOrderedPanels(): string[] -> getPinnedPanels(): IPanelIdentifier[] to follow more of our terminology and align with getPanels
  • Clarified a bit on that getPanels return panels following the visual order

I have a question though. In compositeBar.ts, now we have this:

	private getVisibleComposites(): string[] {
		return Object.keys(this.compositeIdToActions);
	}

	public getPinnedComposites() {
		return this.pinnedComposites;
	}

They seem to be doing the same thing.

  • Why is getVisibleComposites using Object.keys(this.compositeIdToActions) instead of pinnedComposites? Are those two different in some scenarios?
  • Can I remove getPinnedComposites and make getVisibleComposites public?

@isidorn
Copy link
Collaborator

isidorn commented May 11, 2018

@octref sorry for not responding I was on vacation when you asked the question.
And now @sandy081 has refactored the whole rold of the compositeBar so you would have to check with him.
So for us to continue here can you please resolve conflicts possible with the help of Sandeep and once we have taht we can merge that in if @sandy081 agrees

@octref octref force-pushed the octref/panel-actions branch from d8dcd03 to cf7cc92 Compare September 24, 2018 17:35
@octref
Copy link
Contributor Author

octref commented Sep 24, 2018

A lot has changed on master.. I'll open a new PR.

@octref octref closed this Sep 24, 2018
@octref octref deleted the octref/panel-actions branch September 24, 2018 17:38
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants