-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #9203: Drag and drop sections between views #9644
Fix #9203: Drag and drop sections between views #9644
Conversation
4c457c5
to
2787877
Compare
@EstherPerelman, are you still having trouble with the Search-in-Workspace widget? When I pull your code, I'm able to search and get results. However, I'm not able to drop anything in that widget. Have you removed the code that placed it in a ViewContainer? |
@colin-grant-work Thank for trying to help! I'm still having this trouble, It's very strange I haven't removed any code - for me it still enables dropping into it but not showing the search results, Do the other containers enable d&d for you? |
Hi all, If there's no solution for fixing the problem with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With minor exceptions (one immediately below, and one in the comments), both of them apparently related to the special status of the debug session widget, this is working pretty well for me. The logic for identifying and moving parts is pretty involved, but I don't see any easy simplifications. I will see if I can work out what's going on with the search-in-workspace widget - I suspect that it's another special case - but I have no objection in principle to merging this and leaving the SIW as a later to-do.
I got somewhat inconsistent behavior with the highlighting for drop. In a plugin view container (GitLens, in my case), and the internal SCM widget, I got highlighting when dropping parts from other containers. However, in the debug view container, after collapsing all of the parts, there was no highlighting when I dragged parts from other containers. The drop functionality still worked fine, though.
@EstherPerelman, I think the Search-in-Workspace widget is actually fine and the problem is only styling - the tree is ending up with a height of |
@colin-grant-work Thank you so much for the help and review! setting the height of |
8c0efe1
to
e9a2fbe
Compare
This is working very nicely for me. Now only the comments about the shifting icons and references to |
Great! I'm still working on this because the restore after refresh(f5) not working well, I still didn't succeed to see it working perfect, Maybe adding a |
I have started to implement as you wrote but saw that it doesn't fit all places (where I have only the
I have spent time on this but
Restore after refresh suppose to work well now... Finally |
4212b43
to
cb3f559
Compare
@colin-grant-work |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work. I almost wanted to approve, until I noticed an issue with reloading the browser application. This happens both on firefox and chrome:
dnd.mp4
As you can see, after reloading and moving a section the view becomes kind of unresponsive and multiple sections try to move into the same space. This issue persists after reloading and can only be resolved by resetting the layout.
Another VSCode feature that doesn't necessarily need to be implemented here, but that you may want to consider is the draggability of parts that are the sole child of their view container. E.g. in VSCode, if the Search-in-Workspace widget is the sole child of the search container, you can start a drag on the |
@colin-grant-work I know about this, it also available in vscode to drop the part header on the sidebar and a new tab will be created, |
It sounds reasonable to omit this for now. I only noticed its absence because I was having trouble finding anything to drag, without the debug widgets being draggable :-). |
@msujew thanks for review & almost approving;) hopping to resolve this soon, I find it little difficult to fix (I'm not familiar with the |
cbeebd3
to
bd37cd1
Compare
|
94f37b3
to
5426df7
Compare
@colin-grant-work I have addressed the issue with
I have pushed a commit that supports the decorations moves, But It doesn't work for the widgets that move into the
I have added a code that opens the part on activating the widget by |
Both of the new behaviors are working for me 👍. @msujew, @vince-fugnitto, would you mind confirming that the bad behaviors have been addressed and there are no new regressions? One thing I realized recently is that the highlight behavior in VSCode (adding a white bar above or below the icon) isn't actually connected to the dragging between containers, but to general drag-drop repositioning behavior, since in VSCode you can drop a |
@injectable() | ||
export class SearchInWorkspaceFactory implements WidgetFactory { | ||
|
||
static ID = SEARCH_VIEW_CONTAINER_ID; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EstherPerelman the static ID
can be removed it is not used, and we already export the constant SEARCH_VIEW_CONTAINER_ID
. We should either use the constant, or the static ID but not both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vince-fugnitto I fixed it, It just the same as done in NavigatorWidgetFactory...
@vince-fugnitto absolutely right! I still think these bars gives the user more indication on the dragging but I can remove it if you want to... |
No, I think the bars are the more future-proof version of the drag-drop marker. Eventually, we will want to be able to drop both inside of and next to, and only the bars - not the shifting behavior - will allow that. Just something for the person who implements the next round to think about 🙂. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to work well in Chrome now, but there's some strange behavior in Firefox (92.0):
dnd-firefox.mp4
As soon as I let the mouse button go, it starts dragging correctly. But before letting go, the dragged container stays at the same place.
d38e7b4
to
5770021
Compare
@msujew thanks for finding that, I called the event Can you merge it for tomorrow release? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, looks good to me 👍
@EstherPerelman last release we had a couple of major regressions after merging big pull-requests late in the month (resulted in two patch releases). Should we instead wait till right after the release so we have the month to discover any possible regressions? In any case I'll still have to take the time to re-review the code and functionality before approving. |
@vince-fugnitto you are right, I also think it's better to wait after the release in case of regressions, Thank you! |
@colin-grant-work / @vince-fugnitto, Please notify me before merging so I'll resolve conflicts.. |
@vince-fugnitto why don't you merge it? I don't want to wait till the end of the month... |
Signed-off-by: Esther Perelman <[email protected]>
Signed-off-by: Esther Perelman <[email protected]>
Signed-off-by: Esther Perelman <[email protected]>
Signed-off-by: Esther Perelman <[email protected]>
This reverts commit 924f67f.
5770021
to
85464e8
Compare
@EstherPerelman I set time aside to be able to test the pr again first (I had never approved) #9644 (comment).
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with the changes, we can fix any possible regressions during the month 👍
@colin-grant-work please merge if you are comfortable with the updates.
Signed-off-by: Esther Perelman [email protected]
This PR enable to group multiple views at the same container without the need to navigate between the containers
What it does
Fix #9203
How to test
Install Docker extension &
Gitlens
extension (available in theiaExtensions
view).Run the command (ctrl + shift + p):
View: Reset Workbench Layout
Try Drag & Drop views between containers:
Attentions:
Extensions
view is disabled (as vscode).File explorer
view part anddebug
view parts (you still able to drop views from other containers on those parts)f5
should work.Review checklist
Reminder for reviewers