Open pomdtr opened 8 months ago
Yes, as you've noticed, this feature interferes with Heynote's feature of having a margin of ~5 rows above/below the active which makes it a bit tricky to implement.
A potential solution would be to temporarily disable EditorView.scrollMargins
for top
, but then the question becomes when to turn it on again? Perhaps when the cursor position changes to a new line, and when the cursor change was not triggered by a change to the buffer content (e.g the user presses the up/down key or changes cursor position with the mouse).
A better solution might be to allow to zoom in / zoom out on a specific block (workflowy-style) with a shortcut. As you've said the proposed feature does not really play well with heynote design.
https://stream.new/v/WVSEwIB3g01p01SEVnMAh6w53doMtTDKZvTlyYEaxlpfQ
The zoom-in/out - while cool - is not going to happen because it doesn't fit implementation-wise with Heynote using one large Codemirror buffer.
I do believe my other proposed solution could work though.
Have you searched existing Github issues to see if someone has already requested this feature?
Yes
Is your feature request related to a problem? Please describe.
I often want to have a scratchpad-like view, by hiding all previous blocks
Describe the solution you'd like
Same shortcut as in the terminal:
cmd+k
would to clear the screenAs a in a terminal, nothing would be deleted. Instead the app would just put the current block at the top of viewport (by just scrolling up)
Describe alternatives you've considered Scrolling manually with the mouse works, but as soon as I type previous blocks are shown again.