Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions src/components/calltree/CallTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class CallTreeImpl extends PureComponent<Props> {
{
propName: 'totalPercent',
titleL10nId: '',
initialWidth: 50,
initialWidth: 55,
hideDividerAfter: true,
},
{
Expand All @@ -119,28 +119,28 @@ class CallTreeImpl extends PureComponent<Props> {
minWidth: 30,
initialWidth: 70,
resizable: true,
headerWidthAdjustment: 50,
headerWidthAdjustment: 55,
},
{
propName: 'self',
titleL10nId: 'CallTree--tracing-ms-self',
minWidth: 30,
initialWidth: 70,
minWidth: 40,
initialWidth: 80,
resizable: true,
},
{
propName: 'icon',
titleL10nId: '',
component: Icon as any,
initialWidth: 10,
initialWidth: 20,
},
];
case 'samples':
return [
{
propName: 'totalPercent',
titleL10nId: '',
initialWidth: 50,
initialWidth: 55,
hideDividerAfter: true,
},
{
Expand All @@ -149,28 +149,28 @@ class CallTreeImpl extends PureComponent<Props> {
minWidth: 30,
initialWidth: 70,
resizable: true,
headerWidthAdjustment: 50,
headerWidthAdjustment: 55 /* totalPercent initialWidth */,
},
{
propName: 'self',
titleL10nId: 'CallTree--samples-self',
minWidth: 30,
initialWidth: 70,
minWidth: 40,
initialWidth: 80,
resizable: true,
},
{
propName: 'icon',
titleL10nId: '',
component: Icon as any,
initialWidth: 10,
initialWidth: 20,
},
];
case 'bytes':
return [
{
propName: 'totalPercent',
titleL10nId: '',
initialWidth: 50,
initialWidth: 55,
hideDividerAfter: true,
},
{
Expand All @@ -179,20 +179,20 @@ class CallTreeImpl extends PureComponent<Props> {
minWidth: 30,
initialWidth: 140,
resizable: true,
headerWidthAdjustment: 50,
headerWidthAdjustment: 55,
},
{
propName: 'self',
titleL10nId: 'CallTree--bytes-self',
minWidth: 30,
initialWidth: 90,
minWidth: 40,
initialWidth: 100,
resizable: true,
},
{
propName: 'icon',
titleL10nId: '',
component: Icon as any,
initialWidth: 10,
initialWidth: 20,
},
];
default:
Expand Down
37 changes: 30 additions & 7 deletions src/components/shared/TreeView.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
}

.treeViewHeader {
height: 15px;
padding: 4px 0;
height: 23px;
border-bottom: 1px solid var(--base-border-color);
background: var(--raised-background-color);
color: var(--raised-foreground-color);
Expand Down Expand Up @@ -118,33 +117,57 @@
white-space: nowrap;
}

.treeViewHeaderColumn,
.treeViewRowColumn,
.treeViewRowScrolledColumns {
box-sizing: border-box;
padding-right: 5px;
padding-left: 5px;
}

.treeViewFixedColumn {
overflow: hidden;
text-overflow: ellipsis;
}

.treeViewColumnDivider {
.treeViewHeaderColumnDivider,
.treeViewRowColumnDivider {
display: flex;
width: 20px;
width: 1px;
flex: none;
align-items: stretch;
justify-content: center;
padding-right: 5px;
padding-left: 5px;
margin-right: -5px;
margin-left: -5px;
}

.treeViewColumnDivider.isResizable,
.treeViewHeaderColumn,
.treeViewHeaderColumnDivider {
padding-top: 4px;
padding-bottom: 4px;
}

.treeViewHeaderColumnDivider.isResizable {
position: relative;
z-index: 2;
}

.treeViewHeaderColumnDivider.isResizable,
.treeView.isResizingColumns {
cursor: col-resize;
}

.treeViewColumnDivider::before {
.treeViewRowColumnDivider::before,
.treeViewHeaderColumnDivider::before {
border-right: 1px solid var(--base-border-color);
content: '';
}

.treeViewColumnDivider.isResizable::before {
.treeViewHeaderColumnDivider.isResizable::before {
width: 1px;
flex-shrink: 0;
border-left: 1px solid var(--base-border-color);
}

Expand Down
17 changes: 6 additions & 11 deletions src/components/shared/TreeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class TreeViewHeader<
{col.hideDividerAfter !== true ? (
<span
key={col.propName + 'Divider'}
className={classNames('treeViewColumnDivider', {
className={classNames('treeViewHeaderColumnDivider', {
isResizable: col.resizable,
})}
onMouseDown={
Expand Down Expand Up @@ -241,7 +241,7 @@ class TreeViewRowFixedColumns<
)}
</span>
{col.hideDividerAfter !== true ? (
<span className="treeViewColumnDivider"></span>
<span className="treeViewRowColumnDivider"></span>
) : null}
</React.Fragment>
);
Expand Down Expand Up @@ -380,14 +380,9 @@ class TreeViewRowScrolledColumns<
) : null
}
<span
className={classNames(
'treeViewRowColumn',
'treeViewMainColumn',
mainColumn.propName,
{
dim: displayData.isFrameLabel,
}
)}
className={classNames('treeViewMainColumn', mainColumn.propName, {
dim: displayData.isFrameLabel,
})}
>
{displayData.badge ? (
<Localized
Expand Down Expand Up @@ -415,7 +410,7 @@ class TreeViewRowScrolledColumns<
</span>
{appendageColumn ? (
<span
className={`treeViewRowColumn treeViewAppendageColumn ${appendageColumn.propName}`}
className={`treeViewAppendageColumn ${appendageColumn.propName}`}
>
{reactStringWithHighlightedSubstrings(
displayData[appendageColumn.propName],
Expand Down
4 changes: 2 additions & 2 deletions src/test/components/MarkerTable.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ describe('MarkerTable', function () {
);

let dividerForFirstColumn = ensureExists(
document.querySelector('.treeViewColumnDivider')
document.querySelector('.treeViewHeaderColumnDivider')
);
let firstColumn = screen.getByText('Start');
expect(firstColumn).toHaveStyle({ width: '90px' });
Expand Down Expand Up @@ -510,7 +510,7 @@ describe('MarkerTable', function () {

// Now double click to reset the style.
dividerForFirstColumn = ensureExists(
document.querySelector('.treeViewColumnDivider')
document.querySelector('.treeViewHeaderColumnDivider')
);
fireEvent.dblClick(dividerForFirstColumn, { detail: 2 });
expect(firstColumn).toHaveStyle({ width: '90px' });
Expand Down
Loading
Loading