Improvements
Triage

Code block: Resizable vertical height, word wrap toggle, and collapsible title bar

What could be better?

  • Code blocks currently expand vertically without limits to match the full length of the code. A long script of 100+ lines creates an excessively tall block that dominates the entire page layout.
  • In documentation, users typically embed code snippets as reference payloads for quick access and copying, rather than reading long code inside the editor canvas.
  • Additionally, code blocks lack word wrap (forcing tedious horizontal scrolling). While workarounds exist to collapse content (such as nesting inside a toggle block), there is no convenient, native way to label and collapse a code block directly.

How so?

  • Vertical resizing: Allow users to resize the code block height (via a bottom drag handle or a max-height setting with internal scrolling), functioning like a self-contained mini-window.
  • Word wrap: Provide a toggle to enable line wrapping for easier code reading without horizontal scrollbars.
  • Collapsible title bar: Add an optional header bar to display the snippet name/file type that doubles as a native toggle to fold/collapse the entire block without needing external wrapper blocks.

0 Comments

Sign in to comment

No comments yet. Be the first to share your thoughts.