Skip to content

Commit 62fe237

Browse files
Adopt new BB UI changes (#229)
1 parent 7ea69c2 commit 62fe237

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

src/button/button-contributions.ts

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ export const buttonContributions: ButtonContributionParams[] = [
412412
// we use xpath expressions, because the CSS selectors are not stable enough
413413
// tests are disabled because the URLs are not reachable without a session
414414
{
415-
id: "bb-repo",
415+
id: "bb-repo-old",
416416
exampleUrls: [
417417
// "https://bitbucket.org/svenefftinge/browser-extension-test/src/master/"
418418
],
@@ -424,11 +424,33 @@ export const buttonContributions: ButtonContributionParams[] = [
424424
}),
425425
application: "bitbucket",
426426
},
427+
{
428+
id: "bb-repo",
429+
exampleUrls: [
430+
// "https://bitbucket.org/svenefftinge/browser-extension-test/src/master/"
431+
],
432+
selector: 'xpath://*[@id="uid25"]/div/div[1]/div/header/div/div/div/div[2]/div',
433+
insertBefore:
434+
'xpath:/html/body/div[1]/div[2]/div[2]/div/div/div[1]/div/div/div/div[1]/div/div[2]/div/div[2]/div',
435+
containerElement: createContainerElement("div", {
436+
marginLeft: "2px",
437+
}),
438+
application: "bitbucket",
439+
},
427440
{
428441
id: "bb-pull-request",
429442
exampleUrls: [
430443
// "https://bitbucket.org/efftinge/browser-extension-test/pull-requests/1"
431444
],
445+
selector: `[data-testid="pr-header"] div[role="group"] div[role="group"]`,
446+
containerElement: createContainerElement("div", {}),
447+
application: "bitbucket",
448+
},
449+
{
450+
id: "bb-pull-request-old",
451+
exampleUrls: [
452+
// "https://bitbucket.org/efftinge/browser-extension-test/pull-requests/1"
453+
],
432454
selector: 'xpath://*[@id="main"]/div/div/div[1]/div/div/div/div[1]/div/div[2]/div/div[2]/div/div', // grandparent div of the "Request changes" and "Approve" buttons
433455
containerElement: createContainerElement("div", {}),
434456
insertBefore:

src/button/button.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@
311311
--border-radius: 3px;
312312
--border-width: 0;
313313

314-
--primary-bg-color: rgb(0, 82, 204);
315-
--primary-hover-bg-color: rgba(0, 82, 204, 0.9);
314+
--primary-bg-color: var(--ds-background-brand-bold,#0052cc);
315+
--primary-hover-bg-color: var(--ds-background-brand-bold-hovered,#0065ff);
316316
--primary-border-color: var(--aui-button-default-border-color, transparent);
317317
--primary-hover-border-color: var(--aui-button-default-border-color, transparent);
318318
--primary-color: var(--ds-text-inverse, #ffffff) !important;

0 commit comments

Comments
 (0)