From c27e2350b15d7cd5e3fd72aae37421f13e563bba Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Tue, 7 Mar 2023 16:59:50 -0500 Subject: [PATCH] Updates ordering of minimap tooltip refs --- src/webviews/apps/plus/graph/minimap/minimap.ts | 72 +++++++++++++------------ 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/src/webviews/apps/plus/graph/minimap/minimap.ts b/src/webviews/apps/plus/graph/minimap/minimap.ts index f1d46fc..1211e5d 100644 --- a/src/webviews/apps/plus/graph/minimap/minimap.ts +++ b/src/webviews/apps/plus/graph/minimap/minimap.ts @@ -333,6 +333,10 @@ const styles = css` margin: 0.5rem 0; max-width: fit-content; } + .bb-tooltip .refs:empty { + margin: 0; + } + .bb-tooltip .refs .branch { border-radius: 3px; padding: 0 4px; @@ -861,39 +865,41 @@ export class GraphMinimap extends FASTElement { ${ groups != null ? /*html*/ ` -
- ${ - groups - ?.get('branch') - ?.sort((a, b) => (a.current ? -1 : 1) - (b.current ? -1 : 1)) - .map( - m => - /*html*/ `${ - m.name - }`, - ) - .join('') ?? '' - } - ${ - groups - ?.get('remote') - ?.sort((a, b) => (a.current ? -1 : 1) - (b.current ? -1 : 1)) - ?.map( - m => - /*html*/ `${ - m.name - }`, - ) - .join('') ?? '' - } - ${stashesCount ? /*html*/ `${pluralize('stash', stashesCount, { plural: 'stashes' })}` : ''} - ${ - groups - ?.get('tag') - ?.map(m => /*html*/ `${m.name}`) - .join('') ?? '' - } -
` +
${ + stashesCount + ? /*html*/ `${pluralize('stash', stashesCount, { + plural: 'stashes', + })}` + : '' + }${ + groups + ?.get('branch') + ?.sort((a, b) => (a.current ? -1 : 1) - (b.current ? -1 : 1)) + .map( + m => + /*html*/ `${ + m.name + }`, + ) + .join('') ?? '' + }
+
${ + groups + ?.get('remote') + ?.sort((a, b) => (a.current ? -1 : 1) - (b.current ? -1 : 1)) + ?.map( + m => + /*html*/ `${ + m.name + }`, + ) + .join('') ?? '' + }${ + groups + ?.get('tag') + ?.map(m => /*html*/ `${m.name}`) + .join('') ?? '' + }
` : '' } `;