mattermost-plugin-playbooks
mattermost-plugin-playbooks copied to clipboard
[MM-40300] Add plugin tooltips to some markdown components
Summary
This PR adds the hasPluginTooltips
markdown option to a few places where the plugin is rendering markdown.
The main case that should have this imo is the UpdatePost
component. That's where I keep expecting it work with linked GitHub issues/PRs in the update posts. I don't think I'm familiar enough with these components to know which ones make sense to have this functionality.
I've applied this change to:
-
components/update_post.tsx
-
components/backstage/playbook_runs/playbook_run/update_card.tsx
-
components/post_text.tsx
-
components/retrospective_post.tsx
-
components/formatted_markdown.tsx
-
components/rhs/rhs_about.tsx
Places using markdown I did not apply the change to:
-
components/checklist_item/title.tsx
Ticket Link
https://mattermost.atlassian.net/browse/MM-40300
Checklist
~~- [ ] Telemetry updated~~ ~~- [ ] Gated by experimental feature flag~~ ~~- [ ] Unit tests updated~~
@Phrynobatrachus I've fixed the issue with passing in the options into messageHtmlToComponent
Even after fixing that, it seems like there might be some rendering problem with
<LinkTooltip>
.
Do you happen to be testing with the GitHub plugin? There is some setup needed to activate the tooltips, including connecting your account to GitHub.
Alternatively, you can test with the demo plugin. Once installed and enabled, you can make a post with URL www.test.com
to activate the tooltip. You can install the plugin from this release https://github.com/mattermost/mattermost-plugin-demo/releases/tag/v0.9.0
Ah that's definitely what I was missing, thanks for the pointer. Will re-review shortly.
The usage in post_text
introduces a few inconsistencies, for example a link will pop the tooltip in a RHS run description but not the backstage view of the same, similar (opposite w/ respect to channels <-> backstage) with retrospective posts. I'd prefer that we either keep it only on the status updates or square those up.
@Phrynobatrachus What's your opinion on adding it to all places listed in the description? Or any specific places that don't make sense? I think supporting any place that would expect to have any URLs linked makes sense
I think supporting any place that would expect to have any URLs linked makes sense
I agree, I'm cool with trying that.
@Phrynobatrachus I have all of the places that use messageHtmlToComponent
using hasPluginTooltips
besides components/checklist_item/title.tsx
now. Maybe we should get a UX review on this?
Gentle bump for @abhijit-singh. Here's screenshots of the usages.