xiota / geany-preview

Turns Geany into a markdown editor by providing a preview pane in the sidebar to show the formatting of several light-weight languages as they are edited. Supported document types include AsciiDoc, DocBook, Fountain, HTML, LaTeX, Markdown, MediaWiki, reStructuredText, Textile, and Txt2Tags.
GNU General Public License v3.0
12 stars 0 forks source link

content of the Preview-tab might shake when snippet is set to false for fountain, md and html #23

Closed ralf3u closed 2 years ago

ralf3u commented 2 years ago

Conditions:

Test 1

Result: There is no shaking.

Test 2

Result: There is no shaking.

Test 3 Do the same like Test 2, but before to type in the editor:

Result: The content of the Preview-tab is shaking. I think why it is shaking: Because for a part of a second, I can see the top of the webpage. So, it seems to be that it shows first the top of the webpage and then the actual part of the webpage with the change.

Possible solution Show the content in the Preview after rendering and after the content is fixed.

xiota commented 2 years ago

Show the content in the Preview after rendering and after the content is fixed.

I don't have that level of control of the webview.

Does the document have any tags that look like <link rel="stylesheet" type="text/css" href="style.css"> ? If so, that is the cause of the problem. Documents that refer to external CSS files "shake". (I don't know how to fix it besides avoiding using those tags.)

ralf3u commented 2 years ago

Does the document have any tags that look like <link rel="stylesheet" type="text/css" href="style.css"> ? If so, that is the cause of the problem. Documents that refer to external CSS files "shake". (I don't know how to fix it besides avoiding using those tags.)

In the html-document there are no internal or external stylesheets. As it is mentioned in the title of that issue, the issue occurs also for md and fountain.

xiota commented 2 years ago

It may be related to not having enough time to process the large file. Does changing the following values in preview.conf help?

update_interval_fast=150
size_factor_fast=0.002
ralf3u commented 2 years ago

It may be related to not having enough time to process the large file. Does changing the following values in preview.conf help?

update_interval_fast=150
size_factor_fast=0.002

I made a test with fountain. The issue is still there.

ralf3u commented 2 years ago

It may be related to not having enough time to process the large file. Does changing the following values in preview.conf help?

The issue does not appear on your computer?

xiota commented 2 years ago

The issue does not appear on your computer?

It does, but increasing those values helped. Try higher values... (just to see if it improves).

update_interval_fast=300
size_factor_fast=0.004
ralf3u commented 2 years ago

It does, but increasing those values helped. Try higher values... (just to see if it improves).

I don't see a big difference.

xiota commented 2 years ago

I don't see a big difference.

If increasing processing time doesn't help, it may be the webview itself (may be out of my control).

ralf3u commented 2 years ago

Today, I can't reproduce the result of Test 3 of the report when snippet of html, md and fountain are false, neither with html, nor with md, nor with fountain. There's no text shaking at all. Those default settings are used:

update_interval_fast=25
size_factor_fast=0.001