Truncate long branch names in commit list item header

This commit is contained in:
Mattias Granlund 2023-11-29 21:29:25 +01:00
parent 4fd8c890c9
commit 915426ea4e
2 changed files with 5 additions and 3 deletions

View File

@ -120,6 +120,7 @@
onMount(() => { onMount(() => {
expandFromCache(); expandFromCache();
laneWidth = lscache.get(laneWidthKey + branch.id) ?? $userSettings.defaultLaneWidth; laneWidth = lscache.get(laneWidthKey + branch.id) ?? $userSettings.defaultLaneWidth;
console.log(laneWidth);
}); });
const selectedOwnership = writable(Ownership.fromBranch(branch)); const selectedOwnership = writable(Ownership.fromBranch(branch));
@ -364,10 +365,10 @@
class="z-30" class="z-30"
on:width={(e) => { on:width={(e) => {
laneWidth = e.detail; laneWidth = e.detail;
lscache.set(laneWidthKey + branch.id, e.detail, 7 * 1440); // 7 day ttl lscache.set(laneWidthKey + branch.id, laneWidth, 7 * 1440); // 7 day ttl
userSettings.update((s) => ({ userSettings.update((s) => ({
...s, ...s,
defaultLaneWidth: e.detail defaultLaneWidth: laneWidth
})); }));
return true; return true;
}} }}

View File

@ -123,7 +123,7 @@
{/if} {/if}
</div> </div>
<div class="expander"> <div class="expander">
<Icon name={expanded ? 'chevron-top' : 'chevron-down'} /> <Icon name={expanded ? 'chevron-down' : 'chevron-top'} />
</div> </div>
</button> </button>
{#if expanded} {#if expanded}
@ -225,6 +225,7 @@
align-items: center; align-items: center;
color: var(--clr-theme-scale-ntrl-0); color: var(--clr-theme-scale-ntrl-0);
gap: var(--space-8); gap: var(--space-8);
overflow-x: hidden;
} }
.content-wrapper { .content-wrapper {
display: flex; display: flex;