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

[semi] protect system pages (about, help) #101

Open
cben opened this issue Jun 29, 2015 · 5 comments
Open

[semi] protect system pages (about, help) #101

cben opened this issue Jun 29, 2015 · 5 comments
Milestone

Comments

@cben
Copy link
Owner

cben commented Jun 29, 2015

http://mathdown.net/?doc=help now shows random content someone put there.
Should recover old content, and find way to make it read-only (or ideally read-write but somehow moderated?). The obvious way is store it in a file and adding a "view file" (or better view any url) mode.

@cben cben changed the title [semi] protect the Help text [semi] protect system pages (about, help) Jun 29, 2015
@cben
Copy link
Owner Author

cben commented Jun 29, 2015

While at it, it'd be nice for Help to appear in side pane.

@cben
Copy link
Owner Author

cben commented Jun 29, 2015

Of course, I also need to protect the front page (?doc=about) at some point.
There everybody wants to edit ("sandbox" mode), so I was thinking of allowing local edits with a banner warning that they're not saved on this page.
But then people won't see other's experiments, which is half the fun of a sandbox.
Perhaps it's best to have a dedicated front page with some read-only content + an embedded part-page shared sandbox + strong call to action to create a new doc.

@cben
Copy link
Owner Author

cben commented Jun 29, 2015

  • make clearer that what people write in the sandbox is public

@cben cben added this to the "beta" milestone Aug 3, 2015
@cben
Copy link
Owner Author

cben commented Aug 7, 2015

Turns out "view any URL" is hard because of cross-origin security.
StackEdit pulled it off by running a proxy on Heroku.

Even rendering help.md from current directory seems problematic on file:// scheme.
I could stuff the fixed help in JS (or data: but that really begs for a build step).
Or I could stuff it in help.html or help/index.html!
Code duplication with index.html will be annoying — all these options are really asking for a build step.
Or I could live with requiring a local server...

@cben
Copy link
Owner Author

cben commented Aug 7, 2015

Yes, digging some more into file:// XHR or iframes shows that even if it would ever work, it'll be a can of cross-browser worms.
I could probably strip down the html boilerplate to

<script src="view.js">
# Regular markdown from here...

It's tempting to just call such files foo.md for better viewing/editing in github (and everywhere else),
but I suspect that would mess up Conent-Type headers (e.g. from GH Pages).

=> Going with requiring a local server (with some kind of fallback for file:// to at least explain why Help didn't work).

cben added a commit that referenced this issue Aug 11, 2015
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant