GithubHelp home page GithubHelp logo

Comments (12)

matthojo avatar matthojo commented on May 2, 2024

Depending when you want it done, you can assign this to me.
I'll be pretty busy till the 22nd, but after that it is full steam ahead.

from ghost.

JohnONolan avatar JohnONolan commented on May 2, 2024

Currently, scrolling the edit panel causes the preview panel to scroll at the same speed. However scrolling the preview panel does not scroll the edit panel.

Intentional!

A simple(ish) fix for this problem would be to scroll the two panels by the same percentage, rather than by the same distance. This should keep them more in sync, and at the very least they would both reach the end together.

That is exactly (to the letter) what is currently implemented.

A more complex fix would be to try to keep headings and other blocks aligned. Without investigating further the APIs provided by CodeMirror and showdown I'm not sure if or how this would be possible.

Agreed that would be better - also agreed that CodeMirror is not going to make this easy.

from ghost.

ErisDS avatar ErisDS commented on May 2, 2024

Currently, scrolling the edit panel causes the preview panel to scroll at the same speed. However scrolling the preview panel does not scroll the edit panel.

Intentional!

Ok, I raised this here because I've been using Ghost a lot (every wiki page and readme on GitHub was authored in Ghost) and I have found this to be a problem.

A simple(ish) fix for this problem would be to scroll the two panels by the same percentage, rather than by the same distance. This should keep them more in sync, and at the very least they would both reach the end together.

That is exactly (to the letter) what is currently implemented.

Odd.. it didn't seem to be happening for me. I need to review this and double check. However, if it is the case it's obviously not a great stop gap as it doesn't appear to work.

A more complex fix would be to try to keep headings and other blocks aligned. Without investigating further the APIs provided by CodeMirror and showdown I'm not sure if or how this would be possible.

Agreed that would be better - also agreed that CodeMirror is not going to make this easy.

Perhaps we should create an investigation task for this?

from ghost.

JohnONolan avatar JohnONolan commented on May 2, 2024

This has become massively laggy/horrible for me - I think due to #297? Why are we doing that?

(I've bumped this up to the 0.3 Milestone just to make sure we get it at least working in a basic way)

from ghost.

matthojo avatar matthojo commented on May 2, 2024

The debounce stops the 'advanced scrolling' from happening on every scroll event fired. This is probably the reason why it feels laggy. It should improve performance, so it is a case of finding the right amount of timing between each update so it stays visually smooth.

from ghost.

ErisDS avatar ErisDS commented on May 2, 2024

We might want to switch to throttle rather than debounce, have raised it as a bug as this issue is more to do with intelligent scrolling between the two panes.

from ghost.

SoftwareDreamer avatar SoftwareDreamer commented on May 2, 2024

It seems there were big improvements in codemirror4 in regarding to scrolling and layout perf, you might want to check it out:
https://groups.google.com/d/msg/codemirror/zQC6VQJuv20/IZXGi_Llv58J

from ghost.

JohnONolan avatar JohnONolan commented on May 2, 2024

@ErisDS This issue becomes irrelevant with planned new editor features. Suggest close

from ghost.

ErisDS avatar ErisDS commented on May 2, 2024

Closing as wontfix against #1294

from ghost.

fallerOfFalls avatar fallerOfFalls commented on May 2, 2024

@ErisDS:

Also, the preview panel scrolls the same amount, or to the same position as the edit panel. This appears to work well at first, but the content in the preview panel takes up different amounts of space, and in longer posts with lots of titles and code blocks the two panels quickly become out of sync visually.

Has this part of the issue been addressed?

from ghost.

ErisDS avatar ErisDS commented on May 2, 2024

@harpereaves no this was closed as a wontfix pending a different approach entirely

from ghost.

fallerOfFalls avatar fallerOfFalls commented on May 2, 2024

ah ok, thanks!

from ghost.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.