Track code quality report views more accurately
What does this MR do?
In !49079 (merged) we implemented usage ping tracking to count how many users view the full code quality report, but it was done on component mount, meaning the event was also tracked when any other tab the pipeline page was viewed, not just the "Code Quality" tab.
This MR moves the trigger to track the event from the report component's mounted()
function into an action that we call at the same time that we call the fetchReports
action: if the tab is active when the page is loaded then immediately, otherwise bind an event listener to be called when it becomes the active tab.
Screenshots (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Related to #276380 (closed)
Edited by Miranda Fluharty