Repository navigation
NO-1520: Select All / Deselect All toggle for multi-select fields & table/collection cells - #398
Open
vivekjyani wants to merge 5 commits into
Open
vivekjyani wants to merge 5 commits into
vivekjyani wants to merge 5 commits into
Conversation
…ields and table/collection cells
…/collection cells
Collaborator
Author
|
Review: approve ✅ Clean approach — one reusable No blocking issues. Minor nits (non-blocking):
Tests meaningfully assert committed values, not just taps — coverage is adequate for the UI layer. Full analysis in review notes. |
vivekjyani
commented
Oct 19, 2026
vivekjyani
left a comment
Collaborator
Author
There was a problem hiding this comment.
Inline review notes (all non-blocking — overall approve). See each thread for detail.
…ment toggle state sync
…d and table/collection cells
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.
Context
Multi-select fields (and multi-select table/collection cells) only allowed selecting options one at a time. Spec asks for a bulk Select All / Deselect All control, and the toggle must NOT be one of the selectable options itself.
What changed
SelectAllToggleButton<T>(new, inMultiSelectionView.swift) — shared, generic toggle rendered above the options box. Selects every option id / clears all; label flips between "Select All" and "Deselect All".MultiSelectionView.swift— renders the toggle for the simple form field whenmulti == true.TableMultiSelectView.swift— renders the same toggle, pinned above the sheet's ScrollView, for multi-select table/collection cells; edits go through the existing temp-array → Apply path.MultiSelectionDataModel(+DocumentEditor) — added amodefield (fed fromfieldEditMode) so the field view can tell when it's readonly.mode != .readonly/cellModel.editMode != .readonly).Decisions
SelectAllToggleButton<T: Identifiable>) instead of two copies — the simple field passesOption, the cell passesOptionLocal; both satisfygetId: (T) -> String?.isSelectedcomputed, not@StateinTableMultiSelection— a@Statecopy ignored external array mutations, so Select All didn't update the checkmarks. Computed value stays reactive.Screenshot / video
Public API / docs
No public API change —
SelectAllToggleButton,MultiSelectionDataModel, and the views are internal; the newmodehas a.filldefault (non-breaking). No docs update needed.Test coverage
Covered via XCUITest (UI bridge can't run in CI sandbox; verified on simulator):
Reviewer notes
multi: truecolumn exists in the table/collection fixtures, so the readonly-hide path is UI-tested only on the simple field; table/collection share the identicaleditMode != .readonlygate. Can add a fixture + test if you want explicit coverage.