feenkcom / gtoolkit

Glamorous Toolkit is the Moldable Development environment. It empowers you to make systems explainable through experiences tailored for each problem.
https://gtoolkit.com
MIT License
1.12k stars 49 forks source link

Markdown remote images preview stop working in text snippets #2619

Closed offray closed 1 year ago

offray commented 2 years ago

I'm using .1538 on Manjaro Gnu/Linux and I have seen in several versions that now using the Markdown code for adding remote images. ![My caption](https://my-image-link.tld) in text snippets doesn't show any preview of the image as before. I think it creates a less fluent writing experience by giving less feedback about the effect of the markup you're writing and is a prominent contrast with how other markup is treated in text snippets, where visual feedback is provided. What is the rationale behind such change? Is there any way to enable the previous behavior with proper remote image previews?

girba commented 2 years ago

Thanks for the issue. That looks like a regression.

In the meantime, please try using an explicit Picture snippet instead.

offray commented 2 years ago

We don't use the Picture snippet as its GUI doesn't support the caption input, the part that in Markdown variants goes as ![This is an image caption.](https://my-image-link.png). How could we extend the Picture snippet GUI to support the explicit input of the image caption? Also could tab support be enabled in the GUI to improve quick moving between input fields? (for example, the image URL and the image caption).

As we live code our documentation while we're in workshops, sometimes the quickest way to write images is via the image Markdown code, so would be important to have the regression fixed.

offray commented 1 year ago

More details on this annoying bug in our documentation workflows.

When an image link is followed by a line break inside the same snippet, I get this error:

Error when inserting a line break after an image link in a text snippet

And the snippet where the image link has a line break after it, contracts into an unusable one, as showcased here:

Unusable text snippet after image bug

The only way to recover an usable writing experience is to close and reload the Lepiter note when the snippet became unusable and browse back where the text snippet was located.

Another issue is that non-rendered external pictures are just replaced by empty vertical space and you are able to see them only when you move your cursor to the place where then non-rendered picture code is located, so they become gray and visible (see next picture). Having at least them showed as grayed markup would help to locate picture snippets.

image

For documentation with usage of heavy external images with captions like this transcription of building modular parsers to Lepiter/Markdeep, this bug makes the writing experience pretty frustrating. Again, how can we extend the Picture snippet, so it supports captions, while this bug is addressed?

Thanks

girba commented 1 year ago

In the next release:

Screen Shot 2022-11-26 at 8 56 58 PM Screen Shot 2022-11-26 at 8 57 10 PM
offray commented 1 year ago

Seems pretty good!. I have just downloaded .2185 today and this feature is not integrated yet and the described bug persists. There is some estimation for when the release when the fixed bug will be released?