@@ -72,8 +72,7 @@ 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
- import { MenuDivider , MenuItem , MenuLabel , MenuList } from '../../shared/components/menu/react' ;
76
- import { PopMenu } from '../../shared/components/overlays/pop-menu/react' ;
75
+ import { MenuDivider , MenuItem , MenuLabel } from '../../shared/components/menu/react' ;
77
76
import { GlPopover } from '../../shared/components/overlays/popover.react' ;
78
77
import { GlTooltip } from '../../shared/components/overlays/tooltip.react' ;
79
78
import type { RadioGroup } from '../../shared/components/radio/radio-group' ;
@@ -1325,77 +1324,83 @@ export function GraphWrapper({
1325
1324
< SlOption value = "current" > Current Branch</ SlOption >
1326
1325
</ SlSelect >
1327
1326
</ GlTooltip >
1328
- < GlTooltip placement = "top" >
1329
- < PopMenu >
1330
- < button type = "button" className = "action-button" slot = "trigger" >
1327
+ < GlPopover
1328
+ className = "popover"
1329
+ placement = "bottom-start"
1330
+ trigger = "focus"
1331
+ arrow = { false }
1332
+ distance = { 0 }
1333
+ >
1334
+ < GlTooltip placement = "top" slot = "anchor" >
1335
+ < button type = "button" className = "action-button" >
1331
1336
< span className = { `codicon codicon-filter${ hasFilters ? '-filled' : '' } ` } > </ span >
1332
1337
< span
1333
1338
className = "codicon codicon-chevron-down action-button__more"
1334
1339
aria-hidden = "true"
1335
1340
> </ span >
1336
1341
</ button >
1337
- < MenuList slot = "content" >
1338
- < MenuLabel > Graph Filters</ MenuLabel >
1339
- { repo ?. isVirtual !== true && (
1340
- < >
1341
- < MenuItem role = "none" >
1342
- < GlTooltip
1343
- placement = "right"
1344
- content = "Only follow the first parent of merge commits to provide a more linear history"
1345
- >
1346
- < GlCheckbox
1347
- value = "onlyFollowFirstParent"
1348
- onChange = { handleFilterChange }
1349
- defaultChecked = { graphConfig ?. onlyFollowFirstParent ?? false }
1350
- >
1351
- Simplify Merge History
1352
- </ GlCheckbox >
1353
- </ GlTooltip >
1354
- </ MenuItem >
1355
- < MenuDivider > </ MenuDivider >
1356
- < MenuItem role = "none" >
1357
- < GlCheckbox
1358
- value = "remotes"
1359
- onChange = { handleFilterChange }
1360
- defaultChecked = { excludeTypes ?. remotes ?? false }
1361
- >
1362
- Hide Remote-only Branches
1363
- </ GlCheckbox >
1364
- </ MenuItem >
1365
- < MenuItem role = "none" >
1342
+ < span slot = "content" > Graph Filtering</ span >
1343
+ </ GlTooltip >
1344
+ < div slot = "content" >
1345
+ < MenuLabel > Graph Filters</ MenuLabel >
1346
+ { repo ?. isVirtual !== true && (
1347
+ < >
1348
+ < MenuItem role = "none" >
1349
+ < GlTooltip
1350
+ placement = "right"
1351
+ content = "Only follow the first parent of merge commits to provide a more linear history"
1352
+ >
1366
1353
< GlCheckbox
1367
- value = "stashes "
1354
+ value = "onlyFollowFirstParent "
1368
1355
onChange = { handleFilterChange }
1369
- defaultChecked = { excludeTypes ?. stashes ?? false }
1356
+ defaultChecked = { graphConfig ?. onlyFollowFirstParent ?? false }
1370
1357
>
1371
- Hide Stashes
1358
+ Simplify Merge History
1372
1359
</ GlCheckbox >
1373
- </ MenuItem >
1374
- </ >
1375
- ) }
1376
- < MenuItem role = "none" >
1377
- < GlCheckbox
1378
- value = "tags"
1379
- onChange = { handleFilterChange }
1380
- defaultChecked = { excludeTypes ?. tags ?? false }
1381
- >
1382
- Hide Tags
1383
- </ GlCheckbox >
1384
- </ MenuItem >
1385
- < MenuDivider > </ MenuDivider >
1386
- < MenuItem role = "none" >
1387
- < GlCheckbox
1388
- value = "mergeCommits"
1389
- onChange = { handleFilterChange }
1390
- defaultChecked = { graphConfig ?. dimMergeCommits ?? false }
1391
- >
1392
- Dim Merge Commit Rows
1393
- </ GlCheckbox >
1394
- </ MenuItem >
1395
- </ MenuList >
1396
- </ PopMenu >
1397
- < span slot = "content" > Graph Filtering</ span >
1398
- </ GlTooltip >
1360
+ </ GlTooltip >
1361
+ </ MenuItem >
1362
+ < MenuDivider > </ MenuDivider >
1363
+ < MenuItem role = "none" >
1364
+ < GlCheckbox
1365
+ value = "remotes"
1366
+ onChange = { handleFilterChange }
1367
+ defaultChecked = { excludeTypes ?. remotes ?? false }
1368
+ >
1369
+ Hide Remote-only Branches
1370
+ </ GlCheckbox >
1371
+ </ MenuItem >
1372
+ < MenuItem role = "none" >
1373
+ < GlCheckbox
1374
+ value = "stashes"
1375
+ onChange = { handleFilterChange }
1376
+ defaultChecked = { excludeTypes ?. stashes ?? false }
1377
+ >
1378
+ Hide Stashes
1379
+ </ GlCheckbox >
1380
+ </ MenuItem >
1381
+ </ >
1382
+ ) }
1383
+ < MenuItem role = "none" >
1384
+ < GlCheckbox
1385
+ value = "tags"
1386
+ onChange = { handleFilterChange }
1387
+ defaultChecked = { excludeTypes ?. tags ?? false }
1388
+ >
1389
+ Hide Tags
1390
+ </ GlCheckbox >
1391
+ </ MenuItem >
1392
+ < MenuDivider > </ MenuDivider >
1393
+ < MenuItem role = "none" >
1394
+ < GlCheckbox
1395
+ value = "mergeCommits"
1396
+ onChange = { handleFilterChange }
1397
+ defaultChecked = { graphConfig ?. dimMergeCommits ?? false }
1398
+ >
1399
+ Dim Merge Commit Rows
1400
+ </ GlCheckbox >
1401
+ </ MenuItem >
1402
+ </ div >
1403
+ </ GlPopover >
1399
1404
< span >
1400
1405
< span className = "action-divider" > </ span >
1401
1406
</ span >
@@ -1432,117 +1437,110 @@ export function GraphWrapper({
1432
1437
</ button >
1433
1438
< span slot = "content" > Toggle Minimap</ span >
1434
1439
</ GlTooltip >
1435
- < GlTooltip placement = "top" distance = { 7 } >
1436
- < PopMenu position = "right" >
1437
- < button
1438
- type = "button"
1439
- className = "action-button"
1440
- slot = "trigger"
1441
- aria-label = "Minimap Options"
1442
- >
1440
+ < GlPopover
1441
+ className = "popover"
1442
+ placement = "bottom-end"
1443
+ trigger = "focus"
1444
+ arrow = { false }
1445
+ distance = { 0 }
1446
+ >
1447
+ < GlTooltip placement = "top" distance = { 7 } slot = "anchor" >
1448
+ < button type = "button" className = "action-button" aria-label = "Minimap Options" >
1443
1449
< span
1444
1450
className = "codicon codicon-chevron-down action-button__more"
1445
1451
aria-hidden = "true"
1446
1452
> </ span >
1447
1453
</ button >
1448
- < MenuList slot = "content" >
1449
- < MenuLabel > Minimap</ MenuLabel >
1454
+ < span slot = "content" > Minimap Options</ span >
1455
+ </ GlTooltip >
1456
+ < div slot = "content" >
1457
+ < MenuLabel > Minimap</ MenuLabel >
1458
+ < MenuItem role = "none" >
1450
1459
< GlRadioGroup
1451
1460
value = { graphConfig ?. minimapDataType ?? 'commits' }
1452
1461
onChange = { handleOnMinimapDataTypeChange }
1453
1462
>
1454
- < MenuItem role = "none" >
1455
- < GlRadio name = "minimap-datatype" value = "commits" >
1456
- Commits
1457
- </ GlRadio >
1458
- </ MenuItem >
1459
- < MenuItem role = "none" >
1460
- < GlRadio name = "minimap-datatype" value = "lines" >
1461
- Lines Changed
1462
- </ GlRadio >
1463
- </ MenuItem >
1463
+ < GlRadio name = "minimap-datatype" value = "commits" >
1464
+ Commits
1465
+ </ GlRadio >
1466
+ < GlRadio name = "minimap-datatype" value = "lines" >
1467
+ Lines Changed
1468
+ </ GlRadio >
1464
1469
</ GlRadioGroup >
1465
- < MenuDivider > </ MenuDivider >
1466
- < MenuLabel > Markers</ MenuLabel >
1467
- < MenuItem role = "none" >
1468
- < GlCheckbox
1469
- value = "localBranches"
1470
- onChange = { handleOnMinimapAdditionalTypesChange }
1471
- defaultChecked = {
1472
- graphConfig ?. minimapMarkerTypes ?. includes ( 'localBranches' ) ??
1473
- false
1474
- }
1475
- >
1476
- < span
1477
- className = "minimap-marker-swatch"
1478
- data-marker = "localBranches"
1479
- > </ span >
1480
- Local Branches
1481
- </ GlCheckbox >
1482
- </ MenuItem >
1483
- < MenuItem role = "none" >
1484
- < GlCheckbox
1485
- value = "remoteBranches"
1486
- onChange = { handleOnMinimapAdditionalTypesChange }
1487
- defaultChecked = {
1488
- graphConfig ?. minimapMarkerTypes ?. includes ( 'remoteBranches' ) ??
1489
- true
1490
- }
1491
- >
1492
- < span
1493
- className = "minimap-marker-swatch"
1494
- data-marker = "remoteBranches"
1495
- > </ span >
1496
- Remote Branches
1497
- </ GlCheckbox >
1498
- </ MenuItem >
1499
- < MenuItem role = "none" >
1500
- < GlCheckbox
1501
- value = "pullRequests"
1502
- onChange = { handleOnMinimapAdditionalTypesChange }
1503
- defaultChecked = {
1504
- graphConfig ?. minimapMarkerTypes ?. includes ( 'pullRequests' ) ??
1505
- true
1506
- }
1507
- >
1508
- < span
1509
- className = "minimap-marker-swatch"
1510
- data-marker = "pullRequests"
1511
- > </ span >
1512
- Pull Requests
1513
- </ GlCheckbox >
1514
- </ MenuItem >
1515
- < MenuItem role = "none" >
1516
- < GlCheckbox
1517
- value = "stashes"
1518
- onChange = { handleOnMinimapAdditionalTypesChange }
1519
- defaultChecked = {
1520
- graphConfig ?. minimapMarkerTypes ?. includes ( 'stashes' ) ?? false
1521
- }
1522
- >
1523
- < span
1524
- className = "minimap-marker-swatch"
1525
- data-marker = "stashes"
1526
- > </ span >
1527
- Stashes
1528
- </ GlCheckbox >
1529
- </ MenuItem >
1530
- < MenuItem role = "none" >
1531
- < GlCheckbox
1532
- value = "tags"
1533
- onChange = { handleOnMinimapAdditionalTypesChange }
1534
- defaultChecked = {
1535
- graphConfig ?. minimapMarkerTypes ?. includes ( 'tags' ) ?? true
1536
- }
1537
- >
1538
- < span className = "minimap-marker-swatch" data-marker = "tags" > </ span >
1539
- Tags
1540
- </ GlCheckbox >
1541
- </ MenuItem >
1542
- </ MenuList >
1543
- </ PopMenu >
1544
- < span slot = "content" > Minimap Options</ span >
1545
- </ GlTooltip >
1470
+ </ MenuItem >
1471
+ < MenuDivider > </ MenuDivider >
1472
+ < MenuLabel > Markers</ MenuLabel >
1473
+ < MenuItem role = "none" >
1474
+ < GlCheckbox
1475
+ value = "localBranches"
1476
+ onChange = { handleOnMinimapAdditionalTypesChange }
1477
+ defaultChecked = {
1478
+ graphConfig ?. minimapMarkerTypes ?. includes ( 'localBranches' ) ?? false
1479
+ }
1480
+ >
1481
+ < span
1482
+ className = "minimap-marker-swatch"
1483
+ data-marker = "localBranches"
1484
+ > </ span >
1485
+ Local Branches
1486
+ </ GlCheckbox >
1487
+ </ MenuItem >
1488
+ < MenuItem role = "none" >
1489
+ < GlCheckbox
1490
+ value = "remoteBranches"
1491
+ onChange = { handleOnMinimapAdditionalTypesChange }
1492
+ defaultChecked = {
1493
+ graphConfig ?. minimapMarkerTypes ?. includes ( 'remoteBranches' ) ?? true
1494
+ }
1495
+ >
1496
+ < span
1497
+ className = "minimap-marker-swatch"
1498
+ data-marker = "remoteBranches"
1499
+ > </ span >
1500
+ Remote Branches
1501
+ </ GlCheckbox >
1502
+ </ MenuItem >
1503
+ < MenuItem role = "none" >
1504
+ < GlCheckbox
1505
+ value = "pullRequests"
1506
+ onChange = { handleOnMinimapAdditionalTypesChange }
1507
+ defaultChecked = {
1508
+ graphConfig ?. minimapMarkerTypes ?. includes ( 'pullRequests' ) ?? true
1509
+ }
1510
+ >
1511
+ < span
1512
+ className = "minimap-marker-swatch"
1513
+ data-marker = "pullRequests"
1514
+ > </ span >
1515
+ Pull Requests
1516
+ </ GlCheckbox >
1517
+ </ MenuItem >
1518
+ < MenuItem role = "none" >
1519
+ < GlCheckbox
1520
+ value = "stashes"
1521
+ onChange = { handleOnMinimapAdditionalTypesChange }
1522
+ defaultChecked = {
1523
+ graphConfig ?. minimapMarkerTypes ?. includes ( 'stashes' ) ?? false
1524
+ }
1525
+ >
1526
+ < span className = "minimap-marker-swatch" data-marker = "stashes" > </ span >
1527
+ Stashes
1528
+ </ GlCheckbox >
1529
+ </ MenuItem >
1530
+ < MenuItem role = "none" >
1531
+ < GlCheckbox
1532
+ value = "tags"
1533
+ onChange = { handleOnMinimapAdditionalTypesChange }
1534
+ defaultChecked = {
1535
+ graphConfig ?. minimapMarkerTypes ?. includes ( 'tags' ) ?? true
1536
+ }
1537
+ >
1538
+ < span className = "minimap-marker-swatch" data-marker = "tags" > </ span >
1539
+ Tags
1540
+ </ GlCheckbox >
1541
+ </ MenuItem >
1542
+ </ div >
1543
+ </ GlPopover >
1546
1544
</ span >
1547
1545
</ div >
1548
1546
</ div >
0 commit comments