Skip to content

Prevent sending a labels update mutation if labels list is not changed

What does this MR do and why?

This MR serves as a follow-up for a few issues reported for labels dropdown refactoring:

  • we introduce isDirty state for labels, so we don't send a mutation to server when user hasn't interacted with labels;
  • this MR fixes a dropdown opening on embedded view (previously we called $refs.dropdown.show on component mount; now we are watching the visibility state of sidebar editable widget)
  • we prevent fetching labels until the dropdown is visible

Screenshots or screen recordings

No visual changes

How to setup and validate locally

  1. Enable the Labels widget FF
    Feature.enable(:labels_widget)
  2. Open Group -> Epics list
  3. Click on `New Epic button
  4. Make sure labels dropdown does not appear on page render
  5. Open the Issue view
  6. Open labels dropdown on the sidebar and close it without changing labels
  7. Make sure there is no GraphQL call

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

Edited by Natalia Tepluhina

Merge request reports