-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[WIP] Add ListViewGroup items to ListView when adding group #4000
Conversation
Will this fix #3439? |
b7f0f22
to
3b07c6b
Compare
@@ -129,8 +129,6 @@ public void ListViewAccessibleObject_ListWithTwoGroups_FragmentNavigateWorkCorre | |||
item2.Group = group; | |||
item.Group = group; | |||
listView.Groups.Add(group); | |||
listView.Items.Add(item); | |||
listView.Items.Add(item2); |
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.
only problem with the fix is that this now throws ArgumentException
as listView.Items
already contains item
and item2
as they were added in the call to listView.Groups.Add(group)
I'm not sure of the best solution as this may be a significant breaking change?
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.
Thinking out loud here.
From a user perspective the following use would likely look logical and expected:
- If an item added to a group, and then the group is added to the listview - all items should have a link to the listview.
- If the group is removed from the listview - all items in the group should no longer have links to the listview.
- If the group (with items) is added to the listview, and then the same item is added to the listview - then the operation is no-op.
- If an item is added to the listview, and the added to the group - no-op, the item is already linked to the listview.
- If an item is added to the group, which is bound to the listivew - the item linked to the listview.
- If an item is removed from the group, which is bound to the listview (i.e.
item.Group = null
), it remains in the listview. - If an item is removed from the group, which is not bound to the listview (i.e.
item.Group = null
), the item must not have a link to the listview. (We should never be in this situation).
I don't have a formed opinion about the following use case though:
- If an item that has a link to listivew1 is then added to listview2 - then it is
- an IOE? or
- silent re-assign the link to listview2?
@merriemcgaw @Tanya-Solyanik @JeremyKuhne thoughts?
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.
We might want to consider overloading the API to allow people to opt into what we think is the "better" behavior. So keep the existing behavior without the option...
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 think @JeremyKuhne has a great point. We've had the 'bad' behavior long enough that I think people have worked around it and we don't want to break them by default.
3b07c6b
to
9865e5e
Compare
@hughbe, checking back to see if you get some time to take this to finish line. |
The current status of this "draft" PR has persisted for over 180 days, making it highly probable that it is no longer aligned with the latest codebase. Our repository is set up to automatically close draft PRs that have become outdated, and it requests the author to revisit and reopen them if they deem it necessary, thereby bringing them to the team's attention. |
Fixes #3987
WIP as I need to do more testing and check some things
Proposed changes
Customer Impact
Regression?
Risk
Microsoft Reviewers: Open in CodeFlow