Page MenuHomePhabricator

Sync the cursor location and real-time preview
Open, Needs TriagePublicFeature

Description

Currently, if you have Real-Time Preview enabled and start to edit an article, there is no synchronisation between where you edit and what gets displayed in real-time preview. I suppose this made the development much easier, but it also makes the usability of the feature much worse and makes me wonder why it got enabled like this as a default feature without a discussion. The preview feature should have some way to figure out that, unless a user scrolled, they want to see the location of where they are currently editing, and not the top of the article. This is how most of the editors of this kind function.

Event Timeline

We looked into doing this in T294977, and actually added the feature. However, it quickly turned out that it was more complicated than it first seemed! For example, if you're editing just below a long infobox with lots of empty parameters, the text you're editing might be scrolled out of sight at the top of the preview pane. This is because it was scrolling proportionally in the left and right panes, and it might be that we can implement a better way of doing that. However, the other problem with synchronising the scrolling between the panes is that actually there are many times when this is not what is wanted. For example, it might be necessary to scroll up and down in either side away from the current editing position, to check on other parts of the article. To have it jump around automatically when this happens would not be good.

That's not to say that we can't come up with a way that synchronises the two panes in a good way. It needs more discussion.