mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 20:34:19 +00:00
style(ui): improve skillignore check details with grouped tag layout
Replace flat bullet list with two labeled sections: - Patterns: monospace code badges with muted background - Ignored Skills: warning-tinted tags for visual distinction Other checks keep the default bullet list rendering.
This commit is contained in:
@@ -33,6 +33,7 @@ docs/superpowers/
|
||||
.feature-radar/
|
||||
.cache/
|
||||
.playwright-mcp
|
||||
.superpowers/
|
||||
|
||||
|
||||
# Worktrees
|
||||
|
||||
+50
-14
@@ -86,26 +86,62 @@ function CheckRow({ check }: { check: DoctorCheck }) {
|
||||
</button>
|
||||
{expanded && hasDetails && (
|
||||
<div className="px-4 pb-3 pl-11">
|
||||
<ul className="space-y-1">
|
||||
{check.details!.map((detail, i) => (
|
||||
detail === '---' ? (
|
||||
<li key={i} className="border-t border-muted my-2 pt-2">
|
||||
<span className="text-xs font-medium text-pencil-light uppercase tracking-wide">Ignored Skills</span>
|
||||
</li>
|
||||
) : (
|
||||
<li key={i} className="text-sm text-pencil-light flex items-start gap-2">
|
||||
<span className="text-muted-dark mt-0.5 shrink-0">•</span>
|
||||
<span className="font-mono">{detail}</span>
|
||||
</li>
|
||||
)
|
||||
))}
|
||||
</ul>
|
||||
<CheckDetails details={check.details!} name={check.name} />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function CheckDetails({ details, name }: { details: string[]; name: string }) {
|
||||
// Skillignore check uses --- to separate patterns from ignored skills
|
||||
const sepIdx = details.indexOf('---');
|
||||
if (name === 'skillignore' && sepIdx !== -1) {
|
||||
const patterns = details.slice(0, sepIdx);
|
||||
const ignored = details.slice(sepIdx + 1);
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
{patterns.length > 0 && (
|
||||
<div>
|
||||
<p className="text-xs font-medium text-pencil-light mb-1.5">Patterns</p>
|
||||
<div className="flex flex-wrap gap-1.5">
|
||||
{patterns.map((p, i) => (
|
||||
<span key={i} className="font-mono text-xs px-2 py-0.5 rounded bg-muted/60 text-pencil-light border border-muted">
|
||||
{p}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{ignored.length > 0 && (
|
||||
<div>
|
||||
<p className="text-xs font-medium text-pencil-light mb-1.5">Ignored Skills</p>
|
||||
<div className="flex flex-wrap gap-1.5">
|
||||
{ignored.map((s, i) => (
|
||||
<span key={i} className="font-mono text-xs px-2 py-0.5 rounded bg-warning-light/50 text-pencil-light border border-warning/30">
|
||||
{s}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// Default: bullet list for all other checks
|
||||
return (
|
||||
<ul className="space-y-1">
|
||||
{details.map((detail, i) => (
|
||||
<li key={i} className="text-sm text-pencil-light flex items-start gap-2">
|
||||
<span className="text-muted-dark mt-0.5 shrink-0">•</span>
|
||||
<span>{detail}</span>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
|
||||
export default function DoctorPage() {
|
||||
const { data, isPending, error, isFetching, refetch } = useQuery({
|
||||
queryKey: queryKeys.doctor,
|
||||
|
||||
Reference in New Issue
Block a user