austintackaberry / ydkjs-exercises

Exercises to go along with You Don't Know JavaScript
MIT License
253 stars 74 forks source link

Add markdown capability to allow simple styling of questions #88

Closed kevinsmithwebdev-zz closed 6 years ago

kevinsmithwebdev-zz commented 6 years ago

I propose adding some simple markdown ability to the text, for example italics, bold, inline code blocks, etc. This would greatly enhance the readability and create a more polished look.

I see that there are modules like "react-markdown".

Then a style guide could be generated so we are all using them in the same why for the same types of text.

austintackaberry commented 6 years ago

Briefly looking at react-markdown, it seems like a good solution to this problem. It wouldn't force us to make any major architectural changes, and it seems easy to use.

The only other option I see is that we just put HTML elements in our json and use dangerouslySetInnerHTML, but that seems less than ideal.

I'm curious if anyone has any other potential solutions.

rreubenreyes commented 6 years ago

On board with react-markdown! Would make our problem set descriptions significantly more accessible. I think it'd be nice to have each question (at least the problem descriptions and solutions) contained in separate modules and this seems like a great solution.

EDIT: Okay, now that I think about it, maybe don't contain each question in a module. The import statements would be ridiculous. But I do like the idea of supporting Markdown.

kevinsmithwebdev-zz commented 6 years ago

Let me take a whack at this. I'll implement the react-markdown for the question and answer fields.

austintackaberry commented 6 years ago

Awesome!

austintackaberry commented 6 years ago

@kevinsmithwebdev are you still planning on working on this?

austintackaberry commented 6 years ago

Just thinking out loud...do we need markdown or can we just use JSX? I feel like JSX can do most everything that markdown can do, arguably more.

kevinsmithwebdev-zz commented 6 years ago

Whatever works. Sorry, I haven't finished this, I got bogged down with a React Native freelance job. I have the Markdown 90% working, but if you want to take it in a different direction, I won't be offended.

On Thu, Jul 12, 2018 at 10:41 PM, Austin Tackaberry < notifications@github.com> wrote:

Just thinking out loud...do we need markdown or can we just use JSX? I feel like JSX can do most everything that markdown can do, arguably more.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/austintackaberry/ydkjs-exercises/issues/88#issuecomment-404731531, or mute the thread https://github.com/notifications/unsubscribe-auth/AYqZyCAfL8V4dPOa9nzyEdsV6SqNIhTAks5uGDMngaJpZM4U06Mn .

austintackaberry commented 6 years ago

Let's go with react-markdown. If it isn't working for us, we can always remove it.

Is there something you're stuck on? Based on the docs, it seems like you can just drop in <ReactMarkdown source={input} /> and we should be good to go.

kevinsmithwebdev-zz commented 6 years ago

No, like I said, I've just been bogged down with a paying React Native freelance project. I'll see you on Sunday, we can take a look at it then.

Regards, Kevin Smith

On Fri, Jul 13, 2018 at 12:08 AM, Austin Tackaberry < notifications@github.com> wrote:

Let's go with react-markdown. If it isn't working for us, we can always remove it.

Is there something you're stuck on?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/austintackaberry/ydkjs-exercises/issues/88#issuecomment-404746455, or mute the thread https://github.com/notifications/unsubscribe-auth/AYqZyHSPCcCUqDR1i3sw08Zsgg-RJdq7ks5uGEeFgaJpZM4U06Mn .

austintackaberry commented 6 years ago

No problem, just checking to see if there was anything I could help with regarding that remaining 10%. See you Sunday!