Skip to content

Support readonly ?viewurl=... render, switch Help to use it - #221

Merged
cben merged 9 commits into
gh-pagesfrom
view
Oct 13, 2026
Merged

cben merged 9 commits into
gh-pagesfrom
view

Conversation

@cben

@cben cben commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Closes #101.

I had more wishlist there, but they are really separate enhancements:

  • showing help in a sidebar
  • showing a persistent banner above ?doc=about explaining it's shared sandbox, and one should click [New document].

cben and others added 8 commits October 9, 2026 01:09
proof of concept for #101.  Needs fallback for file://.
Not sure UX is good.  Needs indication the editor is read-only (gray bg?).  Need link to Edit on Github.
- Opening `# Help` for helpful tab title.
- Indented literal block must be separate paragraph.
- More precise pandoc cmd, added Try Pandoc link.
Also, showing "math..." when text is ready, "done" after math done rendering.
`serve` package is more popular, re-reads edited files so refreshing just works.

TODO: drop `server.coffee` entirely (once I un-bit-rot the tests?)
@cben cben closed this Oct 12, 2026
@cben cben reopened this Oct 12, 2026
@cben

cben commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner Author
  • Snyk complaints are about addition of serve for local dev. The 10 "issues" is all [Re]DoS risks, not really vulnerabilities.

  • preview works FF & Chromium on linux: loads, renders, formulas un/re-render (up to known bug Traversing formulas unrenders some, and some don't render back CodeMirror-MathJax#46), syncs edits, Help works, external URLs (those allowed by CORS) work e.g. ?viewurl=https://raw.githubusercontent.com/cben/sandbox/refs/heads/master/README.md.

    • "Try it now: $\sum a_i + \frac{1}{b_i}$ <- put cursor here and move left." line works 👍, formulas are not editable but do un/re-render on cursor movement.
  • BUG: not fully read-only, can click checkboxes and [x] <-> [ ] changes 😈

@cben

cben commented Oct 13, 2026

Copy link
Copy Markdown
Owner Author

I don't care about checkboxes. The concern is users could be mislead to think the doc is editable and getting saved when it isn't? But they can't edit anything other than checkboxes.

@cben
cben merged commit e7c1bff into gh-pages Oct 13, 2026
4 of 5 checks passed
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

Successfully merging this pull request may close these issues.

[semi] protect system pages (about, help)

1 participant