Skip to content

Commit ec62491

Browse files
authored
Make comparison table row path take more space if available (#2491)
1 parent 1953b6e commit ec62491

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

webview/src/plots/components/comparisonTable/ComparisonTableRow.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ export const ComparisonTableRow: React.FC<ComparisonTableRowProps> = ({
4141
return (
4242
<>
4343
<tr>
44-
<td className={cx({ [styles.pinnedColumnCell]: pinnedColumn })}>
44+
<td
45+
className={cx({ [styles.pinnedColumnCell]: pinnedColumn })}
46+
colSpan={pinnedColumn ? 1 : nbColumns}
47+
>
4548
<div className={styles.rowPath}>
4649
<button className={styles.rowToggler} onClick={toggleIsShownState}>
4750
<Icon icon={isShown ? ChevronDown : ChevronRight} />
@@ -56,7 +59,7 @@ export const ComparisonTableRow: React.FC<ComparisonTableRowProps> = ({
5659
<CopyButton value={path} className={styles.copyButton} />
5760
</div>
5861
</td>
59-
{nbColumns > 1 && <td colSpan={nbColumns - 1}></td>}
62+
{nbColumns > 1 && pinnedColumn && <td colSpan={nbColumns - 1}></td>}
6063
</tr>
6164
<tr>
6265
{plots.map((plot: ComparisonPlot) => {

webview/src/plots/components/comparisonTable/styles.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ $gap: 4px;
102102
text-align: left;
103103
display: flex;
104104
user-select: text;
105-
width: calc(100% - 20px);
105+
max-width: calc(100% - 20px);
106106

107107
svg {
108108
fill: $fg-color;

0 commit comments

Comments
 (0)