carry the design language through gitea's remaining views

Commits, branches, cross-repo issues, notifications and organizations all move
onto DataRow, which is what makes them agree with each other — five lists that
were each hand-assembled from the same flex/gap/truncate parts now genuinely
share one row.

The repo header gets the same owner-muted / name-semibold split as the list row,
so the two screens agree about what a repository is called. Its description goes
from 12px to 14px, and the tab strip with it — those are read, not scanned, and
they were the smallest text on the busiest screen.

DataRow gains `href` for destinations outside the app. Notifications needed it:
Gitea's subject URL can usually be parsed back into an in-app route and
sometimes cannot, and the row should stay clickable either way rather than
becoming a dead div on the payloads that do not parse.

Empty states across the dashboard now say what the search actually covers.
"No open issues" was hiding that Gitea's cross-repo search only ever looks at
issues you created, are assigned, or are mentioned in — which is the difference
between a quiet week and a misconfigured token.

Typechecks clean and prettier is clean. Still not rendered in a browser.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-06 21:22:57 +00:00
co-authored by Claude Opus 5
parent 9877a1d8e0
commit 143a6453d3
4 changed files with 154 additions and 134 deletions
+22 -2
View File
@@ -27,14 +27,27 @@ type DataRowProps = {
trail?: ReactNode;
/** Makes the whole row a link. Rows are real links so cmd-click and the back button work. */
to?: string;
/** Same, for a destination outside the app. Opens in a new tab; ignored when `to` is set. */
href?: string;
onClick?: () => void;
/** Marks the row as the current selection when the list is a master beside a detail pane. */
selected?: boolean;
className?: string;
};
export const DataRow = ({ title, description, meta, lead, trail, to, onClick, selected, className }: DataRowProps) => {
const interactive = !!to || !!onClick;
export const DataRow = ({
title,
description,
meta,
lead,
trail,
to,
href,
onClick,
selected,
className,
}: DataRowProps) => {
const interactive = !!to || !!href || !!onClick;
const body = (
<>
{lead && <div className="mt-0.5 flex shrink-0 items-center">{lead}</div>}
@@ -63,6 +76,13 @@ export const DataRow = ({ title, description, meta, lead, trail, to, onClick, se
</Link>
);
}
if (href) {
return (
<a href={href} target="_blank" rel="noreferrer" className={classes}>
{body}
</a>
);
}
if (onClick) {
return (
<button type="button" onClick={onClick} className={cn(classes, 'w-full')}>