Files
radicle-explorer/src/components/CobCommitTeaser.svelte
T
Rūdolfs Ošiņš 010cac0377 Redesign app with new UI kit
Redesign the entire app with a new UI kit. Typography, colors, icons,
avatars, and border radii have all been updated for a more polished,
consistent appearance that matches our other products like
radicle-explorer.

- Replace blockies-based avatars with a new DID-based avatar system
- Move Settings and Create Issue into fullscreen modals
- Change the default theme to follow the system theme
- Remove window decorations on macOS for a cleaner, more native feel
- Update the app icon
- Fix popovers and tooltips

Navigation:

- Rewrite app navigation and layouts
- Add a sidebar that gives you access to all your repos
- Change the startup screen to open directly to the notification inbox
- Add a getting started guide shown to new users on first launch

Settings:

- Add a setting to disable the notification badge
- Add a code font setting

Bug fixes:

- Fix reactions and edits incorrectly targeting the root comment
  instead of the intended reply
- Restrict issue/patch state, labels and assignees to delegates only
2026-03-20 17:48:38 -06:00

116 lines
2.8 KiB
Svelte

<script lang="ts">
import type { Commit } from "@bindings/repo/Commit";
import type { Snippet } from "svelte";
import { twemoji } from "@app/lib/utils";
import Button from "@app/components/Button.svelte";
import CompactCommitAuthorship from "@app/components/CompactCommitAuthorship.svelte";
import Icon from "@app/components/Icon.svelte";
import Id from "@app/components/Id.svelte";
import InlineTitle from "@app/components/InlineTitle.svelte";
interface Props {
children?: Snippet;
commit: Commit;
disabled: boolean;
hoverable?: boolean;
onclick: () => void;
}
const {
children,
commit,
disabled,
hoverable = false,
onclick,
}: Props = $props();
let commitMessageVisible = $state(false);
</script>
<style>
.teaser {
display: flex;
font: var(--txt-body-m-regular);
align-items: start;
padding: 0.125rem 0;
}
.message {
align-items: center;
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
-webkit-touch-callout: initial;
-webkit-user-select: text;
user-select: text;
}
.left {
display: flex;
gap: 0.5rem;
padding: 0 0.5rem;
flex-direction: column;
}
.right {
display: flex;
align-items: center;
gap: 1rem;
margin-left: auto;
height: 1.3125rem;
}
.commit-message {
font: var(--txt-body-s-regular);
-webkit-touch-callout: initial;
-webkit-user-select: text;
user-select: text;
}
.commit-expand-button {
height: 1.3125rem;
display: flex;
align-items: center;
}
.disabled {
color: var(--color-text-disabled) !important;
}
pre {
white-space: pre-wrap;
word-wrap: break-word;
}
</style>
<!-- svelte-ignore a11y_no_static_element_interactions -->
<!-- svelte-ignore a11y_click_events_have_key_events -->
<div class="teaser" class:disabled {onclick} aria-label="commit-teaser">
<div class="left">
<div class="message">
<div style:cursor={hoverable ? "pointer" : "default"} use:twemoji>
<InlineTitle fontSize="small" content={commit.summary} />
</div>
{#if commit.message.trim() !== commit.summary.trim()}
<div class="commit-expand-button">
<Button
variant="naked"
stylePadding="0 0.25rem"
onclick={e => {
e.stopPropagation();
commitMessageVisible = !commitMessageVisible;
}}>
<Icon name="ellipsis" />
</Button>
</div>
{/if}
</div>
{#if commitMessageVisible}
<div class="commit-message">
<pre>{commit.message.replace(commit.summary, "").trim()}</pre>
</div>
{/if}
</div>
<div class="right">
{@render children?.()}
<CompactCommitAuthorship {commit}>
<Id id={commit.id} clipboard={commit.id} />
</CompactCommitAuthorship>
</div>
</div>