diff --git a/apps/desktop/src/components/CommitDetails.svelte b/apps/desktop/src/components/CommitDetails.svelte
index 441cd8b9e6..3acb0f31de 100644
--- a/apps/desktop/src/components/CommitDetails.svelte
+++ b/apps/desktop/src/components/CommitDetails.svelte
@@ -8,7 +8,7 @@
import { rejoinParagraphs, truncate } from '$lib/utils/string';
import { inject } from '@gitbutler/core/context';
- import { Avatar, Icon, TestId, TimeAgo, Tooltip } from '@gitbutler/ui';
+ import { Avatar, Icon, Markdown, TestId, TimeAgo, Tooltip } from '@gitbutler/ui';
import { pxToRem } from '@gitbutler/ui/utils/pxToRem';
type Props = {
@@ -83,19 +83,28 @@
{#if description && description.trim()}
-
- {#if expanded}
- {description}
+ {#if rewrap}
+ {#if expanded}
+
+ {:else}
+
+ {/if}
{:else}
- {abbreviated}
+ {#if expanded}
+ {description}
+ {:else}
+ {abbreviated}
+ {/if}
{/if}
{#if isAbbrev}
{/if}
-
+
{/if}
@@ -141,7 +150,21 @@
font-size: 13px;
line-height: var(--text-lineheight-body);
font-family: var(--commit-message-font);
- white-space: pre-line;
+
+ /* Preserve original formatting when not in markdown mode */
+ &:not(.commit-markdown) {
+ white-space: pre-line;
+ }
+ }
+
+ /* Tone down markdown headers to not dominate the UI */
+ :global(.commit-markdown h1),
+ :global(.commit-markdown h2),
+ :global(.commit-markdown h3),
+ :global(.commit-markdown h4) {
+ font-size: 1.1em !important;
+ font-weight: 600;
+ margin-bottom: 0.4em;
}
.readmore {
diff --git a/apps/desktop/src/components/CommitTitle.svelte b/apps/desktop/src/components/CommitTitle.svelte
index 8074497532..6e53168bac 100644
--- a/apps/desktop/src/components/CommitTitle.svelte
+++ b/apps/desktop/src/components/CommitTitle.svelte
@@ -1,18 +1,37 @@