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
15 stars 0 forks source link

empty preview for html and markdown #9

Closed ralf3u closed 3 years ago

ralf3u commented 3 years ago

Preview works perfect with txt-documents and with fountain-documents. But for html-documents (with or without DOCTYPE) and markdown-documents the Preview-tab is completely empty since the introduction of pandoc.css in the preview-file. Even if I double click in the Preview-tab, nothing happens. Same for extra_css=extra-media.css and extra_css=disable in preview.conf. If I restart Geany with an html-document or an md-document, then there is in the light theme in the Preview-tab for about 2 seconds "Loading.". And then there is nothing.

For conf-documents there is this text in the Preview-tab: "Unable to process type: Conf, UTF-8.".

html-document and md-document If I right-click in the Preview-tab to select in the context menu "Reload", then the document appears in the Preview-tab. It works only for the single Preview-tab, so not for other html-documents and not for other md-documents at the same time. I have to do that every time I restart Geany. But if I change the tab in the editor and switch back to the tab, then Preview-tab is completely empty again. If I change the code of one html-document or one md-document in the editor, so for example if I just type one letter, like "t", then Preview-tab is completely empty again.

md-document For md-documents it is even worst. Visit #8.

This is what I did to make a kind of reset:

Same problem like before.

This is the test-document in html:

<!DOCTYPE html>
<html>
<head><style></style></head>
<body>
<p>This is a test.</p>
</body>
</html>


Intermediate solution to see something in the Preview-tab

xiota commented 3 years ago

@ralf3u

I've uploaded a test version to the PPA. I only updated the 21.04 version, since that is the one you use.

Because of physical problems from now on I will be online only around 3 pm CET.

Hope you feel better.

ralf3u commented 3 years ago

This is what I intend to do every day to know if the issue was fixed:

Result for today: Same issue.

xiota commented 3 years ago

PPA updated with another version.

BTW: I'm going to split xi/tweaks into two plugins. xi/tweaks will have the sidebar focus and menubar hiding, since those are the features you use. (You can suggest a new name) Separating out sidebar focus might make it easier to work on.

The new plugin will possibly be submitted to geany-plugins. It will have the following:

I'm thinking about keeping the current system of editing config files instead of using a preferences dialog:

A potential problem is it's probably more difficult to translate comments in config files than strings inside programs.

ralf3u commented 3 years ago

Because of physical problems from now on I will be online only around 3 pm CET.

Hope you feel better.

Thanks. Old issues that I have to fix. It will take a lot of time.


Result for today:

Remark: Yesterday it was the other way around.


BTW: I'm going to split xi/tweaks into two plugins. xi/tweaks will have the sidebar focus and menubar hiding, since those are the features you use. (You can suggest a new name) Separating out sidebar focus might make it easier to work on.

I have visited github.com/xiota/geany-tweaks. I'm little bit confused by the internet address. Why you don't call it geany-xi-tweaks instead of geany-tweaks, like it appears in the terminal (for example sudo apt show geany-plugin-xi-tweaks). For me geany-xi-tweaks and of geany-tweaks are two different names.

You can suggest a new name

I'm little bit confused by the slash in the name Xi/Tweaks, because this does not appear in the terminal. So if you want to split xi/tweaks into two plugins, what about tweaks and xi-tweaks?

I'm thinking about keeping the current system of editing config files instead of using a preferences dialog

In the past I liked GUI a preferences dialog, but nowadays I prefer a config-document. In my opinion, a GUI preferences dialog would be an enormous waste of energy. And things are changing. And then you just run after to keep the GUI preferences dialog up to date, till it starts to become the main job to keep it up to date. But what would be good is an external tutorial. I don't like so much https://github.com/xiota/geany-preview/blob/main/docs/CQA.md. I mean, it is a useful help, but with a tutorial I mean more this kind of style: https://www.geany.org/manual/current/index.html#focus-keybindings. But I think it is too early for a tutorial. First Geany Preview must run perfect. When everything is standing, or at least a core is standing, then it makes sense to start with a tutorial. If I were you, I would not think about a tutorial. Successful software will go its own way, what means that someone will write a tutorial, and maybe it is better like this that someone else is writing a tutorial than the developer of the software, because an author sees the software with different eyes than the developer. If you ask now how will the people find this tutorial, then the answer is: Trust google. It would be a kind of de-central management. So, put the concentration on the software, and everything else will find its place. I still don't like so much the Plugin Preferences that exists now, but I have no idea how to make it better. So, it is better to keep it like this. I mean, for me it is important that the front side of a software is perfect, and not the back side.

A potential problem is it's probably more difficult to translate comments in config files than strings inside programs.

I would not offer translations of the config-document. I would keep Geany Preview simple and small. The subject translations is the same like GUI and tutorial. What about this idea: Write a good description in the comments in the config-document, so that people can copy and paste it in a translation tool, so that users can better understand the message. At the moment the config-document is not copy-and-paste-friendly, because instead of using many sentences in one line, they are separated with a hash-sign, what makes it harder to read, even in English.

xiota commented 3 years ago

the Preview is empty for fountain

That is strange... as before, everything is working on my end... I'll keep looking...

I'm little bit confused by the internet address. Why you don't call it...

Name wasn't really determined yet... Will eventually unify everything when a real name is decided. Since / is used in path names, it can't be used in the web address or file names. So it gets replaced with a - or _.

a GUI would be an enormous waste of energy. And things are changing. And then you just run after to keep the GUI up to date, till it starts to become the main job to keep it up to date.

That is pretty much why the GUI just opens the config file in the editor.

First Geany Preview must run perfect.

It seems a ways away from that. xi-tweaks is closer though, when the sidebar focus highlighting is removed.

I still don't like so much the Plugin Preferences that exists now, but I have no idea how to make it better.

I think some people would say make it into a GUI, but that has the problem you mentioned earlier. Ideally, the defaults would work for anyone and no one would ever have to change anything.

I would not offer translations of the config-document.

I wouldn't do the translations. But when if it were to become part of geany-plugins, translations becomes an issue. So on my side, I just have to figure out a way to make it possible/easier for the translators. In the code, it works by marking translatable strings, like this _("translatable") (instead of "not translatable"). With the config file, there's no way to mark it. I may have found a workaround though.

At the moment the config-document is not copy-and-paste-friendly, because instead of using many sentences in one line, they are separated with a hash-sign, what makes it harder to read, even in English.

Unfortunately, there isn't really a way around that because the # are needed to let the program know that those lines are not options.

ralf3u commented 3 years ago

Unfortunately, there isn't really a way around that because the # are needed to let the program know that those lines are not options.

There could be a solution: Don't go in the next line during the explication, so the explication is in just one line. And then there is only one hash-sign, instead of for example 3 hash-signs for three lines.

ralf3u commented 3 years ago

fountain: not fixed

ralf3u commented 3 years ago

fountain: not fixed

I just opened a new issue for that (issue number 13).

ralf3u commented 3 years ago

@xiota Just for interest: What was the problem that on your computer this issue didn't exist, but on the computers I use?

xiota commented 3 years ago

I don't know why it was working on my computer, but not yours. The condition in a couple if statements wasn't typed out completely.