Skip to content

Preload and cache the Task when hovering a link in the tasks list

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

  1. Enable the work items
    Feature.enable(:work_items)
  2. Enable work items hierarchy
    Feature.enable(:work_items_hierarchy)
  3. Visit any issue such as http://127.0.0.1:3000/flightjs/Flight/-/issues/10
  4. Add a few child items
  5. Hover child item link, then click it. You should see brief or no loading indicator.
  6. 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.

Related to #370372 (closed)

Edited by Natalia Tepluhina

Merge request reports

Loading