Skip to content

Commit c2e6a90

Browse files
authored
Fix incorrect selector causing the MR button to not show up in GitLab with Fluid layout (#158)
1 parent d48bd04 commit c2e6a90

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

.gitpod.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,26 @@ image:
22
file: .gitpod.Dockerfile
33

44
tasks:
5-
- init: |
5+
- name: install node version
6+
init: |
7+
nvm install 20
8+
nvm use 20
9+
nvm uninstall 16
10+
npm install -g pnpm
11+
gp sync-done node
12+
13+
# Without nodeJS 20 installed, the "sharp" package won't bundle properly,
14+
# so wait until the node update is finished in the prebuild.
15+
- name: build package
16+
init: |
17+
gp sync-await node
618
pnpm install
719
pnpm build
820
pnpm build-dev-tools
921
pnpm test
1022
command: |
1123
pnpm build
12-
24+
1325
ports:
1426
- name: sync
1527
port: 8080

src/button/button-contributions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,11 @@ export const buttonContributions: ButtonContributionParams[] = [
157157
exampleUrls: ["https://gitlab.com/svenefftinge/browser-extension-test/-/merge_requests/1"],
158158
match: /\/merge_requests\//,
159159
selector:
160-
"#content-body > div.merge-request > div.detail-page-header.border-bottom-0.gl-block.gl-pt-5.sm\\:\\!gl-flex.is-merge-request > div.detail-page-header-actions.gl-self-start.is-merge-request.js-issuable-actions.gl-flex.gl-mt-1 > div",
160+
"body[data-project-id] div.detail-page-header-actions.is-merge-request > div",
161161
containerElement: createElement("div", { marginLeft: "8px", marginRight: "-8px" }),
162162
application: "gitlab",
163163
insertBefore:
164-
"#content-body > div.merge-request > div.detail-page-header.border-bottom-0.gl-block.gl-pt-5.sm\\:\\!gl-flex.is-merge-request > div.detail-page-header-actions.gl-self-start.is-merge-request.js-issuable-actions.gl-flex.gl-mt-1 > div > div",
164+
"body[data-project-id] div.detail-page-header-actions.is-merge-request > div > div",
165165
manipulations: [
166166
{
167167
// make the clone button secondary

0 commit comments

Comments
 (0)