satyagraha / gfm_viewer

An Eclipse plugin providing an accurate view of GitHub Flavored Markdown (.md) files
94 stars 27 forks source link

on/off-line, was: Still does not use local files #47

Closed paulvi closed 10 years ago

paulvi commented 10 years ago

In #18

When Markdown Editor opens (or GFM View is activated), if .md.html already exists, show it in the View, whatever current mode is (Linked or not)

I have README.md and .README.md.html, README is from library (that is not edited), I just want to see it, so I select Show in GFM VIew

Then I just see error Dialog (due to network problem or because I am offline)

satyagraha commented 10 years ago

From your experiences, I think what is needed is an "On/Off-line Mode" toolbar toggle button, which would be independent of the Linked Mode. Their responsibilities would be:

In Off-line Mode I think I could show in the GFM view tab whether the displayed HTML was up-to-date, by prefixing the tab string with a "*" as is done for a dirty (unsaved) editor tab.

The above would I think make the Always Generate HTML preference redundant.

Views?

paulvi commented 10 years ago

On/Off-line Mode could be good

but it will not make Always Generate HTML preference redundant. The late is great option to actually get the file user sees in View.

The #18 idea would make experience better by showing local files and eliminate not needed transformation, when .html is already newer then .md file.

paulvi commented 10 years ago

Reading again your comment, I find it expressing more clearly.

What about 1 dedicated use case:

as a user I want to see local HTML with "*" immediately , but then replaced with newer version when newer version arrived. (Once again I am on slow Internet connection to GitHub) This case however requires rendering HTML in browser 2 times, so it only makes sense if 5s or more is required for network fetching.

Use case:

  1. double click to open .md file
  2. GFMV is active, it checkes if .html file exists then shows it
  3. if .html file is older than .md call tranformation and then show newer .html file
satyagraha commented 10 years ago

The purpose of Always Generate was perhaps not well explained: it was for someone doing development of the .css or .js rendering, to avoid them having to delete the .md.html files to force regeneration. This is an unusual and specialized use case, therefore I intend to remove it.

Regeneration will always occur if the user:

I believe this should happen irrespective of On/Off-line state, as doing either is pointless otherwise.

Your idea of immediate+deferred HTML display is interesting, but somewhat complex for the moment.

paulvi commented 10 years ago

Brilliant.

But before deleting Always Generate, how can I as a user get HTML files? I want to once click a folder and get .html files for all documentation there.

Secondly, before when looking at View I could not get the file, but only through right-click Generate file, even though the files is already somewhere in the cache.

satyagraha commented 10 years ago

@PaulVI Hi Paul can you try out release/1.8.0 either by building or from update site http://dl.bintray.com/satyagraha/generic/1.8.0 ?

This provides the On/Off-line mode (the earth icon). I think it addresses your main need when connectivity is not good.

paulvi commented 10 years ago

starting trying ...

paulvi commented 10 years ago

Finally user able to right-click folder Generate Markdown Preview

and after that open any .md file Show in GFM View instantly, any time

paulvi commented 10 years ago

Announced on http://www.nodeclipse.org/

Updated http://marketplace.eclipse.org/content/github-flavored-markdown-viewer-plugin

satyagraha commented 10 years ago

OK it appears you are happy so I will merge this branch to master and make it the official release shortly.

Thanks for checking it through :)

satyagraha commented 10 years ago

Assuming this is addressed in 1.8.1.

paulvi commented 10 years ago

Yep :-)