feat: add font size keyboard shortcuts - #513
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe keyboard handler now changes font size by one for active text selections and selected textbox components. It validates text mode, active styles, component types, and finite font-size values. ChangesFont-size keyboard shortcuts
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized change adds font-size keyboard shortcuts without any actionable merge-blocking risk remaining; it is merge-ready after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant User
participant KeyboardShortcuts
participant TextSelection
participant TextboxComponent
User->>KeyboardShortcuts: Press mod+shift+> or mod+shift+<
KeyboardShortcuts->>TextSelection: Adjust active text style when text is selected
KeyboardShortcuts->>TextboxComponent: Adjust font size when a textbox is selected
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
harbassan
left a comment
There was a problem hiding this comment.
just this one change, once its adressed feel free to merge
| { | ||
| combos: ["ctrl+shift+>"], | ||
| when: canAdjustSelectedTextFontSize, | ||
| run: () => adjustSelectedTextFontSize(1), | ||
| }, | ||
| { | ||
| combos: ["ctrl+shift+<"], | ||
| when: canAdjustSelectedTextFontSize, | ||
| run: () => adjustSelectedTextFontSize(-1), | ||
| }, |
There was a problem hiding this comment.
this should be mod instead of ctrl so that its cross device compatible
…y ids to SidePanel
* feat: show just icon and label in side panel * feat: add reusable authoring side panel * feat: implement side panel * feat: implement side panel to object property editor * feat: center sidebar icons vertically * feat: add animation * fix: prettier * fix: guard sidebar animation if API is unavailable * feat: expand canvas when sidebar panel is closed * fix: adjust icon sizes * feat: make icons seem clickable * fix: preserve keyboard tab order in side panels * fix: use useLayoutEffect as suggested by CodeRabbit * fix: refresh canvas sidebar position on panel changes * fix: adjust button size * fix: reorder side panel to natural order * restore side panel keyboard tab order # Conflicts: # frontend/src/features/authoring/CanvasSideBar/SidePanel.jsx * fix: prettier * fix: prettier * fix: restore side panel keyboard tab order * fix: fix animation when an icon is selected * fix: prettier * Fix CodeRabbit issues in PR #518 --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
d1754f4 to
4b66f90
Compare
Issue
The authoring tool does not provide keyboard shortcuts for adjusting text font size. Authors must use the toolbar controls even when text or a textbox is already selected.
Solution
Ctrl+Shift+>to increase font size by one.Ctrl+Shift+<to decrease font size by one.Risk
Low. The change is limited to the authoring shortcut registry and reuses the existing text styling and history paths. The shortcuts only run when at least one textbox is selected.
Testing
npx.cmd prettier --check src/features/authoring/handlers/keyboard/shortcuts.tsnpm.cmd run lintnpm.cmd run buildChecklist
Summary by CodeRabbit