refactor: vertical titles for small timeline area

This commit is contained in:
Carlos Valente
2026-04-01 08:40:59 +02:00
committed by Carlos Valente
parent 8c14c330f5
commit 7e3a9d634b
2 changed files with 20 additions and 2 deletions
@@ -54,6 +54,15 @@ $timeline-color: color-mix(in srgb, transparent 60%, var(--background-color-over
.content { .content {
gap: 0rem; gap: 0rem;
writing-mode: vertical-rl; writing-mode: vertical-rl;
align-items: start;
justify-content: center;
}
.maybeInline {
flex-wrap: nowrap;
gap: 0.25rem;
overflow: hidden;
justify-content: center;
} }
.timeOverview { .timeOverview {
@@ -117,6 +126,14 @@ $timeline-color: color-mix(in srgb, transparent 60%, var(--background-color-over
} }
} }
.title {
min-width: 0;
min-height: 0;
overflow: hidden;
word-break: break-word;
overflow-wrap: anywhere;
}
.delay { .delay {
color: $ontime-delay-text; color: $ontime-delay-text;
} }
@@ -56,7 +56,7 @@ export function TimelineEntry({
const hasDelay = delay > 0; const hasDelay = delay > 0;
const lighterColour = alpha(colour, 0.7); const lighterColour = alpha(colour, 0.7);
const showTitle = width > 25; const showTitle = width > 20;
const smallArea = width < 40; const smallArea = width < 40;
return ( return (
@@ -96,6 +96,7 @@ export function TimelineEntry({
status={status} status={status}
/> />
)} )}
{smallArea && <div className={style.title}>{title}</div>}
</div> </div>
{showTitle && ( {showTitle && (
<> <>
@@ -109,7 +110,7 @@ export function TimelineEntry({
status={status} status={status}
/> />
)} )}
<div>{title}</div> {!smallArea && <div className={style.title}>{title}</div>}
</> </>
)} )}
</div> </div>