stable

Clone or download

Read-only

Load tooltips inside components only

part of story #31143 Add the pull-request description as first possible comment In this contribution, I've put back the possibility to load the tooltips inside a given container. This behavior seems to have been removed by mistake since some parameters are still being passed to the lib in the artifact-modal V2, and they are still in the method's signature. We need to be able to look for tooltips targets in a given container because the lib does not register the tooltips it has already loaded. When you need to loadTooltips X times, you end up having X times the same version of every tooltips of the page, making them stack when you hover the reference. In the context of pullrequest-comments, we need to load the tooltips for elements that can be inside the comments. Hence the need to call it X times. How to test: - Put some user mentions and artifacts references in - Comments and replies - The pull-request description - A new reply you have just saved --> The tooltips are initialised properly --> There is only one occurence of the tooltip when you hover a ref Same behavior and results expected both in the vue and the angular overviews. Change-Id: Ifbdfc46a5e4be9829d7990b33708ec20204a9a5b

Modified Files

Name
M lib/frontend/tooltip/src/tooltip.d.ts +1 −1 Go to diff View file
M lib/frontend/tooltip/src/tooltip.js +5 −1 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestComment.test.ts +35 −1 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestComment.ts +22 −3 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestCommentBodyTemplate.ts +5 −1 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestCommentController.test.ts +4 −0 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestCommentController.ts +1 −0 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestCommentReplyTemplate.ts +3 −1 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/description-comment/PullRequestDescriptionComment.test.ts +26 −3 Go to diff View file
M plugins/pullrequest/scripts/lib/pullrequest-comments/src/description-comment/PullRequestDescriptionComment.ts +10 −0 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/dashboard/dashboard-controller.js +9 −3 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/dashboard/dashboard-controller.test.js +1 −0 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/overview/edit-modal/edit-modal-controller.js +9 −2 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/overview/overview-controller.js +4 −2 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/tooltip-service.js +2 −2 Go to diff View file