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

feat(common-ui): Add Markdown component. #2741

Merged
merged 29 commits into from
Apr 4, 2022

Conversation

victorgcramos
Copy link
Member

@victorgcramos victorgcramos commented Mar 17, 2022

This diff adds the scope for Politeiagui's Markdown component.

⚠️ Depends on decred/pi-ui#429 ⚠️

Go to localhost:3007 for a better example.

Includes:

  • Markdown Renderer
  • Markdown Diff
  • Markdown Editor and Commands
  • Unit tests for created components and commands

Pros:

  • Remove deprecated React-mde package
  • Improve markdown diff for lines

Copy link
Member

@tiagoalvesdulce tiagoalvesdulce left a comment

Choose a reason for hiding this comment

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

Looking pretty good. I think some stuff can be improved:

  1. We can make our blockquotes look like github's. Example:

Screen Shot 2022-03-22 at 16 07 42

Will render:

Screen Shot 2022-03-22 at 16 07 47

But with our markdown editor the same input will render:

Screen Shot 2022-03-22 at 16 08 41

  1. We can make our ordered list automatically jump to the next item, like github does:

numbered_list

  1. Any plans to add keyboard shortcuts? Currently on politeia we can make text bold with Cmd+B and italic with Cmd+I. Would be nice to have key bindings for all the itens in the toolbar.
  2. You forgot to add the ordered list to the toolbar.
  3. I think we can add the task list to the toolbar as well. I think it would be pretty useful for proposal updates.

Copy link
Member

@tiagoalvesdulce tiagoalvesdulce left a comment

Choose a reason for hiding this comment

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

Left a comment

Copy link
Member

@tiagoalvesdulce tiagoalvesdulce left a comment

Choose a reason for hiding this comment

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

LGTM. Great job!! 👏

@tiagoalvesdulce tiagoalvesdulce merged commit 8df59ea into decred:master Apr 4, 2022
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.

2 participants