Skip to content
Snippets Groups Projects

Make code quality badge in diff view link to modal

Merged Miranda Fluharty requested to merge 267612-make-code-quality-mr-diff-badge-a-link into master
All threads resolved!

What does this MR do?

This MR builds off of the code quality badge added to the diff file header in !56710 (merged) to make it open a modal with the details of the new code quality violations introduced by the merge request per file.

This MR is part of the implementation for #267612 (closed), specifically this point:

Link the badge so it navigates to the merge request main page widget in a single click OR open that modal on this page. Dev to decide which is lower level of effort to implement.

:computer: Technically, this MR:

  • passes the array of code quality violations down to the diff file header (instead of just a boolean)
  • passes the name of the file into the code quality badge (so we can use it in the code quality issue body component)
  • adds a modal to the code quality badge component for displaying the details when it is clicked
  • adds an href="#") to the badge so that it has the correct styling for a clickable element
  • uses the existing code quality issue body component to render the issues inside the modal
  • adds tests for the code quality badge component to check that the modal opens and passes the data down to the issue body components correctly

:warning: FYI: I started out with the link-to-main-page-widget approach because it sounded easier but I've switched to the open-a-modal-on-this-page approach instead

Make the code quality badge a link to the code quality widget, i.e. when the badge is clicked, navigate to the "Overview" tab of the merge request and scroll so that the widget is in view.

Split off from !56710 (merged), the most recent commit is what this MR does, the rest will be rebase-erased once !56710 (merged) is merged

- [x] rebase after !56710 (merged) is merged
- [ ] in Vue 3 eventhubs are deprecated, try using emits instead

Screenshots

diff file with badge (unchanged) badge hover (styling, text changed) modal on badge click (new)
Screen_Shot_2021-04-30_at_18.30.02 Screen_Shot_2021-05-06_at_12.47.49 Screen_Shot_2021-04-30_at_22.08.34

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Scott Hampton

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
  • Miranda Fluharty added 876 commits

    added 876 commits

    Compare with previous version

  • Miranda Fluharty changed the description

    changed the description

  • mentioned in issue #267612 (closed)

  • Pedro Moreira da Silva
  • changed milestone to %13.12

  • Miranda Fluharty added 5156 commits

    added 5156 commits

    Compare with previous version

  • Miranda Fluharty marked this merge request as ready

    marked this merge request as ready

  • Miranda Fluharty changed title from Draft: Make code quality badge in MR diff a link to the code quality widget to Make code quality badge in MR diff a link to a modal with the details of the code quality issues for that file

    changed title from Draft: Make code quality badge in MR diff a link to the code quality widget to Make code quality badge in MR diff a link to a modal with the details of the code quality issues for that file

  • Miranda Fluharty changed the description

    changed the description

  • Miranda Fluharty changed the description

    changed the description

  • added 1 commit

    • c72d2f16 - Make code quality badge in diff view link to modal

    Compare with previous version

  • Miranda Fluharty requested review from @pedroms

    requested review from @pedroms

  • requested review from @pgascouvaillancourt

  • removed review request for @pgascouvaillancourt

  • Miranda Fluharty mentioned in merge request !58833 (merged)

    mentioned in merge request !58833 (merged)

  • added 1 commit

    Compare with previous version

  • Paul Gascou-Vaillancourt approved this merge request

    approved this merge request

  • added 1 commit

    Compare with previous version

  • FYI: I amended the last commit to fix the pipeline failures [1, 2]

  • Miranda Fluharty changed the description

    changed the description

  • @shampton Could you do the maintainer review for this please? :pray_tone1:

  • Miranda Fluharty requested review from @shampton

    requested review from @shampton

  • Scott Hampton approved this merge request

    approved this merge request

  • Scott Hampton resolved all threads

    resolved all threads

  • @mfluharty This looks great! Thanks for putting this together. Happy to approve and set to MWPS.

  • Scott Hampton enabled an automatic merge when the pipeline for 70857ec0 succeeds

    enabled an automatic merge when the pipeline for 70857ec0 succeeds

  • Bundle size analysis [beta]

    This compares changes in bundle size for entry points between the commits 9c8129b5 and 27dc88d0

    :sparkles: Special assets

    Entrypoint / Name Size before Size after Diff Diff in percent
    average 3.14 MB 3.14 MB - 0.0 %
    mainChunk 1.9 MB 1.9 MB - 0.0 %

    Please look at the full report for more details


    Read more about how this report works.

    Generated by :no_entry_sign: Danger

  • Scott Hampton changed title from Make code quality badge in MR diff a link to a modal with the details of the code quality issues for that file to Make code quality badge in diff view link to modal

    changed title from Make code quality badge in MR diff a link to a modal with the details of the code quality issues for that file to Make code quality badge in diff view link to modal

  • merged

  • Scott Hampton mentioned in commit 1d48e365

    mentioned in commit 1d48e365

  • added workflowstaging label and removed workflowin review label

  • added workflowcanary label and removed workflowstaging label

  • added workflowproduction label and removed workflowcanary label

  • Please register or sign in to reply
    Loading