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

ItemsControl / ListBox Issues Roll-up #13736

Open
3 of 5 tasks
robloo opened this issue Nov 25, 2023 · 11 comments
Open
3 of 5 tasks

ItemsControl / ListBox Issues Roll-up #13736

robloo opened this issue Nov 25, 2023 · 11 comments
Labels

Comments

@robloo
Copy link
Contributor

robloo commented Nov 25, 2023

Describe the bug

This is a Roll-up of Issues

Over the months the new ListBox and ItemsControl with many virtualization improvements has been put to the test. There are still some open issues with this group of controls after the rewrite that I want to summarize here. These issues are severe enough in some cases to prevent usage in production apps and also did not exist in the 0.10 version which performed almost flawlessly in general use (without virtualization).

Other

Expected behavior

Everything should work as well as WPF and 0.10.

Additional context

This is a rough issue for now. There are many different issues and this is a first attempt to start bringing them all together and make sense of it. Expect this issue to change quite a bit as things are narrowed down and better understood. As I find better bug reports those will be linked in as well.

See individual issues and discussions for more details.

@robloo robloo added the bug label Nov 25, 2023
@grokys
Copy link
Member

grokys commented Nov 25, 2023

Thanks for putting this together @robloo ! I hope to start looking into this issues next week.

@robloo
Copy link
Contributor Author

robloo commented Nov 25, 2023

@grokys I'm glad I can help a little. Great work with these controls!

@grokys
Copy link
Member

grokys commented Nov 29, 2023

ObservableCollection changes are not picked up and processed correctly. It seems to corrupt the state in some cases if the bound collection is cleared/reset OR items are added/remove.

Do we have a simple repro for this anywhere?

@robloo
Copy link
Contributor Author

robloo commented Nov 29, 2023

ObservableCollection changes are not picked up and processed correctly. It seems to corrupt the state in some cases if the bound collection is cleared/reset OR items are added/remove.

Do we have a simple repro for this anywhere?

Not that I've seen in the bug reports. This is just a general impression I've had and I've seen it with internal apps as well. I'll spend some time to try and find an exact repro.

@robloo
Copy link
Contributor Author

robloo commented Nov 30, 2023

I'm attempting to isolate some repro for these narrowed cases:

  1. ItemsSource changing references in the view model (i.e. set a new ObservableCollection to the property bound to ItemsSource)

    There have been a few different reports of issues here and I've seen some cases myself. However, I can't repro it in a simple test case. There is still an open bug report for somethin related though: ListBox/VirtualizingStackPanel reverses order of containers when ItemsSource binding changes, breaking Tab navigation #11846

  2. Adding/Removing items from an existing ObservableCollection isn't displaying correctly in the UI.

    This one I'm not 100% sure is a stand-alone issue. It could be related to older issues and the VirtualizaingStackPanel fixes already made. Because I'm not sure this is a real problem I'm going to ignore it without further information. Also note I cannot repro it in a simple test case.

  3. Changing existing view models within an existing observable collection (recycling).

    I've seen issues with this in a real app and there are some other bug reports and comments I've seen to indicate it's a problem. For example it might be related to this somehow: Combobox selectedValue in datagrid is changed when scrolling datagrid #13751. However, I also cannot repro this in a simple case. I will attempt to isolate it more in the actual app.

    Also note that UWP/WinUI marshalled INotifyPropertyChanged automatically to the UI thread in the case of bindings and things. I don't think Avalonia does that. This MAY be a contributor as code I'm working with was ported so this type of thing can be hard to find after the fact. I'm attempting to confirm all UI updating code paths are getting run on the UI thread.

    A takeaway here is if Avalonia does not automaticaly marshel INotifyPropertyChanged to the UI thread for binding perhaps it should and that could be done with the binding refactoring.

Bottom line, don't waste your time on the points I can't confirm. Those were general categories of issues I thought there were problems but it needs to be understood more.

@timunie
Copy link
Contributor

timunie commented Dec 1, 2023

To add: #13751

@timunie
Copy link
Contributor

timunie commented Dec 8, 2023

Yet probably another one: #13875

@maxkatz6
Copy link
Member

#14389 #14365

@MrJul
Copy link
Member

MrJul commented Feb 24, 2024

Another one: #14718

@timunie
Copy link
Contributor

timunie commented Mar 5, 2024

adding #14814

@timunie
Copy link
Contributor

timunie commented Apr 2, 2024

yet another: #15194

@robloo we may want to update the check-list the other day to reflect current status better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants