Skip to content

Fix sidebar labels scoped label selection bug

Coung Ngo requested to merge 341121-fix-sidebar-labels-bug into master

What does this MR do and why?

This MR fixes a sidebar labels scoped label selection bug.

When a scoped label is currently selected in the label dropdown, then if another scoped label from the same set is picked then the currently selected scoped label is sometimes not unselected. This happens because currently the code finds the first scoped label and unchecks it but it doesn't check that it's a selected scoped label. The correct logic is that only one scoped label is ever selected.

Screenshots or screen recordings

before after
Screen_Recording_2021-10-08_at_3.45.03_pm Screen_Recording_2021-10-08_at_3.46.52_pm

How to set up and validate locally

  1. Visit any issue page such as http://127.0.0.1:3000/h5bp/html5-boilerplate/-/issues/1
  2. Test the labels dropdown

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

Merge request reports