Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

empty preview for html and markdown #9

Closed
ralf3u opened this issue Nov 8, 2021 · 10 comments
Closed

empty preview for html and markdown #9

ralf3u opened this issue Nov 8, 2021 · 10 comments

Comments

@ralf3u
Copy link

ralf3u commented Nov 8, 2021

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:

  • I closed all tabs except html-tabs in Geany
  • then I closed Geany
  • I deleted xitweaks.conf
  • I deleted preview.conf and all css-documents in the file preview
  • I deleted geany.css

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

  • add the code below at the end of preview.conf
  • save the document
  • in Edit, in Plugin Preferences, in Preview, click on Reload Config, Apply and OK.
html_processor=pandoc
markdown_processor=pandoc

Then for all html-documents and for all md-documents there is now content in the Preview-tab, as it should be, but the content appears a little bit slower then it should be, what I can see when I restart Geany with an html-document or an md-document: In the light theme in the Preview-tab for about 2 seconds there is this text: "Loading." before the content appears in the Preview-tab.

@xiota
Copy link
Owner

xiota commented Nov 8, 2021

@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
Copy link
Author

ralf3u commented Nov 9, 2021

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

  • open Geany
  • close all tabs, except txt, html, fountain and md
  • close Geany
  • delete xitweaks.conf, preview.conf and all css-documents in preview, and geany.css
  • update the system
  • control if html and md are displayed correctly in the Preview-tab

Result for today: Same issue.

@xiota
Copy link
Owner

xiota commented Nov 9, 2021

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:

  • ColorTip: show color of hex codes in a tooltip when the mouse hovers over them (this is taken from the addons plugin)
  • MarkWords: when a word is double clicked, highlight it throughout the document (this is taken from the addons plugin)
  • Hide Menubar
  • Column Markers: show multiple column markers
  • Sidebar save size: save separate sidebar sizes for normal and maximized window states
  • Sidebar auto size: when window is changed between normal and maximized, resize the sidebar to keep a certain number of columns visible
  • Unchange Document: When a new document does not have any contents (eg, something was typed and deleted) unset the change status
  • Auto Read Only: Automatically switch to read-only mode when a file does not have write permission.
  • Keybinding: Extra copy/paste
  • Keybinding: toggle menubar
  • Keybinding: toggle read-only mode

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

  • Less programming and interface design effort.
  • Features can be described in comments. (In a lot of plugins, I have no idea what the checkboxes are supposed to do until after I click them.)

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

@ralf3u
Copy link
Author

ralf3u commented Nov 10, 2021

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:

  • html and md are shown correct in the Preview
  • the Preview is empty for fountain

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
Copy link
Owner

xiota commented Nov 10, 2021

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
Copy link
Author

ralf3u commented Nov 10, 2021

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
Copy link
Author

ralf3u commented Nov 11, 2021

fountain: not fixed

@ralf3u
Copy link
Author

ralf3u commented Nov 13, 2021

fountain: not fixed

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

@ralf3u ralf3u closed this as completed Nov 13, 2021
@ralf3u
Copy link
Author

ralf3u commented Nov 15, 2021

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

@xiota
Copy link
Owner

xiota commented Nov 15, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants