Skip to content

Use awardEmojiToggle mutation instead of workItemUpdate

What does this MR do and why?

We were using the workItemUpdate mutation for awarding emojis but it has few limitations.

  1. On rapid clicking of award emoji button, the workItemUpdate mutation is throwing errors.
  2. The workItemUpdate allows for adding emojis only if user is Reporter+, whereas awardEmojiToggle can work with Guest as well as non-member users.

Apart from that, awardEmojiToggle is also quite performant. The comparison is below:

workItemUpdate awardEmojiToggle
Screenshot 2023-05-24 at 4.58.07 PM.png Screenshot 2023-05-24 at 4.55.01 PM.png

Utilising the awardEmojiToggle mutation would be more pertinent in comparison to the workItemUpdate.

Screenshots or screen recordings

May-24-2023 16-37-48.gif

No errors on rapid press of the button

How to set up and validate locally

Prerequisites: Enable the following feature flag to create objects supporting this feature using gdk rails console:

Feature.enable(:okrs_mvc, Project.find_by_full_path('gitlab-org/gitlab-test'))

Steps:

  1. Login with a particular user
  2. Go to any Project > Issues > List
  3. Create an new Objective under New issue split button
  4. Go to Objective detail page
  5. Click on the 👍 rapidly more than 2 times
  6. There should be no error

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

Edited by Rajan Mistry

Merge request reports

Loading