Skip to content

Migrate metrics widget to V2

Miranda Fluharty requested to merge 419151-migrate-metrics-widget into master

What does this MR do and why?

For #419151 (closed)

Migrate metrics widget to V2

Rewrite metrics widget to use widget.vue instead of returning an object

Changelog: changed
EE: true

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2023-07-25_at_22.05.33 Screenshot_2023-07-25_at_21.50.59
widget.js returns an object that gets converted into a widget extension, has the old widget styling widget.vue returns a vue component containing an <MrWidget /> component that gets rendered in the widget app, has the new widget styling

How to set up and validate locally

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

  1. git checkout 419151-migrate-metrics-widget
  2. find/make a project with a pipeline that generates metrics reports - you can clone the MR widgets demo project if you don't have one already
  3. open a merge request in the project, ensure a pipeline runs for the merge request, wait for the pipeline to finish
  4. the metrics report generated by the pipeline should be displayed in a widget on the merge request page

To run tests

yarn install
yarn jest vue_merge_request_widget/extensions/metrics

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Miranda Fluharty

Merge request reports

Loading