Skip to content
Snippets Groups Projects

Fix icon and alignment of weight widget in sidebar when locked

Merged Chad Lavimoniere requested to merge 20240815-promotion-weight-collapsed-sidebar-icon into master

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
image image

How to set up and validate locally

  1. Check out this branch
  2. 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 } }
  1. Visit an issue and collapse the issue sidebar
  2. 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 of No.

Related to #469616 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading