fix(tags): Various issues with the multiselect tags dialog - #22287
Open
david-allison wants to merge 4 commits into
Open
david-allison wants to merge 4 commits into
david-allison wants to merge 4 commits into
Conversation
Using 'Edit Tags' so there are intermediate states: With BOTH tags `B` and `B`::child` selected on a note. * Deselect `B` * B appears partially checked, as the child remained selected * Submit * `B` remains selected. The user's intention was to remove `B`, but this didn't occur, as we used the visible state of the tag rather than our concept of 'preserved tags'. This fix separates out the display state, so we don't over-select tags Assisted-by: GPT-6
If `B::child` was tagged on one note, with multiple notes: `B` was not considered to be checked, so it would not appear at the top of the page. Now it's marked as indeterminate tag, which we now include at the top and expand. Fixes 15278 Assisted-by: GPT-6
Indeterminate could mean two things with multiselect: * A tag is only applied to some of the notes * Some of a tag's children are selected, but the tag isn't Our tag counts weren't handling this correctly, causing inconsistencies in selection (a tag which had partially-selected descendents, or filtered tags caused this). Now: Counts are removed * A checked parent tag stays checked * A parent is indeterminate if it has selected descendants OR the tag is partially selected * otherwise: unchecked Part of 15278 Assisted-by: GPT-6
Tag nodes had stale references to ViewHolders, so an unrelated tag's checkbox could be modified. Node bindings are now detached correctly. Related to 15278 Assisted-by: GPT-6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Note
Assisted-by: GPT-6
Fixes
Approach
Fix bugs in:
How Has This Been Tested?
Unit tests added
Checklist