Make markdown half-screen height adjustable #2933
Service Desk opened 2 days ago

Summary

Allow adjusting the height of the markdown editor's half-screen mode within a limited range, so it remains usable on phones and tablets in portrait mode when the on-screen keyboard is open.

Background

This follows up on issue #2870 (half-screen toggle). Today half-screen mode is fixed at 50% of the viewport (top: 50vh). On phones/tablets in portrait mode with the keyboard visible, that often leaves too little space for editing.

Raised from question issue #2932.

Proposed behavior

When half-screen mode is active, the editor height should be adjustable, with these constraints:

  • It must not be possible to collapse the editor completely (exiting half-screen remains the job of the half-screen toggle).
  • It must not be possible to expand to a full-viewport editor (that remains the job of the full-screen toggle).
  • Keep a sensible minimum and maximum height (for example roughly 30–80% of the viewport), defaulting to the current 50%.

Confirmed from discussion in issue #2932:

  1. Adjustment: drag the top edge of the half-screen editor
  2. Persistence: remember the chosen height across visits in the same browser
  3. Scope: all devices, including desktop

Current behavior

  • Half-screen pins the editor from 50vh to the bottom of the viewport.
  • The normal editor resize handle is hidden in half-screen / full-screen modes.
  • Service Desk commented 2 days ago

    Refined from @zaakiy's answers in issue #2932:

    1. Adjust height by dragging the top edge
    2. Persist the chosen height across visits in the same browser
    3. Available on all devices, including desktop

    Description updated accordingly.

  • Zak Siddiqui commented 2 days ago

    @servicedesk I'm quite fond of the implementation of the draggable bottom edge of the comment box (in normal mode, meaning when not in half screen or full screen)

    I wonder if it's possible to implement the same draggable edge but at the top of the half-screen comment section. The draggable edge does not need to be attached to the input box itself but rather the top edge of the half-screen comment section.

  • Service Desk commented 2 days ago

    @zaakiy Yes — that's possible, and it matches what this issue already calls for.

    We'll reuse the same kind of grip-style drag handle from the normal-mode comment box, but place it on the top edge of the half-screen panel (the overlay itself), not on the input box. Dragging will adjust height within a limited range so it can't collapse away or go full-screen; exiting those modes stays with the existing toggles. The chosen height will still be remembered in the browser.

    If you want a different feel for that top edge, let us know; otherwise we'll implement it that way.

  • Robin Shen changed fields 2 days ago
    Name Previous Value Current Value
    Assignee
    robin
    cwh
  • Chief Work Horse commented 2 days ago

    Implemented adjustable markdown half-screen height:

    • Added a grip-style top-edge handle with mouse, touch/pen, and keyboard support.
    • Constrained height to 30–80% of the viewport, defaulting to 50%.
    • Persisted the choice in browser local storage and synchronized the underlying page layout.
    • Verified mvn -Pce -pl server-core -am -DskipTests compile (BUILD SUCCESS).

    Submitted as pr OD-102.

1/1
Type
Improvement
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (4)
Reference
OD-2933
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover