Skip to content

Commit

Permalink
✨ Show persistent comment on repositories table
Browse files Browse the repository at this point in the history
  • Loading branch information
foysalit committed Jan 16, 2025
1 parent ae58bf4 commit 406957a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
5 changes: 5 additions & 0 deletions components/repositories/RepositoriesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ function RepoRow(props: { repo: Repo; showEmail: boolean }) {
/>
)}
</div>
{subjectStatus?.comment && (
<p className="text-xs dark:text-gray-300 text-gray-700 max-w-xs">
<b>Note:</b> {subjectStatus.comment}
</p>
)}
<dl className="font-normal lg:hidden">
<dt className="sr-only">Name</dt>
<dd className="mt-1 truncate text-gray-700 dark:text-gray-100">
Expand Down
12 changes: 8 additions & 4 deletions components/subject/Summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export const SubjectSummary = ({
}) => {
const [showAll, setShowAll] = useState(false)
if (!stats) return null

return (
<div className="flex flex-row gap-1 items-center flex-wrap">
{stats.accountStats && (
Expand All @@ -266,9 +266,13 @@ export const SubjectSummary = ({
{stats.recordsStats && (
<RecordsStats showAll={showAll} stats={stats.recordsStats} />
)}
<button type="button" onClick={() => setShowAll((current) => !current)}>
<span className="text-xs">{showAll ? 'Show Summary' : 'Show All'}</span>
</button>
{stats.recordsStats && stats.accountStats && (
<button type="button" onClick={() => setShowAll((current) => !current)}>
<span className="text-xs">
{showAll ? 'Show Summary' : 'Show All'}
</span>
</button>
)}
</div>
)
}

0 comments on commit 406957a

Please sign in to comment.