mattermost / mattermost/mattermost-plugin-github

Render markdown in tooltip with post-utils, instead of ReactMarkdown

Open
#327 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Difficulty/1:Easy Good First Issue Hacktoberfest Help Wanted Tech/Go Tech/ReactJS Type/Enhancement Up For Grabs
Dominant language
Go
Stars
179
Forks
180
Avg merge
1d 16h
Merged PRs (30d)
13

Description

The webapp has a robust markdown system that I think we should utilize instead of using the ReactMarkdown library:

https://github.com/mattermost/mattermost-plugin-github/blob/03935bad3a16e1c71d288b0327800e26141eb4fe/webapp/src/components/link_tooltip/link_tooltip.jsx#L118-L122

The todo plugin uses the webapp's exposed post-utils to render its markdown. I think it makes sense to do the same here. This would allow for feature-rich things like at-mentions to be rendered as well, assuming the backend does the same sort of translations of GitHub -> Mattermost usernames before the PR description is delivered to the frontend, as it does when it creates posts from a GitHub event.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in webapp/src/components/link_tooltip/link_tooltip.jsx at lines 118-122, then compare the todo plugin's use of the exposed post-utils and its linked reference. Replace the tooltip's ReactMarkdown rendering with post-utils rendering, and verify that the tooltip displays the GitHub markdown as expected, including translated at-mentions when supported by the backend.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
frontend
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.