Skip to content
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 reordering tabs mysteriously shuffling the actual backing tabs #15178

Merged

Conversation

zadjii-msft
Copy link
Member

TL;DR: we stopped getting TabView.TabItemsChanged. This meant that the tab view would change its apparent order, but we wouldn't change the backing tab order.

I'm fixing this by grabbing the index of the tab that starts the drag, and the index of the tab view item at the end of the drag, and using that to reorder our backing list.

Closes #15121

Upstream microsoft/microsoft-ui-xaml#8388

Regressed in #15078 - I'm pretty confident about this, since I've got a 1.18.931 build of the Terminal with tear-out, but not MUX 2.8.

@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-User Interface Issues pertaining to the user interface of the Console or Terminal Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Severity-Blocking We won't ship a release like this! No-siree. labels Apr 13, 2023
@github-actions

This comment has been minimized.

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as this works. Are we sure that this works? I'm mildly horrified that we get the event after it's rearranged our backing store, but.. whatever man

@@ -4739,8 +4740,8 @@ namespace winrt::TerminalApp::implementation
}
}

// `this` is safe to use
const auto request = winrt::make_self<RequestReceiveContentArgs>(src, _WindowProperties.WindowId(), index);
const auto myId{ _WindowProperties.WindowId() };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated, but i don't mind?

@zadjii-msft zadjii-msft added the AutoMerge Marked for automatic merge by the bot when requirements are met label Apr 14, 2023
DHowett added a commit that referenced this pull request Apr 14, 2023
Copy link

@djdv djdv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works on my machine™
Thanks :^)

@microsoft-github-policy-service microsoft-github-policy-service bot deleted the dev/migrie/b/15121-over-and-under-hill branch April 17, 2023 13:27
zadjii-msft added a commit that referenced this pull request May 8, 2023
@zadjii-msft zadjii-msft mentioned this pull request May 8, 2023
DHowett pushed a commit that referenced this pull request May 10, 2023
Reverts #15164, because that's fixed upstream now.

Closes #15139. 

Reverts #15178, but also closes #15121, because that's fixed upstream.

see also:
* microsoft/microsoft-ui-xaml#8430
* microsoft/microsoft-ui-xaml#8420
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Severity-Blocking We won't ship a release like this! No-siree.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reordering tabs messes up relation between tabs and panes
4 participants