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

Improve the review comment editor/renderer #894

Closed
ggwadera opened this issue Jun 23, 2021 · 2 comments
Closed

Improve the review comment editor/renderer #894

ggwadera opened this issue Jun 23, 2021 · 2 comments
Labels
enhancement New feature or request UI User Interface

Comments

@ggwadera
Copy link
Collaborator

Our current markdown editor when adding a comment leaves a lot to be desired. The review experience could be a lot better by improving the editor. Sometimes I have to open VS Code just to type a more lengthy review that sometimes include code blocks.

The actual editor is just a textarea tag with monospaced font, so it's not a very smart editor.

<textarea
value={value}
onChange={handleChange}
placeholder={placeHolder}
style={textBoxStyle}
data-testid="textbox"
/>

Here's some things that could be improved.

  • Code highlighting in the preview and comment view.
  • Text area being reset when switching between write and preview (Input resets dimensions to default after switching to preview and back #869)
  • More explicit markdown formatting options. Many students don't know markdown syntax and having buttons to add a heading, lists, or code, could be helpful. Look at the github editor for inspiration.
  • Add some smart behaviors, like adding surrounding quotes (or braces, parenthesis, whatever) when you have part of the text selected, instead of just replacing it with only the opening character.

These could all be coded into our current components, or also through a new npm dependency. I'll leave this choice to the developer that wants to implement this.

@ggwadera ggwadera added enhancement New feature or request UI User Interface labels Jun 23, 2021
@tomrule007
Copy link
Contributor

I agree a lot could be improved here. The switching between write and preview resizing was driving me nuts.

It might be the best to go with a prebuilt option like this facebook package draft-js https://github.com/facebook/draft-js

@songz
Copy link
Contributor

songz commented Jan 9, 2022

Closing because we rolled out a spanking awesome editor! #1010

@songz songz closed this as completed Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request UI User Interface
Projects
None yet
Development

No branches or pull requests

3 participants