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

Need rich text functionality in the quiz/mini-quiz components. #209

Open
elPiablo opened this issue Jul 5, 2023 · 5 comments
Open

Need rich text functionality in the quiz/mini-quiz components. #209

elPiablo opened this issue Jul 5, 2023 · 5 comments
Labels
enhancement New feature or request feature request

Comments

@elPiablo
Copy link
Collaborator

elPiablo commented Jul 5, 2023

At the moment, we don't have any rich text functionality in the quizzes and mini-quizzes. But we are limited to using quotes and back ticks, which is a bit ugly/messy, and it means we can't have good and predictable writing conventions.

Sometimes we need to highlight a piece of code in the questions and possible answers, so that it is quickly identifiable to and easy to differentiate from other text for the learner:
Q. What does the tokenTier mapping do?
A. It maps the token ID to its corresponding tier.
A. It maps tokenTier to the totalSupply.

Sometimes we want to highlight a word, where italics would be appropriate:
Q. What does the term gas refer to in the context of Ethereum?

Sometimes we need text in bold to really stress something.....that we really want to stress.
Q. What is a private key?
A. A key that gives total access to whomever holds it to have full control of an account and its assets

And then we need to agree on when and where to use them (so we can add a footnote to our lesson template guidelines doc)

@elPiablo elPiablo added bug Something isn't working needs triage New issue that needs to be triaged by core team labels Jul 5, 2023
@Markkos89
Copy link
Collaborator

Hi @elPiablo !
This is something needed that involves the development team.
Right now we have the quizzes and mini-quizzes data in a .json format which contains the strings to be shown on each one.
example: https://github.com/Developer-DAO/academy/blob/main/utils/quizzes/lesson-2-quiz.json

So far I didn't found a rich text for strings, the libraries I know are editors, and here comes the big question because this is something that will add value to the project, but we need to figure out what is really needed, how to solve it, and when to do it.

@elPiablo do you have any example to share?

Here is a list of some rich text editors: https://blog.bitsrc.io/top-5-rich-text-editors-for-react-in-2021-628fecf0f7e0

Let's continue the talk and think together the best solution for this.

At first sight, if we use a rich text editor it will need to have it's own page to be used, like a CreateQuizzPage.

Allright! Regards!!

Note: this is not a bug

@briangershon
Copy link
Member

Hey @Markkos89 -- check out https://interweave.dev/ -- it's a React component for displaying formatted text, rendering links, etc.

@jamiebones
Copy link

Draft.js is also a fantastic rich text editor for React component Draft.js

@elPiablo
Copy link
Collaborator Author

elPiablo commented Jul 14, 2023

Hey @Markkos89
Sorry for the delay. I need to start realising that Github is a social platform too.
Thanks for getting the conversation underway with this.

@elPiablo elPiablo added enhancement New feature or request and removed bug Something isn't working needs triage New issue that needs to be triaged by core team labels Jul 17, 2023
@elPiablo
Copy link
Collaborator Author

elPiablo commented Nov 22, 2023

@elPiablo do you have any example to share?

Hey @Markkos89

Sorry that I have overlooked a lot of things in Github Issues. I need to get in and clean out some cobwebs! 😄

There are a lot of examples of code in questions and answers in this file: https://github.com/Developer-DAO/academy/blob/main/src/utils/quizzes/quiz-lesson-3.json

I know your really busy, and it's a 'nice-to-have', so no pressure for v2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature request
Projects
None yet
Development

No branches or pull requests

4 participants