-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Work with tabs rather than indices in Terminal Page #8374
Comments
Oh boy, does @leonMSFT have a story to share with you. He tried doing this earlier this year, but it ended up being a dead end. if I recall correctly, the way we're customizing the tabs prevented us from being able to bind them in XAML directly - something about adding the context menus, coloring, etc? I don't remember the details. The original thread was over in #3922 |
@zadjii-msft - wow.. I see the threads. I actually combined two independent questions together:
|
So, we have had issues binding the collection because it puts control of the TabViewItem out of our hands. We wanted to add a context menu (likely doable with binding) and customize some theme resources (likely less doable, but required because of tab color(1)), and the ListView recycling that TabView uses caused tabs to inherit colors from long-dead other tabs. (1) we have a feature request on them to promote Background or Tint as a first-class offering, but as you might expect it is slow going 😄 |
Yeah.. I see the PR: microsoft/microsoft-ui-xaml#3216 (but it is idle for 2 months already). What about the indices - I closed a bunch of tabs and dragged the remaining, found myself with 1 more tab than I expected. |
I very much believe we should get off indices wherever possible, yes. 😄 |
Then I will try to take a look at it 😊 |
Re: your assignment - no pressure of course 😄 We'll all be on holiday soon, so it's going to slow down around here! |
Thanks again for finding these things and working to improve our code health/understandability/maintainability/features/pretty much everything! |
Description of the new feature/enhancement
The current implementation of tab management in TerminalPage uses indices as a way of communication (we remove tabs by index, we update tabs by index, we drag tabs by index, even switch to tab command stored within tab points to an index).
This creates numerous theoretical races (that materialize from time to time, at least when I am testing).
In addition, I would also expect that we will work only with a single source of truth, rather than managing both _tabs and _tabView.TabItems manually
I guess there might be a reason for the current approach of working with indices rather than tabs and for managing two collections, but I wasn't able to find it in a documentation
Proposed technical implementation details (optional)
The text was updated successfully, but these errors were encountered: