@@ -16,7 +16,6 @@ import type {
16
16
import GraphContainer , { CommitDateTimeSources , refZone } from '@gitkraken/gitkraken-components' ;
17
17
import type { SlChangeEvent } from '@shoelace-style/shoelace' ;
18
18
import { SlOption , SlSelect } from '@shoelace-style/shoelace/dist/react' ;
19
- import { VSCodeCheckbox , VSCodeRadio , VSCodeRadioGroup } from '@vscode/webview-ui-toolkit/react' ;
20
19
import type { FormEvent , MouseEvent , ReactElement } from 'react' ;
21
20
import React , { createElement , useEffect , useMemo , useRef , useState } from 'react' ;
22
21
import type { DateStyle , GraphBranchesVisibility } from '../../../../config' ;
@@ -69,13 +68,16 @@ import type { IpcNotification } from '../../../protocol';
69
68
import { DidChangeHostWindowFocusNotification } from '../../../protocol' ;
70
69
import { createCommandLink } from '../../shared/commands' ;
71
70
import { GlButton } from '../../shared/components/button.react' ;
71
+ import { GlCheckbox } from '../../shared/components/checkbox' ;
72
72
import { CodeIcon } from '../../shared/components/code-icon.react' ;
73
73
import { GlConnect } from '../../shared/components/integrations/connect.react' ;
74
74
import { GlMarkdown } from '../../shared/components/markdown/markdown.react' ;
75
75
import { MenuDivider , MenuItem , MenuLabel , MenuList } from '../../shared/components/menu/react' ;
76
76
import { PopMenu } from '../../shared/components/overlays/pop-menu/react' ;
77
77
import { GlPopover } from '../../shared/components/overlays/popover.react' ;
78
78
import { GlTooltip } from '../../shared/components/overlays/tooltip.react' ;
79
+ import type { RadioGroup } from '../../shared/components/radio/radio-group' ;
80
+ import { GlRadio , GlRadioGroup } from '../../shared/components/radio/radio.react' ;
79
81
import { GlFeatureBadge } from '../../shared/components/react/feature-badge' ;
80
82
import { GlFeatureGate } from '../../shared/components/react/feature-gate' ;
81
83
import { GlIssuePullRequest } from '../../shared/components/react/issue-pull-request' ;
@@ -469,14 +471,12 @@ export function GraphWrapper({
469
471
const handleOnMinimapDataTypeChange = ( e : Event | FormEvent < HTMLElement > ) => {
470
472
if ( graphConfig == null ) return ;
471
473
472
- const $el = e . target as HTMLInputElement ;
473
- if ( $el . value === 'commits' ) {
474
- const minimapDataType = $el . checked ? 'commits' : 'lines' ;
475
- if ( graphConfig . minimapDataType === minimapDataType ) return ;
474
+ const $el = e . target as RadioGroup ;
475
+ const minimapDataType = $el . value === 'lines' ? 'lines' : 'commits' ;
476
+ if ( graphConfig . minimapDataType === minimapDataType ) return ;
476
477
477
- setGraphConfig ( { ...graphConfig , minimapDataType : minimapDataType } ) ;
478
- onChangeGraphConfiguration ?.( { minimapDataType : minimapDataType } ) ;
479
- }
478
+ setGraphConfig ( { ...graphConfig , minimapDataType : minimapDataType } ) ;
479
+ onChangeGraphConfiguration ?.( { minimapDataType : minimapDataType } ) ;
480
480
} ;
481
481
482
482
const handleOnMinimapAdditionalTypesChange = ( e : Event | FormEvent < HTMLElement > ) => {
@@ -1343,54 +1343,54 @@ export function GraphWrapper({
1343
1343
placement = "right"
1344
1344
content = "Only follow the first parent of merge commits to provide a more linear history"
1345
1345
>
1346
- < VSCodeCheckbox
1346
+ < GlCheckbox
1347
1347
value = "onlyFollowFirstParent"
1348
1348
onChange = { handleFilterChange }
1349
1349
defaultChecked = { graphConfig ?. onlyFollowFirstParent ?? false }
1350
1350
>
1351
1351
Simplify Merge History
1352
- </ VSCodeCheckbox >
1352
+ </ GlCheckbox >
1353
1353
</ GlTooltip >
1354
1354
</ MenuItem >
1355
1355
< MenuDivider > </ MenuDivider >
1356
1356
< MenuItem role = "none" >
1357
- < VSCodeCheckbox
1357
+ < GlCheckbox
1358
1358
value = "remotes"
1359
1359
onChange = { handleFilterChange }
1360
1360
defaultChecked = { excludeTypes ?. remotes ?? false }
1361
1361
>
1362
1362
Hide Remote-only Branches
1363
- </ VSCodeCheckbox >
1363
+ </ GlCheckbox >
1364
1364
</ MenuItem >
1365
1365
< MenuItem role = "none" >
1366
- < VSCodeCheckbox
1366
+ < GlCheckbox
1367
1367
value = "stashes"
1368
1368
onChange = { handleFilterChange }
1369
1369
defaultChecked = { excludeTypes ?. stashes ?? false }
1370
1370
>
1371
1371
Hide Stashes
1372
- </ VSCodeCheckbox >
1372
+ </ GlCheckbox >
1373
1373
</ MenuItem >
1374
1374
</ >
1375
1375
) }
1376
1376
< MenuItem role = "none" >
1377
- < VSCodeCheckbox
1377
+ < GlCheckbox
1378
1378
value = "tags"
1379
1379
onChange = { handleFilterChange }
1380
1380
defaultChecked = { excludeTypes ?. tags ?? false }
1381
1381
>
1382
1382
Hide Tags
1383
- </ VSCodeCheckbox >
1383
+ </ GlCheckbox >
1384
1384
</ MenuItem >
1385
1385
< MenuDivider > </ MenuDivider >
1386
1386
< MenuItem role = "none" >
1387
- < VSCodeCheckbox
1387
+ < GlCheckbox
1388
1388
value = "mergeCommits"
1389
1389
onChange = { handleFilterChange }
1390
1390
defaultChecked = { graphConfig ?. dimMergeCommits ?? false }
1391
1391
>
1392
1392
Dim Merge Commit Rows
1393
- </ VSCodeCheckbox >
1393
+ </ GlCheckbox >
1394
1394
</ MenuItem >
1395
1395
</ MenuList >
1396
1396
</ PopMenu >
@@ -1447,27 +1447,25 @@ export function GraphWrapper({
1447
1447
</ button >
1448
1448
< MenuList slot = "content" >
1449
1449
< MenuLabel > Minimap</ MenuLabel >
1450
- < MenuItem role = "none" >
1451
- < VSCodeRadioGroup
1452
- orientation = "vertical"
1453
- value = { graphConfig ?. minimapDataType ?? 'commits' }
1454
- >
1455
- < VSCodeRadio
1456
- name = "minimap-datatype"
1457
- value = "commits"
1458
- onChange = { handleOnMinimapDataTypeChange }
1459
- >
1450
+ < GlRadioGroup
1451
+ value = { graphConfig ?. minimapDataType ?? 'commits' }
1452
+ onChange = { handleOnMinimapDataTypeChange }
1453
+ >
1454
+ < MenuItem role = "none" >
1455
+ < GlRadio name = "minimap-datatype" value = "commits" >
1460
1456
Commits
1461
- </ VSCodeRadio >
1462
- < VSCodeRadio name = "minimap-datatype" value = "lines" >
1457
+ </ GlRadio >
1458
+ </ MenuItem >
1459
+ < MenuItem role = "none" >
1460
+ < GlRadio name = "minimap-datatype" value = "lines" >
1463
1461
Lines Changed
1464
- </ VSCodeRadio >
1465
- </ VSCodeRadioGroup >
1466
- </ MenuItem >
1462
+ </ GlRadio >
1463
+ </ MenuItem >
1464
+ </ GlRadioGroup >
1467
1465
< MenuDivider > </ MenuDivider >
1468
1466
< MenuLabel > Markers</ MenuLabel >
1469
1467
< MenuItem role = "none" >
1470
- < VSCodeCheckbox
1468
+ < GlCheckbox
1471
1469
value = "localBranches"
1472
1470
onChange = { handleOnMinimapAdditionalTypesChange }
1473
1471
defaultChecked = {
@@ -1480,10 +1478,10 @@ export function GraphWrapper({
1480
1478
data-marker = "localBranches"
1481
1479
> </ span >
1482
1480
Local Branches
1483
- </ VSCodeCheckbox >
1481
+ </ GlCheckbox >
1484
1482
</ MenuItem >
1485
1483
< MenuItem role = "none" >
1486
- < VSCodeCheckbox
1484
+ < GlCheckbox
1487
1485
value = "remoteBranches"
1488
1486
onChange = { handleOnMinimapAdditionalTypesChange }
1489
1487
defaultChecked = {
@@ -1496,10 +1494,10 @@ export function GraphWrapper({
1496
1494
data-marker = "remoteBranches"
1497
1495
> </ span >
1498
1496
Remote Branches
1499
- </ VSCodeCheckbox >
1497
+ </ GlCheckbox >
1500
1498
</ MenuItem >
1501
1499
< MenuItem role = "none" >
1502
- < VSCodeCheckbox
1500
+ < GlCheckbox
1503
1501
value = "pullRequests"
1504
1502
onChange = { handleOnMinimapAdditionalTypesChange }
1505
1503
defaultChecked = {
@@ -1512,10 +1510,10 @@ export function GraphWrapper({
1512
1510
data-marker = "pullRequests"
1513
1511
> </ span >
1514
1512
Pull Requests
1515
- </ VSCodeCheckbox >
1513
+ </ GlCheckbox >
1516
1514
</ MenuItem >
1517
1515
< MenuItem role = "none" >
1518
- < VSCodeCheckbox
1516
+ < GlCheckbox
1519
1517
value = "stashes"
1520
1518
onChange = { handleOnMinimapAdditionalTypesChange }
1521
1519
defaultChecked = {
@@ -1527,10 +1525,10 @@ export function GraphWrapper({
1527
1525
data-marker = "stashes"
1528
1526
> </ span >
1529
1527
Stashes
1530
- </ VSCodeCheckbox >
1528
+ </ GlCheckbox >
1531
1529
</ MenuItem >
1532
1530
< MenuItem role = "none" >
1533
- < VSCodeCheckbox
1531
+ < GlCheckbox
1534
1532
value = "tags"
1535
1533
onChange = { handleOnMinimapAdditionalTypesChange }
1536
1534
defaultChecked = {
@@ -1539,7 +1537,7 @@ export function GraphWrapper({
1539
1537
>
1540
1538
< span className = "minimap-marker-swatch" data-marker = "tags" > </ span >
1541
1539
Tags
1542
- </ VSCodeCheckbox >
1540
+ </ GlCheckbox >
1543
1541
</ MenuItem >
1544
1542
</ MenuList >
1545
1543
</ PopMenu >
0 commit comments