This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Fix FlipView / WorkingSet / SplitViewSameDoc integration issues #12065
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a continuation to #12060 and is similarly targeted to @swmitra's
BugFixesFor1.6Betabranch instead of the master.This PR fixes following issues:
Dirty doc working set flip issue
We check in Pane.js#L585 if the current file being flipped is actually on the working set: if it isn't, we destroy the view and return as resolved instead of adding it to the other
Panes_viewListFlip the behavior of
focused-editor-after-flipAs discussed in #12060 (comment), this commit essentially flips the following commit around: petetnt@8bc2845
This way the focused editor after flipping any view is the same one that was focused before the flip.
Prevent splicing the wrong file when the file isn't on the working set
This issue was caused by the same problem than the previous one.
Unify handling of flipping and drag & dropping across working set
By closing duplicate entries before flipping the view (if it already is open on the other pane) we make sure that
D&DandFlipViewscenarios handle the same way: currently the pane the file gets dragged/flipped to stays open_[1]_. This also fixes issues where clicking theFlipViewbutton duplicates the current view instead of just moving it to another one (when the same file had previously been opened and closed in the other pane)./ping @swmitra 📝
This PR together with #12060 still needs some extensive unit tests, but I think those are easier to add in bulk when we get the baseline functionality fixed.
[1] This would need some kind of merge functionality as discussed in #12060 (comment), but I don't think it's possible to land in 1.6.