Skip to content

Add edit button to work item weight widget

What does this MR do and why?

  1. Add edit button to weight widget, disable inline editing
  2. Add "Remove weight" button to the input form
  3. When not in edit mode, add a h3 above the value as a landmark in the sidebar. In edit mode, visually hide it and put in label/field
  4. Rename existing weight widget to work_item_weight_inline.vue

For #429137 (closed), as part of Add edit button to work item widgets (&11836 - closed)

Screenshots or screen recordings

Before After
Screenshot_2023-11-14_at_20.55.51 Screenshot_2023-11-14_at_20.33.10
Screenshot_2023-11-14_at_21.04.34 Screenshot_2023-11-17_at_16.44.51

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. In rails console enable flags
    Feature.enable(:work_items_mvc)
    Feature.enable(:work_items_mvc_2)
  2. Visit any task/issue work item, i.e. http://127.0.0.1:3000/groups/flightjs/-/work_items/31. If you don't have any you can go to issue page and edit URL, replace /issues/ with /work_items/
  3. Edit the weight

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

Edited by Simon Knox

Merge request reports