Skip to content

Commit e5b8312

Browse files
committed
build(deps): upgrade to blueprintjs@4
1 parent 3814ec9 commit e5b8312

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1130
-1024
lines changed

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
"forge": "./forge.config.js"
3636
},
3737
"dependencies": {
38-
"@blueprintjs/core": "^3.36.0",
39-
"@blueprintjs/popover2": "^0.12.2",
40-
"@blueprintjs/select": "^3.15.0",
38+
"@blueprintjs/core": "^4.8.0",
39+
"@blueprintjs/popover2": "^1.5.1",
40+
"@blueprintjs/select": "^4.5.3",
4141
"@electron/get": "^1.14.1",
4242
"@octokit/rest": "^16.43.1",
4343
"@sentry/electron": "^2.5.3",

src/less/blueprint.less

+12-12
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,42 @@
55
@import "~@blueprintjs/core/lib/less/variables.less";
66

77
// Override some of the colors
8-
.fiddle.bp3-dark {
9-
.bp3-menu,
10-
.bp3-popover .bp3-popover-content {
8+
.fiddle.bp4-dark {
9+
.bp4-menu,
10+
.bp4-popover2 .bp4-popover2-content {
1111
background-color: @background-1;
1212
}
1313

14-
.bp3-popover .bp3-popover-arrow-fill {
14+
.bp4-popover2 .bp4-popover2-arrow-fill {
1515
fill: @background-1;
1616
}
1717

18-
.bp3-button:not([class*="bp3-intent-"]) {
18+
.bp4-button:not([class*="bp4-intent-"]) {
1919
background-color: @background-1;
2020
}
2121

22-
.bp3-button.bp3-minimal {
22+
.bp4-button.bp4-minimal {
2323
background-color: unset;
2424
}
2525

26-
.bp3-button:hover,
27-
.bp3-button.bp3-minimal:hover {
26+
.bp4-button:hover,
27+
.bp4-button.bp4-minimal:hover {
2828
background-color: rgba(138, 155, 168, 0.15);
2929
}
3030

31-
.bp3-menu-item.bp3-active.bp3-intent-primary {
31+
.bp4-menu-item.bp4-active.bp4-intent-primary {
3232
background-color: @foreground-3;
3333
}
3434

35-
.bp3-dialog {
35+
.bp4-dialog {
3636
background-color: @background-4;
3737

38-
.bp3-dialog-header {
38+
.bp4-dialog-header {
3939
background-color: @background-3;
4040
}
4141
}
4242

43-
.bp3-running-text {
43+
.bp4-running-text {
4444
font-size: 14px;
4545
}
4646
}

src/less/components/commands.less

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ header {
1010
display: flex;
1111
width: 100%;
1212

13-
.bp3-popover-target {
14-
width: 100%;
13+
.bp4-popover2-target {
14+
width: 10%;
1515
}
1616
}
1717

@@ -58,13 +58,13 @@ header {
5858
&:last-of-type {
5959
margin-right: 10px;
6060

61-
.bp3-button-group {
61+
.bp4-button-group {
6262
margin-left: 5px;
6363
}
6464
}
6565
}
6666

67-
.bp3-control-group {
67+
.bp4-control-group {
6868
margin-right: 0.5rem;
6969
}
7070

src/less/components/dialogs.less

+6-2
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,15 @@
178178
}
179179

180180
.dialog-add-version {
181-
.bp3-file-input {
181+
.dialog-bisect-popover .bp4-button-group {
182+
display: block;
183+
}
184+
185+
.bp4-file-input {
182186
width: 100%;
183187
}
184188

185-
.bp3-callout {
189+
.bp4-callout {
186190
margin-top: 1rem;
187191
}
188192
}

src/less/components/settings.less

+7-7
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@
3535
width: 250px;
3636
}
3737

38-
.bp3-input-group {
38+
.bp4-input-group {
3939
margin-bottom: 15px;
4040
}
4141

42-
.bp3-divider {
42+
.bp4-divider {
4343
margin-top: 1rem;
4444
margin-bottom: 1rem;
4545
margin-left: 0;
4646
margin-right: 0;
4747
}
4848

49-
.bp3-callout {
49+
.bp4-callout {
5050
max-width: 850px;
5151
}
5252

@@ -55,6 +55,10 @@
5555

5656
.action {
5757
text-align: right;
58+
59+
.bp4-popover2-target {
60+
display: block;
61+
}
5862
}
5963
}
6064

@@ -85,10 +89,6 @@
8589
}
8690
}
8791

88-
.bp3-popover-target {
89-
display: inherit;
90-
}
91-
9292
.disabled-version {
9393
width: 100%;
9494
}

src/less/components/show-me.less

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
margin-top: 0;
77
};
88

9-
.bp3-callout {
9+
.bp4-callout {
1010
margin-bottom: 10px;
1111
}
1212
}

src/less/components/sidebar.less

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
font-size: 14px;
66
}
77

8-
.add-file-input .bp3-tree-node-label {
8+
.add-file-input .bp4-tree-node-label {
99
overflow: visible;
1010
}
1111

12-
.bp3-tree-node-caret-none {
12+
.bp4-tree-node-caret-none {
1313
min-width: 8px;
1414
}
1515

16-
.bp3-tree-node-content-1 {
16+
.bp4-tree-node-content-1 {
1717
padding-left: 0;
1818
}
1919

@@ -28,13 +28,13 @@
2828
}
2929

3030
.package-tree {
31-
.bp3-tree-node-content {
32-
.bp3-tree-node-secondary-label {
31+
.bp4-tree-node-content {
32+
.bp4-tree-node-secondary-label {
3333
min-width: 100px;
3434
}
3535
}
3636

37-
.bp3-tree-node-list {
37+
.bp4-tree-node-list {
3838
margin: 5px 0;
3939
}
4040
}
@@ -46,7 +46,7 @@
4646
background: @background-1;
4747
color: @dark-gray1;
4848

49-
.bp3-dark & {
49+
.bp4-dark & {
5050
color: @white;
5151
}
5252
}

src/less/components/version-select.less

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.bp3-fill {
1+
.bp4-fill {
22
.version-chooser {
33
width: 100%;
44
}

src/renderer/app.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ export class App {
221221
}
222222

223223
if (theme.isDark || theme.name.includes('dark')) {
224-
document.body.classList.add('bp3-dark');
224+
document.body.classList.add('bp4-dark');
225225
} else {
226-
document.body.classList.remove('bp3-dark');
226+
document.body.classList.remove('bp4-dark');
227227
}
228228
}
229229

src/renderer/components/commands-action-button.tsx

+10-11
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ import {
55
ButtonGroup,
66
IToastProps,
77
Menu,
8-
MenuItem,
9-
Popover,
108
Position,
119
Toaster,
1210
} from '@blueprintjs/core';
11+
import { MenuItem2, Popover2 } from '@blueprintjs/popover2';
1312
import { clipboard } from 'electron';
1413
import { when } from 'mobx';
1514
import { observer } from 'mobx-react';
@@ -376,17 +375,17 @@ export const GistActionButton = observer(
376375

377376
const menu = (
378377
<Menu>
379-
<MenuItem
378+
<MenuItem2
380379
text="Publish"
381380
active={actionType === GistActionType.publish}
382381
onClick={() => this.setActionType(GistActionType.publish)}
383382
/>
384-
<MenuItem
383+
<MenuItem2
385384
text="Update"
386385
active={actionType === GistActionType.update}
387386
onClick={() => this.setActionType(GistActionType.update)}
388387
/>
389-
<MenuItem
388+
<MenuItem2
390389
text="Delete"
391390
active={actionType === GistActionType.delete}
392391
onClick={() => this.setActionType(GistActionType.delete)}
@@ -395,9 +394,9 @@ export const GistActionButton = observer(
395394
);
396395

397396
return (
398-
<Popover content={menu} position={Position.BOTTOM}>
397+
<Popover2 content={menu} placement={Position.BOTTOM}>
399398
<Button icon="wrench" />
400-
</Popover>
399+
</Popover2>
401400
);
402401
};
403402

@@ -412,13 +411,13 @@ export const GistActionButton = observer(
412411
const privacyIcon = gitHubPublishAsPublic ? 'unlock' : 'lock';
413412
const privacyMenu = (
414413
<Menu>
415-
<MenuItem
414+
<MenuItem2
416415
text="Private"
417416
icon="lock"
418417
active={!gitHubPublishAsPublic}
419418
onClick={this.setPrivate}
420419
/>
421-
<MenuItem
420+
<MenuItem2
422421
text="Public"
423422
icon="unlock"
424423
active={gitHubPublishAsPublic}
@@ -428,9 +427,9 @@ export const GistActionButton = observer(
428427
);
429428

430429
return (
431-
<Popover content={privacyMenu} position={Position.BOTTOM}>
430+
<Popover2 content={privacyMenu} placement={Position.BOTTOM}>
432431
<Button icon={privacyIcon} />
433-
</Popover>
432+
</Popover2>
434433
);
435434
};
436435

src/renderer/components/dialog-add-theme.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -148,16 +148,16 @@ export const AddThemeDialog = observer(
148148
title="Add theme"
149149
className="dialog-add-version"
150150
>
151-
<div className="bp3-dialog-body">
151+
<div className="bp4-dialog-body">
152152
<FileInput
153153
onInputChange={this.onChangeFile}
154154
inputProps={inputProps as any}
155155
text={text}
156156
/>
157157
<br />
158158
</div>
159-
<div className="bp3-dialog-footer">
160-
<div className="bp3-dialog-footer-actions">{this.buttons}</div>
159+
<div className="bp4-dialog-footer">
160+
<div className="bp4-dialog-footer-actions">{this.buttons}</div>
161161
</div>
162162
</Dialog>
163163
);

src/renderer/components/dialog-add-version.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ export const AddVersionDialog = observer(
204204
title="Add local Electron build"
205205
className="dialog-add-version"
206206
>
207-
<div className="bp3-dialog-body">
207+
<div className="bp4-dialog-body">
208208
<FileInput
209209
id="custom-electron-version"
210210
inputProps={inputProps as any}
@@ -213,8 +213,8 @@ export const AddVersionDialog = observer(
213213
<br />
214214
{this.renderPath()}
215215
</div>
216-
<div className="bp3-dialog-footer">
217-
<div className="bp3-dialog-footer-actions">{this.buttons}</div>
216+
<div className="bp4-dialog-footer">
217+
<div className="bp4-dialog-footer-actions">{this.buttons}</div>
218218
</div>
219219
</Dialog>
220220
);

src/renderer/components/dialog-bisect.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as React from 'react';
22

33
import { Button, ButtonGroup, Callout, Dialog, Label } from '@blueprintjs/core';
4+
import classnames from 'classnames';
45
import { observer } from 'mobx-react';
56

67
import { RunnableVersion } from '../../interfaces';
@@ -197,6 +198,7 @@ export const BisectDialog = observer(
197198
public render() {
198199
const { isBisectDialogShowing } = this.props.appState;
199200
const { startIndex, endIndex, allVersions } = this.state;
201+
const className = classnames('bp4-dialog-body', 'dialog-bisect-popover');
200202

201203
return (
202204
<Dialog
@@ -205,7 +207,7 @@ export const BisectDialog = observer(
205207
title="Start a bisect session"
206208
className="dialog-add-version"
207209
>
208-
<div className="bp3-dialog-body">
210+
<div className={className}>
209211
{this.help}
210212
<Label>
211213
Earliest Version (Last &quot;known good&quot; version)
@@ -230,8 +232,8 @@ export const BisectDialog = observer(
230232
</ButtonGroup>
231233
</Label>
232234
</div>
233-
<div className="bp3-dialog-footer">
234-
<div className="bp3-dialog-footer-actions">{this.buttons}</div>
235+
<div className="bp4-dialog-footer">
236+
<div className="bp4-dialog-footer-actions">{this.buttons}</div>
235237
</div>
236238
</Dialog>
237239
);

src/renderer/components/dialog-token.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export const TokenDialog = observer(
176176
onClose={this.onClose}
177177
title="GitHub Token"
178178
>
179-
<div className="bp3-dialog-body">
179+
<div className="bp4-dialog-body">
180180
<p>
181181
Generate a{' '}
182182
<a onClick={this.openGenerateTokenExternal}>
@@ -193,8 +193,8 @@ export const TokenDialog = observer(
193193
onChange={this.handleChange}
194194
/>
195195
</div>
196-
<div className="bp3-dialog-footer">
197-
<div className="bp3-dialog-footer-actions">{this.buttons}</div>
196+
<div className="bp4-dialog-footer">
197+
<div className="bp4-dialog-footer-actions">{this.buttons}</div>
198198
</div>
199199
</Dialog>
200200
);

0 commit comments

Comments
 (0)