Preload and cache the Task when hovering a link in the tasks list
requested to merge 370372-preload-and-cache-the-task-when-hovering-a-link-in-the-tasks-list into master
What does this MR do and why?
This MR attempts to fix a few things:
- use the same GraphQL client for work item links and work item app. This allows us to fetch a work item only once and then store the result in the cache;
- preload work item if work item link is hovered for more than 250 ms. This way we reduce the perceived loading time when modal is opened;
- general cleanup of the work item links application, fixing tests etc
Screenshots or screen recordings
Before | After |
---|---|
before | after |
How to set up and validate locally
- Enable the work items
Feature.enable(:work_items)
- Enable work items hierarchy
Feature.enable(:work_items_hierarchy)
- Visit any issue such as
http://127.0.0.1:3000/flightjs/Flight/-/issues/10
- Add a few child items
- Hover child item link, then click it. You should see brief or no loading indicator.
- Close the modal and click the same link again. There should be no loading indicator because this item is cached.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #370372 (closed)
Edited by Natalia Tepluhina