Skip to content

Service Desk list: Improve loading state

What does this MR do and why?

Use general loading flag instead of query specific

I've noticed that with frontendCaching flag disabled, the state of the view could be like:

  1. loading state: issues and issues counts are being fetched
  2. empty state: issues are fetched, issues counts are still loading
  3. loaded state: both issues and issues counts are fetched

Here's the comparison how much time it takes for issues and how much for issues counts to be fetched:

SD_issue_list_queries_on_gitlab_com

So instead of deciding isLoading value based on this.$apollo.queries.serviceDeskIssues.loading, I opted for this.$apollo.loading. This makes sure all the queries will finish, before we decide whether or not show the empty state.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screen_Recording_2023-08-30_at_14.18.52 Screen_Recording_2023-08-30_at_14.20.05

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

SERVICE DESK SETUP

  1. Setup a service desk on your GDK: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/service_desk_mail_room.md
  2. Send an email to your Service Desk, so you have something to display on the list.

ALTERNATIVE SETUP

  1. You can omit Service Desk setup and force an already existing issue to become a SD issue. Open the rails console: rails c
  2. Use these commands. Change 7 to the project id that matches the one you want to use for testing:
email = 'your-email@gitlab.com'
project = Project.find 7
issue = project.issues.last
issue.update!(service_desk_reply_to: email, author: User.support_bot)
IssueEmailParticipant.create!(issue: issue, email: email)
  1. In rails console enable the feature flag

    Feature.enable(:service_desk_vue_list)
  2. Visit the project that has Service Desk setup

  3. In the main navigation click Monitor, than Service Desk.

Note: I didn't find a way to properly reproduce it locally. It always loads issues counts faster for me, than the issues. I tried with debounce set for serviceDeskIssuesCounts. It does delay the execution, but it's still a short period, just later on the timeline.

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 #413092 (closed)

Edited by Paulina Sedlak-Jakubowska

Merge request reports