You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How can I control the ordering of explorer trees? #45053
I have an extension that contributes some trees in the explorer, some of which are much more important than others. I can't find a way to force the ordering of these - the "important" one always seems to come last.
I tried registering them in a different order but it didn't help. I tried hiding/showing one (using contexts) to see if that would force it to the bottom, but it didn't.
In my case, the "important" tree that I want above the others is hidden/shown based on some criteria, so I need to be able to hide it and then show it later without it having to be last.
Reacted by Romain Rastel, Danny Tuppeny, Paul Riding, Anatoly Pulyaevskiy and Victor Choueiri
Danny Tuppeny (@DanTup) A user can change the order by drag and drop. Currently there is no way for extension author to specify the order. They should come in the order they are registered. Let me know if you do not see this?
Sandeep Somavarapu (@sandy081) Ah, didn't know the user could change them. When you say registered - you mean in Code and not in the package.json? I'll test again and let you know.
Sandeep Somavarapu (@sandy081) The extension isn't installed in my Insiders build, and the windows I tested in is the dev host. I tried:
Closing all instances of Code
Re-opened Insiders
Confirmed the extension is not installed
Opened extension source Code
Pressed F5 to launch the dev host running the dev build of extension
Verified order is still bad
Note: I'm registering and displaying the trees in the opposite order, but I wanted the Flutter Outline (shown later) to still appear above the dep tree (which is rendered early).
I'm registering and displaying the trees in the opposite order, but I wanted the Flutter Outline (shown later) to still appear above the dep tree (which is rendered early)
Order of the trees depend on how to register them in package.json. It does not matter when they are displayed.
Activity
sandy081 commentedon Mar 6, 2018
Danny Tuppeny (@DanTup) A user can change the order by drag and drop. Currently there is no way for extension author to specify the order. They should come in the order they are registered. Let me know if you do not see this?
DanTup commentedon Mar 6, 2018
Sandeep Somavarapu (@sandy081) Ah, didn't know the user could change them. When you say registered - you mean in Code and not in the
package.json? I'll test again and let you know.DanTup commentedon Mar 6, 2018
Registration order in code doesn't seem to do it:
Though note that I use context values to toggle visibility of them (so dependencies was visible to the user before the outline).
sandy081 commentedon Mar 6, 2018
In Package.json
DanTup commentedon Mar 6, 2018
Sandeep Somavarapu (@sandy081) The Flutter Outline view is already the first one in my packages.json:
sandy081 commentedon Mar 6, 2018
Ok, I will accept this as a bug to show the views in the order they are registered.
DanTup commentedon Mar 19, 2018
Sandeep Somavarapu (@sandy081) Still seeing this the wrong way in Insiders dated today. Any ideas?
sandy081 commentedon Mar 19, 2018
Danny Tuppeny (@DanTup) Can you please do following:
DanTup commentedon Mar 19, 2018
Sandeep Somavarapu (@sandy081) The extension isn't installed in my Insiders build, and the windows I tested in is the dev host. I tried:
Note: I'm registering and displaying the trees in the opposite order, but I wanted the Flutter Outline (shown later) to still appear above the dep tree (which is rendered early).
sandy081 commentedon Mar 19, 2018
Order of the trees depend on how to register them in
package.json. It does not matter when they are displayed.Danny Tuppeny (@DanTup) Can you please try it on insiders by installing the extension?
DanTup commentedon Mar 20, 2018
Sandeep Somavarapu (@sandy081) Aha, installing from VSIX it worked!
Why does it behave different when running in the extension dev host?
sandy081 commentedon Mar 20, 2018
Danny Tuppeny (@DanTup) I guess the local storage cached the order. May be clearing the local storage will help.
DanTup commentedon Mar 20, 2018
Sandeep Somavarapu (@sandy081) Actually, looks correct now since I installed/uninstalled, so maybe that cleared something. Thanks for the help!