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

Feature Request - Expanded by default with then immediate auto-collapse upon loading #153

Open
DrYak opened this issue Aug 23, 2022 · 0 comments

Comments

@DrYak
Copy link

DrYak commented Aug 23, 2022

Thanks for the terrific software, that has been a huge lifesaver for generating exhaustive manuals for our software.

There's a small problem that is bothering me:
display service htmlpreview has a bug and cannot serve JS properly. JS gets disabled due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff).
And the section expansion doesn't work.

Of course, one solution would be to generate a separate version using the "flat" template and use that separate version in JS-less environment. But that would mean keeping two separate versions, and hoping the correct one is used in each situation.

Another more elegant solution would be to add an option that:

  • Generates file similar to the "JS" template.
  • but has the sections expanded by default in the HTML output.
  • and immediately calls the "collapse all" routine upon loading,
  • before auto-expanding the section highlighted in the link

Thus, on environments where JS doesn't work, the result is more usable (an expanded list looking like the "flat" template).
And on environment where JS does work, we get all the bells and whistles of the "js" template (compact collapsed version by default that interactively expand, and the nice bump-zooming effect when a link is opened).

(Another way, as suggested at the end of issue #129 would be to embed the javascript inside the HTML file, but that would break it in some other settings).

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

1 participant