Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown: synchronize scrolling between editor and preview #690

Open
AlexVanGogen opened this issue Nov 15, 2024 · 0 comments
Open

Markdown: synchronize scrolling between editor and preview #690

AlexVanGogen opened this issue Nov 15, 2024 · 0 comments
Assignees
Labels
feature New feature or request markdown This issue impacts the Markdown rendering subsystem

Comments

@AlexVanGogen
Copy link
Contributor

We support one-directional scrolling in JCEF. When you scroll markdown sources so that the topmost visible line contains, say, the 3rd list item, the preview should be scrolled accordingly so that the same item is shown at the top of the preview frame.

We don't support it backwards (scroll the editor according to preview position), though, so that's out of scope for the time being.

AlexVanGogen added a commit to AlexVanGogen/jewel that referenced this issue Nov 19, 2024
…#690)

Only ScrollState is supported because of
its natural ability to scroll the view
to an arbitrary coordinate,

LazyListState doesn't allow this, and it
only gives an opportunity to scroll to
an item in a LazyColumn list and then
to a position within the item.
So, it requires a different approach
(which can hopefully be adjusted to the
proposed ScrollingSynchronizer API).

Note that the change only enables auto-scrolling
in a preview to match the position in the source,
it doesn't work the other way around.
@rock3r rock3r added feature New feature or request markdown This issue impacts the Markdown rendering subsystem labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request markdown This issue impacts the Markdown rendering subsystem
Projects
None yet
Development

No branches or pull requests

2 participants