Add project tab-navigation + Focus Sidebar key bindings#154
Conversation
|
Nice work — the wrapping move semantics and the ring/focus-mode split are clean, and the test coverage is solid (Workspace moves, the sidebar ring, and the arrow-key modifier regression test all pull their weight). A few notes: 1. let relevant: NSEvent.ModifierFlags = [.command, .control, .option, .shift]
return event.modifierFlags.intersection(relevant) == modifiersThis is the same set as return event.modifierFlags.intersection(HotkeyRegistry.comparableModifierMask) == modifiers2. The if let mainWindow, let keyWindow = NSApp.keyWindow, keyWindow !== mainWindow, …When 3. Two
Both may be deliberate, just flagging since they're outside the stated scope. 4. Minor: making |
|
I will need to pick through these when I have a moment to spare, to remember exactly what was done why. Removing the sidebar max-width was added and I forgot to document it. The sidebar hides the long named items and it is difficult to differentiate one similar tab from another.. The original sidebar and activeTab would fignt against keyboard navigating the project and tab list. The moment a tab in the sidebar was highlighted the activeTab would switch and grab focus preventing you from actually keeping the sidebar+tab list in focus and navigating it. That was where a log this comes from. The project list and tab list in the sidebar was not a first-class tool that allows navigation by keyboard, it was a presentation of the tabs and projects that only allows a single select/click and that was it, and then it was defocused and you are thrown into the activeTab. Much of my extra code over simply adding key bindings was fighting the sidebar that wasn't first class item that allows true interaction. |
What
Add Key Bindings to
Rearrange tab higher in project
Rearrange tab lower in project
Select previous tab in project
Select next tab in project
Focus and Open SideBar temporarily until new tab is selected, or ESC defocuses SideBar
Allow navigating SideBar with arrow keys
Prevent active tab from grabbing focus when a tab in the SideBar is selected/highlighted but not formally chosen
Why
Allow for keyboard driven reorganizing and managing tabs.
Closes #113
How
Verified
mise run format,mise run lint, andmise run testall passmise run run) and confirmed the behaviorNotes for reviewers