Repository navigation
fix(ui): let Space tick package rows on macOS and have VoiceOver say so - #29
Merged
Merged
Conversation
On macOS the packages list is a wxDataViewCtrl whose checkbox column only changes on a click. VoiceOver sends one for VO+Space while interacting with the list, but a plain Space reached no handler at all, so a keyboard user could not tick anything (Timtam#28). Space on the selected row now runs the same toggle as a click: the model's set_value body moved into a shared closure that both call, and the toggle column's state is read through one helper, which also replaces the four copies of the group aggregate in get_value. Disabled rows are left alone, as with a click. A toggle made from code gives VoiceOver nothing to read, because the row it is on is rebuilt behind it. A small voiceover module posts NSAccessibilityAnnouncementRequestedNotification with the row's new state ("Checked" / "Unchecked", in all five locales). It uses CoreFoundation's toll-free bridged types, so no Objective-C runtime calls or new crates. Fixes Timtam#28 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main split the UI crate into modules (Timtam#27) after this branch was made, so its changes to lib.rs and wx_app.rs are carried into the modules the code moved to: - The voiceover module is declared in the new lib.rs, and the two new strings join WizardText in wizard/model.rs and wizard/text.rs. - The Mac package list changes (the shared toggle, its state helper, the Space key handler and the model's new return type) go into wx_app/packages_page/dataview.rs. That module is gated as a whole, so the per-item cfg(not(target_os = "windows")) lines are dropped. A three-way comparison of every item (base, this branch, main, merged) found nothing lost on either side. dataview.rs only builds on macOS, so it was also type-checked on Windows by pointing the package page at it for the check: no errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The module split (Timtam#27) gave dataview.rs its own imports, and six of them were never used there: two Enter key codes the Windows-side widgets use, and four functions the toggle code calls with crate:: paths or doesn't call at all. macOS builds only warned about them, but they hid any new warning in the file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Timtam
added a commit
to math65/rabbit
that referenced
this pull request
Oct 6, 2026
main now has the UI crate split (Timtam#27) and Timtam#29 as merged there, so this branch's own changes to wx_app.rs are carried into the modules the code moved to: - The announce helper and its priority go into wx_app/globals.rs, made crate-visible because the progress page, the version check and the Mac package list all call it. - The announcements land in wx_app/progress_ui.rs, wx_app/version_check.rs and wx_app/packages_page/dataview.rs; the toggle's new return type drops the per-item cfg, as the whole module is macOS-only. - choice_shown_note moves next to its only caller in dataview.rs: in widgets.rs it was dead code on Windows, and it had been placed between set_optional_choice_shown and that function's doc comment. A three-way comparison of every item (base, this branch, main, merged) found nothing lost. dataview.rs was also type-checked on Windows by pointing the package page at it: no errors, no warnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes #28.
What was wrong
On macOS the packages list is a
wxDataViewCtrlwhose checkbox column only changes on a click. VoiceOver sends one for VO+Space while the user is interacting with the list, but a plain Space reached no handler at all. So unless you knew to interact first, nothing could be ticked from the keyboard, which is what xogium hit.What changed
set_valuebody moved into a shared closure that both call. Disabled rows are left alone, as with a click.voiceovermodule postsNSAccessibilityAnnouncementRequestedNotificationwith "Checked" / "Unchecked" (new keys in all five locales). It builds the dictionary with CoreFoundation's toll-free bridged types, so there are no Objective-C runtime calls and no new crates.packages_tree_toggle_state, which also replaces the four copies of the group aggregate inget_value. Most of the diff's line count is that closure moving and being re-indented.Testing
Validated on macOS with VoiceOver (fr-FR): Space on packages, groups and a disabled row; VO+Space while interacting still toggles once and isn't doubled.
cargo fmt,cargo clippy -p rabbit-ui-wxdragon --features gui(no new warnings) andcargo testare clean locally.Windows is untouched: all of this sits in the non-Windows DataView path, apart from the two locale keys.
Heads-up: this will conflict with #27 (the UI crate split), since it edits the DataView page and model. Happy to rebase whichever lands second.
🤖 Generated with Claude Code