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 txt-documents as option #29

Closed
ralf3u opened this issue Dec 3, 2021 · 10 comments
Closed

empty preview for txt-documents as option #29

ralf3u opened this issue Dec 3, 2021 · 10 comments

Comments

@ralf3u
Copy link

ralf3u commented Dec 3, 2021

The preview of txt-documents shows nearly the same content like the content of the editor. One option is the auto-sidebar to hide the preview of txt-documents (mentioned in issue number 1). But maybe some users will not like that the vertical line between editor and preview appears and disappears while tab-browsing. So, another option could be to show a completely empty preview, with something like empty_preview_for_txt=false as default setting in preview.conf. The setting empty_preview_for_txt=true would then show a completely empty preview. Personally, I think that I would use it sometimes as variation.

@xiota
Copy link
Owner

xiota commented Dec 6, 2021

I've gone back and forth between making plain text show or not in the preview pane. So I guess it is time to turn it into an option.

@ralf3u
Copy link
Author

ralf3u commented Dec 8, 2021

I've gone back and forth between making plain text show or not in the preview pane. So I guess it is time to turn it into an option.

When I opened this issue, I had myself also some doubts, but I was not able to explain why. Today I know the reason. The reason is because once you offer this option, then one should be consequent by offering the option for all other formats, because it would make sense also for css, js, conf and lua. At the moment for those formats there is this text in the preview:
"Unable to process type: ..."
The text could disturb a user in a long-term. So, what about the idea to offer more options, like in auto-sidebar, where the user can add the formats? Personally something like that would be my settings:
empty_preview_txt=true
empty_preview_js=true
empty_preview_css=true
empty_preview_lua=true
empty_preview_conf=true

@ralf3u
Copy link
Author

ralf3u commented Dec 8, 2021

I just recognized that the problem "Unable to process type: ..." mentioned in my last comment could be solved easily by css: If the values color und the background have the same color, then the text is invisble. But it is not a clean solution. And for long txt-documents, even when the preview is then invisible, it can be that scrollbars appears on the right and on the bottom, what looks quite strange.

@ralf3u ralf3u changed the title empty preview for txt-documents as option empty preview as option for customizable formats Dec 8, 2021
@xiota
Copy link
Owner

xiota commented Dec 8, 2021

That's too many options to keep track of. The difference with txt is sometimes emails are saved with txt extension. In that case, it might be worth showing them in the preview with basic formatting. (But not if people will expect every single format to have an on/off option).

A blank preview can make it look like the preview isn't working. (Is it supposed to be blank, or is it broken?) Instead of "Unable to process type", it should probably say "unsupported type".

@ralf3u ralf3u changed the title empty preview as option for customizable formats empty preview for txt-documents as option Dec 9, 2021
@ralf3u
Copy link
Author

ralf3u commented Dec 9, 2021

That's too many options to keep track of.

OK, I just changed the title of this issue. So, the title of this issue is again like it was at the beginning.

The difference with txt is sometimes emails are saved with txt extension. In that case, it might be worth showing them in the preview with basic formatting.

I don't understand so much. If the option would be realized, then there are two possibilities: Either the txt-document is shown in the preview or there is an empty preview with no scrollbars. And what has that to do now with "it might be worth showing them in the preview with basic formatting"?

@ralf3u
Copy link
Author

ralf3u commented Dec 10, 2021

Remark
In the new version of Geany Preview there is now an empty preview for txt-documents. And for long txt-documents there are no scrollbars in the preview, as it should be. But I don't see a possibility in preview.conf to turn this feature off.

@xiota
Copy link
Owner

xiota commented Dec 10, 2021

The preview is not shown for text documents unless it is detected as a supported type. There's no option because the preview would be identical to what's already in the editor, and I don't want to go down the path where every file format has an option.

You can force the preview to show by adding "Format: plain" to the beginning of the document. This can also be used to change the format, "Format: markdown". This isn't currently documented anywhere, but it's been part of the plugin for a while. (Before the mess with the preview-headers.css/preview.css file.)

@ralf3u ralf3u closed this as completed Dec 10, 2021
@ralf3u
Copy link
Author

ralf3u commented Dec 11, 2021

@xiota

Before the mess with the preview-headers.css/preview.css file.

You can change it again from preview.css to preview-headers.css, so that there is no mess any more. I didn't know to that time (where I made the suggestion to short the name) that the name preview-headers.css has to do something with emails.

@xiota
Copy link
Owner

xiota commented Dec 11, 2021

The mess wasn't the name change, but that it wasn't working properly. Now that it's working, better to leave it alone.

@xiota
Copy link
Owner

xiota commented Feb 25, 2023

Somewhat related to this issue. Just added an option to set the default file type for newly created documents. Haven't updated the PPA yet because not using Ubuntu anymore. Need to set up a container to run the commands.

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