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

Demo Page: Give user feedback when "options" is not valid JSON. #1360

Merged
merged 2 commits into from
Oct 19, 2018

Conversation

aprotim
Copy link
Contributor

@aprotim aprotim commented Oct 19, 2018

Marked version:

Commit: da9d155

Markdown flavor: all

Description

When the "options" object provided by users doesn't parse, make the input field red to let them know:
screen shot 2018-10-19 at 10 49 03 am

And when it does parse, return to a regular old textarea.
screen shot 2018-10-19 at 10 49 11 am

Expectation

Some kind of visual indication that the options entered into the text box aren't valid.

Result

No such indication.

What was attempted

https://marked.js.org/demo/?text=%23%23%23%20These%20options%20don%27t%20work.&options=a

Contributor

  • Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,
  • no tests required for this PR.
  • If submitting new feature, it has been documented in the appropriate places.

Committer

In most cases, this should be a different person than the contributor.

  • Draft GitHub release notes have been updated.
  • CI is green (no forced merge required).
  • Merge PR

aprotim and others added 2 commits October 18, 2018 00:56
A change in the CSS snuck in from a previous iteration of the demo page options UI. Remove it.
Copy link
Member

@styfle styfle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! 🎉

@styfle styfle merged commit 2aeae6d into markedjs:master Oct 19, 2018
@UziTech
Copy link
Member

UziTech commented Oct 19, 2018

Great work. I'm wondering if there is also a way we can allow them to choose the version on marked that they want to use.

image

@aprotim aprotim deleted the demo_options_parse_feedback branch October 19, 2018 20:05
@styfle styfle mentioned this pull request Nov 19, 2018
12 tasks
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.

3 participants