Conversation
Replace fourteen hand-drawn loading.tsx blocks with composition of new PageHeaderSkeleton, DataTableSkeleton, DataTableToolbarSkeleton and PositionCardSkeleton, each living beside and sharing layout constants with the real component it mirrors. Absorbs the two standalone table skeletons into ApplicationsResultsSkeleton and EmailLogResultsSkeleton so the pagination line is no longer missing mid-stream. Adds a filesystem guard test so the fix can't rot. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #720
Summary
loading.tsxskeletons with composition of four new shared skeletons (PageHeaderSkeleton,DataTableSkeleton,DataTableToolbarSkeleton,PositionCardSkeleton), each living beside the real component it mirrors and sharing its layout constants — following the precedent already set bySectionCardSkeleton.ApplicationsTableSkeleton,EmailLogTableSkeleton) intoApplicationsResultsSkeleton/EmailLogResultsSkeletonso the pagination summary line no longer disappears mid-stream.md(Buttonismin-h-11 md:min-h-0), and badge placeholders were 20px instead of the real 22px (Badgeistext-xs py-0.5+ border).manage/positions/[id]/edit/loading.tsxis intentionally left untouched — it's owned by Redesign The Edit Position Page #666 (PR #666 Redesign The Edit Position Page #690)./positions/[id]/loading.tsxkeeps a bespoke (but corrected) header skeleton, since that page hand-rolls its own header instead of usingPageHeader.tests/unit/loading-skeletons.test.ts, a filesystem guard that fails if aloading.tsxre-implementsCard/Tablemarkup, uses rawanimate-pulse, or skipsPageHeaderSkeleton(with a documented exception list).docs/DESIGN.md§5.Changes
lib/data-table.ts— newDATA_TABLE_*shell class constants, consumed bycomponents/ui/data-table.tsx.components/ui/data-table-skeleton.tsx— new server componentDataTableSkeleton, built on the realTable/TableHead/TableCellprimitives.components/ui/data-table-toolbar.tsx— newDataTableToolbarSkeleton.components/layouts/page-header.tsx— hoistedPageHeaderclass constants, newPageHeaderSkeleton.components/features/position-card.tsx— newPositionCardSkeleton(built against the currentPositionStatClustershape ondev; Replace The Position Card Stat Tiles With Four Status Circles #682 has not yet landed).components/features/applications-results.tsx,components/features/email-log-results.tsx— new*ResultsSkeletonexports.components/features/applications-table-skeleton.tsx,components/features/email-log-table-skeleton.tsx— deleted, superseded by the*ResultsSkeletonexports above.app/(main)/(auth)/manage/applications/page.tsx,app/(main)/(auth)/emails/page.tsx—Suspensefallbacks point at the new skeletons.loading.tsxfiles rewritten as pure composition of the shared skeletons.tests/unit/loading-skeletons.test.ts— new filesystem guard.docs/DESIGN.md§5 — skeleton adjacency rule + row-count convention.Testing plan
/as admin, as manager, and as a plain applicant: header lands in place, then each dashboard's own widget skeletons appear; no wrong-shaped card flash./positionssigned out and signed in: card heights and the group heading hold; check a position with a long description and one with none./positions/[id]: back link, title, badge and date line hold; page stays full-bleed withmax-w-2xlprose (unchanged width tier)./manage/positionsas manager and as admin: group headings and stat columns hold for a manager with only Open positions and one with Open + Closed + Draft; expand Archived./users: header (with Create user), all three toolbar fields, the trailing count line, and the six table columns hold — confirm the previous 4px jump on resolve is gone./global-questions: the drag-handle column lines up and the reorder hint does not flash./applications(My Applications): confirm the columns line up with the resolved<table>instead of reflowing (thegrid grid-cols-4defect called out in the ticket)./manage/applications: default view, then?status=draft(no checkbox column, privacy line present), then apply a filter so results re-stream — the pagination line should not appear from nowhere./emails: failure strip, toolbar, info line, table and pagination line all hold./applications/[id]and/manage/applications/[id]: back link, title + status badge, header actions and meta line hold; on a phone-width viewport confirm the back link and actions render at 44px, not 32px./profileand/positions/[id]/apply: header holds.bg-muted)./manage/positions/[id]/editis untouched and behaves exactly as ondev.Automated checks
npm run prettier:check— passnpm run eslint:check— passnpm run tsc:check— passnpm run test:unit— 451 passed (one pre-existing failure,email-delivery-events.test.ts, is aDATABASE_URLenvironment limitation unrelated to this change);npm run test(db project) could not run locally because Postgres isn't available in this environment — CI will run the full suite against a real database.Notes
DataTableSkeletonlives in a new server module rather than inside'use client'data-table.tsx, per the plan's documented deviation: importing a client module from a serverloading.tsxwould pullnuqs/dnd-kitinto that route's client bundle and the shared class constants would be unreadable from a server component anyway.PositionCardSkeleton's stat column mirrors today'sPositionStatClustershape ondev; if Replace The Position Card Stat Tiles With Four Status Circles #682 (stat circles) lands later, that PR must update the skeleton in the same change — the adjacency rule and shared file are there to make that coupling obvious.'use client'table vs. placeholder widths in the skeleton) since a client module's column config can't be imported into a server module. The new test narrows drift to widths only — column count, heights, padding and borders are now structural.