-
Notifications
You must be signed in to change notification settings - Fork 129
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
[GH - 774] Add tooltip for jira ticket links #835
Conversation
Hello @sibasankarnayak, Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here. |
@hanzei @mickmister |
@sibasankarnayak Can you please convert this PR to use typescript? I would like that to be done before I review this. Please let me know if you have any questions about this |
Sure @mickmister |
@matthewbirtch as suggested by @AshishDhama to use a npm package tippyjs - V4.2.6 which was used by mattermost-webapp which is using npm 7 cc @mickmister |
@AshishDhama Just want to note that if we need to use the same version of a node module, we would want to first export this to plugins in https://github.com/mattermost/mattermost-webapp/blob/master/plugins/export.js, so we ensure the same version will always be used. @sibasankarnayak Can you try implementing this by exposing the library via the webapp's exports? We wouldn't get type completion in the plugin's source code without also installing the package in the Jira plugin's project, but the package will be available to use at runtime via the |
@mickmister Thanks will add it there. |
@sibasankarnayak Have you created the PR to add |
created the PR mattermost/mattermost-webapp#10235 |
}; | ||
|
||
return ( | ||
<Tippy arrow={true} > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sibasankarnayak Tippy needs a reference to a point, so create a ref of the hyperlink and provide that ref to tippy. it should work.
https://github.com/mattermost/mattermost-webapp/blob/c5b87db2305a8fa4bbf8b5095ecf44d3158a1c53/components/widgets/tour_tip/tour_tip.tsx#L188
https://github.com/mattermost/mattermost-webapp/blob/c5b87db2305a8fa4bbf8b5095ecf44d3158a1c53/components/widgets/tour_tip/tour_tip.tsx#L217
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AshishDhama for providing reference i need to give a reference to hyperlink but as this is plugin we register this tooltip component on hover , i am not sure if we can add something like as you mentioned in this case.
let me know if we can or you can suggest the changes in PR that will help a lot.
This PR has been automatically labelled "stale" because it hasn't had recent activity. |
@mickmister @AshishDhama For using Tippy or any other tooltip library we need a reference to the actual component which will act as an anchor to the tooltip and in our case the component which needs to be an anchor is present on the Mattermost webapp code so it would not be possible to refer that component directly from the plugin. |
@raghavaggarwal2308 There's an open PR that exposes the component to plugins to use as
I'm fine with skipping the arrow if necessary |
@mickmister Since the PR #10235 has not merged yet. We suggest merging this PR with the typescript errors fixed, without the arrow and we can revisit that change once PR #10235 is merged. Created issue #886 for the same. |
implemented tooltip to show Ticket name, Status, Type, First few characters from the description
ticket here
Fixes #774