Scroll block into view - scroll margin

Open
#286 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
40/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
typescript
Domain
frontend

Research direction

Start by locating the code that scrolls blocks into view when creating a node with Enter, then inspect how floating menu bars can overlap the viewport edges. Decide whether completion should use occlusion-aware scrolling or configurable offsets, and verify that a newly focused block remains fully visible behind no toolbar.

Written by the indexing model from the issue text.

Description

Svedit scrolls blocks into view, e.g. when creating a new node by pressing enter.
The issue is though that there might be floating menu bar at any 4 sides of the screen.
The scroll into view may such scroll the element into view, but hidden behind a toolbar.

Ideas:

  • Smart scroll into view: is the element occluded? How far does the offset need to change for it to be fully visible? Pro: no configuration needed, works also with toolbars that are contextual, sticky, etc.
  • Configuration: set an offset for any of the 4 sides of the screen [100, 0, 0, 0]. Pro: simple. Con: extra work, not dynamic/ contextual
Dominant language
TypeScript
Stars
675
Forks
18
Avg merge
5h 11m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from michael/svedit

All issues in michael/svedit

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.