Fix icon and alignment of weight widget in sidebar when locked
What does this MR do and why?
When weight is a locked feature, the icon and alignment are wrong for the weight widget in a collapsed issue sidebar.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Check out this branch
- apply this patch in the GDK to make the sidebar render the locked version of the weight widget:
diff --git a/ee/app/views/shared/issuable/_sidebar_weight.html.haml b/ee/app/views/shared/issuable/_sidebar_weight.html.haml
index 566a43e882ae..df34c3ab7b62 100644
--- a/ee/app/views/shared/issuable/_sidebar_weight.html.haml
+++ b/ee/app/views/shared/issuable/_sidebar_weight.html.haml
@@ -1,5 +1,5 @@
- if issuable_sidebar[:supports_weight]
- if issuable_sidebar[:features_available][:issue_weights]
- .js-sidebar-weight-widget-root{ data: { can_edit: can_edit, project_path: project_path, issue_iid: issue_iid } }
- - else
= render 'shared/promotions/promote_issue_weights'
+ - else
+ .js-sidebar-weight-widget-root{ data: { can_edit: can_edit, project_path: project_path, issue_iid: issue_iid } }
- Visit an issue and collapse the issue sidebar
- You will see that the widget matches the others in layout and scale, and uses the correct weight icon. The text will read
None
instead ofNo
.
Related to #469616