Skip to content

Auto-expand Note field up to 7 lines; floor manual resize at 1 line#663

Open
dconger-microsoft wants to merge 1 commit into
OneNoteDev:masterfrom
dconger-microsoft:user/dconger/note-field
Open

Auto-expand Note field up to 7 lines; floor manual resize at 1 line#663
dconger-microsoft wants to merge 1 commit into
OneNoteDev:masterfrom
dconger-microsoft:user/dconger/note-field

Conversation

@dconger-microsoft

@dconger-microsoft dconger-microsoft commented Jun 15, 2026

Copy link
Copy Markdown

What

The Note field in the clipper now auto-expands as you type, up to a maximum of 7 lines; past that it scrolls.

Behavior

  • Grows to fit content on each keystroke, capped at 7 lines (then overflow-y: auto).
  • Manual drag-resize is preserved and remembered as a floor, so the field won't auto-shrink below a height you chose.
  • If you collapse the field and then type more, it re-expands to fit the text (up to 7 lines).
  • Manual resize can no longer shrink the field below a single line (min-height).
  • Field size resets on sign-out.

Changes

  • src/renderer.html - note-field textarea starts at rows="1".
  • src/styles/renderer.less - #note-field { min-height: 30px; }.
  • src/scripts/renderer.ts - auto-grow logic (input / mousedown / mouseup listeners) + reset on sign-out.

Testing

Built locally with npm run build (tsc + eslint) - passes. The repo has no automated test suite (V3 validation = build); verified the bundle in the loaded unpacked extension.
Tested locally including cases of adding text, removing text, resizing the notes fielding, adding more text, etc.

The clipper Note field grows as the user types, up to a maximum of 7 lines, after which it scrolls. Manual drag-resize (resize: vertical) is preserved: the dragged height is remembered as a floor, so the field never auto-shrinks below it, but typing still grows it to fit content (up to the max). This means collapsing the field and then adding more text re-expands it to an appropriate size. A CSS min-height keeps manual resize from going below a single line (previously it could shrink smaller).

Co-authored-by: Copilot <[email protected]>
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