stable

Clone or download

Read-only

feat: Display the [Edit labels] button when the user can edit labels

part of story #31537 Add tags and make them updatable In this contribution, a button is displayed after the labels when the user has the permission to update them. For the moment it does nothing when it is clicked. I chose to not disable it, since it is behind a feature flag, it is not really a problem. Please note that I've added aria-labels on both reviewers and labels edit buttons. Those buttons do not have titles, and people using screen-readers would be left clueless with what they actually do. How to test: - Go to a pull-request with a user who is not allowed to update the labels of pull-requests --> There is no button displayed - Same test as a user who is allowed --> There is a button Change-Id: I09166ef45b78437417f64d07c08b913fb57e8fd6

Modified Files

Name
M plugins/pullrequest/scripts/lib/rest-api-types/src/pull-request.ts +1 −0 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/po/fr_FR.po +6 −0 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/Labels/PullRequestLabels.test.ts +25 −2 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/Labels/PullRequestLabels.vue +31 −1 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/OverviewPane.vue +1 −1 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/Reviewers/PullRequestReviewerList.vue +3 −0 Go to diff View file