Skip to content

feat: add font size keyboard shortcuts - #513

Merged
rgin216 merged 6 commits into
masterfrom
VPS-202/Keyboard-shortcut-font-size
Sep 2, 2026
Merged

feat: add font size keyboard shortcuts#513
rgin216 merged 6 commits into
masterfrom
VPS-202/Keyboard-shortcut-font-size

Conversation

@rgin216

@rgin216 rgin216 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

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

  • Add Ctrl+Shift+> to increase font size by one.
  • Add Ctrl+Shift+< to decrease font size by one.
  • Apply the change only to highlighted text when a text range is selected.
  • Apply the change to the whole textbox for component and caret-only selections.
  • Update multiple selected textboxes independently.
  • Leave font sizes uncapped.

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.ts
  • npm.cmd run lint
  • npm.cmd run build

Checklist

  • Acceptance criteria met
  • Wiki documentation is up to date; no documentation changes required
  • Unit tests are not applicable to this keyboard shortcut wiring change
  • Integration tests are not applicable to this keyboard shortcut wiring change
  • Continuous integration build passing (pending)

Summary by CodeRabbit

  • New Features
    • Added keyboard shortcuts to increase or decrease font size for selected text and text boxes.
    • Font-size adjustments change in one-point increments.
    • Shortcuts now use the platform-appropriate modifier key for improved compatibility across operating systems.

@linear

linear Bot commented Aug 29, 2026

Copy link
Copy Markdown

VPS-202

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 470acda5-d676-411a-a5d9-28a9c7d4a87f

📥 Commits

Reviewing files that changed from the base of the PR and between ab3a97b and 3835a87.

📒 Files selected for processing (1)
  • frontend/src/features/authoring/handlers/keyboard/shortcuts.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/features/authoring/handlers/keyboard/shortcuts.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The 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.

Changes

Font-size keyboard shortcuts

Layer / File(s) Summary
Selection handling and shortcut wiring
frontend/src/features/authoring/handlers/keyboard/shortcuts.ts
The handler identifies textbox selections, validates font-size values, adjusts active text or selected textbox styles, and registers mod+shift+> and mod+shift+< shortcuts.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 3835a

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
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding font-size keyboard shortcuts.
Description check ✅ Passed The description includes the required Issue, Solution, Risk, and Checklist sections. It also documents behavior, testing performed, and the pending continuous integration build.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rgin216
rgin216 requested a review from K1mmyn August 29, 2026 06:21

@harbassan harbassan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just this one change, once its adressed feel free to merge

Comment on lines +186 to +195
{
combos: ["ctrl+shift+>"],
when: canAdjustSelectedTextFontSize,
run: () => adjustSelectedTextFontSize(1),
},
{
combos: ["ctrl+shift+<"],
when: canAdjustSelectedTextFontSize,
run: () => adjustSelectedTextFontSize(-1),
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be mod instead of ctrl so that its cross device compatible

justinedagreat and others added 4 commits September 2, 2026 12:23
* 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>
@harbassan
harbassan force-pushed the master branch 3 times, most recently from d1754f4 to 4b66f90 Compare September 2, 2026 06:16
@rgin216
rgin216 merged commit 593298c into master Sep 2, 2026
3 checks passed
@rgin216
rgin216 deleted the VPS-202/Keyboard-shortcut-font-size branch September 2, 2026 06:19
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.

3 participants