Skip to content

feat: add macOS-style expandable multi-row candidate grid - #1208

Open
LeoCrayon wants to merge 2 commits into
rime:masterfrom
LeoCrayon:pr/expandable-grid
Open

LeoCrayon wants to merge 2 commits into
rime:masterfrom
LeoCrayon:pr/expandable-grid

Conversation

@LeoCrayon

Copy link
Copy Markdown

Ref #844

Adds a macOS native-style expandable multi-row candidate grid for linear + horizontal layouts (opt-in via style/expandable_grid: true, default false to preserve existing behavior):

Single-line collapsed bar with fixed width (style/grid_width, defaulting to 9 single-char CJK candidates) and inline expand chevron.
Expands via Down / Page_Down / = / chevron click into a uniform equal-slot multi-row grid with lazy librime candidate fetching (candidate_list_from_index).

Active-row-only selection labels (1-9, 0 for 10th) and configurable row/background styles (grid_row_style: native | border, grid_background_style: auto | glass | blur | solid).
Smooth GPU-accelerated CoreAnimation transitions and pill-masked text color inversion (grid_animation: true).
Documented options in data/squirrel.yaml.

squirrel_expandable_grid_demo.mp4

…, and add unit tests

- Split grid layout engine, state machine, views, panel, and controller into modular files and add SquirrelTests XCTest target
- Harden candidate cache invalidation, preedit caret right-arrow passthrough, chord_typing space passthrough, label/hotkey parity, dynamic appearance color blending, above-cursor shrink/flipped-side transitions, and continuous trackpad scrolling
- Default -/= to single-row stepping matching Up/Down arrows and add grid_paging_mode (row | page) while keeping PageUp/PageDown full-screen
- Add SquirrelInputPositionTracker to compensate for stale IMKClient cursor coordinates when dragging host windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant