Skip to content

feat: add skeleton loading UI for tracker data#246

Open
KunjalVanra wants to merge 2 commits into
GitMetricsLab:mainfrom
KunjalVanra:feature/skeleton-loading-ui
Open

feat: add skeleton loading UI for tracker data#246
KunjalVanra wants to merge 2 commits into
GitMetricsLab:mainfrom
KunjalVanra:feature/skeleton-loading-ui

Conversation

@KunjalVanra
Copy link
Copy Markdown

@KunjalVanra KunjalVanra commented May 15, 2026

✨ Changes Added

  • Replaced CircularProgress spinner with skeleton loading UI
  • Added animated shimmer table placeholders
  • Improved user experience during GitHub API fetching
  • Maintained stable table layout while loading
  • Added responsive loading placeholders using MUI Skeleton

🧪 Tested

  • Tested with Slow 3G network throttling
  • Verified loading placeholders render correctly
  • Confirmed real GitHub data replaces skeleton UI properly

📸 Preview

Screenshot (47)

Summary by CodeRabbit

  • New Features
    • Enhanced the loading experience in Tracker with a skeleton table preview that visually matches the final table structure, including placeholder cells and rows for a more polished loading state.

Review Change Stack

@netlify
Copy link
Copy Markdown

netlify Bot commented May 15, 2026

Deploy Preview for github-spy ready!

Name Link
🔨 Latest commit 097b8e0
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a0ab2ec4ebda50008fe5958
😎 Deploy Preview https://deploy-preview-246--github-spy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

📝 Walkthrough

Walkthrough

The Tracker component's loading UI now renders a TableContainer/Paper with the existing table header and multiple MUI Skeleton rows (including circular/title and per-cell skeletons) instead of the previous centered spinner or earlier placeholder.

Changes

Loading State UX Enhancement

Layer / File(s) Summary
Skeleton table loading placeholder
src/pages/Tracker/Tracker.tsx
Skeleton is imported from @mui/material. The loading conditional now returns a TableContainer/Paper containing the table header and a mapped set of skeleton rows using circular and rounded Skeleton variants for title and cells.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

Hi, I'm a rabbit, I code and hop,
I swapped the spinner for a tabletop,
Rows that shimmer, cells that glow,
A softer wait for users in tow,
Tiny paws applaud the steady flow. 🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description lacks the required template structure including 'Related Issue', 'Type of Change' checklist, and proper section formatting, though it contains useful information about changes and testing. Reformat the description to follow the template structure: add 'Related Issue' section, use proper section headings, include 'Type of Change' checklist with appropriate option selected, and maintain the template format.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding skeleton loading UI for tracker data, which aligns with the primary modification in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Thank you @KunjalVanra for your contribution. Please make sure your PR follows https://github.com/GitMetricsLab/github_tracker/blob/main/CONTRIBUTING.md#-pull-request-guidelines

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/pages/Tracker/Tracker.tsx`:
- Around line 283-348: The loading branch that renders the placeholder rows (the
[...Array(6)].map(...) block inside TableContainer) must include the same scroll
wrapper and pagination area used in the loaded branch so layout doesn't shift;
wrap the TableContainer or the Table in the same scroll container component (the
same Box/div with the scrolling styles) and add a stub pagination component or
placeholder element matching the real pagination (e.g., same height and
structure as the TablePagination used when data is loaded) so spacing is
identical between loading and loaded states. Ensure you modify the loading
branch where TableContainer and the skeleton rows are rendered to reuse the same
scroll wrapper and pagination placeholders as the loaded branch.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3f8f2268-05e8-418d-aba2-5436863f000e

📥 Commits

Reviewing files that changed from the base of the PR and between 56e17a3 and d8cfba5.

📒 Files selected for processing (1)
  • src/pages/Tracker/Tracker.tsx

Comment on lines +283 to +348
<TableContainer component={Paper}>
<Table size="small">
<TableHead>
<TableRow>
<TableCell>Title</TableCell>
<TableCell align="center">Repository</TableCell>
<TableCell align="center">State</TableCell>
<TableCell>Created</TableCell>
</TableRow>
</TableHead>

<TableBody>
{[...Array(6)].map((_, index) => (
<TableRow key={index}>
<TableCell>
<Box display="flex" alignItems="center" gap={1}>
<Skeleton
variant="circular"
width={20}
height={20}
animation="wave"
/>

<Skeleton
variant="text"
width="80%"
height={30}
animation="wave"
/>
</Box>
</TableCell>

<TableCell align="center">
<Skeleton
variant="text"
width={100}
height={25}
animation="wave"
sx={{ mx: "auto" }}
/>
</TableCell>

<TableCell align="center">
<Skeleton
variant="rounded"
width={70}
height={25}
animation="wave"
sx={{ mx: "auto" }}
/>
</TableCell>

<TableCell>
<Skeleton
variant="text"
width={90}
height={25}
animation="wave"
/>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>
) : (
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Keep loading and loaded table containers structurally consistent.

The loading branch omits the scroll wrapper and pagination area used in the loaded branch, so the page height shifts when data arrives. Add matching container/pagination placeholders to keep layout stable.

Proposed patch
-      {loading ? (
-  <TableContainer component={Paper}>
+      {loading ? (
+  <Box sx={{ maxHeight: "400px", overflowY: "auto" }}>
+  <TableContainer component={Paper}>
     <Table size="small">
@@
       <TableBody>
@@
       </TableBody>
     </Table>
+    <TablePagination
+      component="div"
+      count={0}
+      page={0}
+      onPageChange={() => {}}
+      rowsPerPage={ROWS_PER_PAGE}
+      rowsPerPageOptions={[ROWS_PER_PAGE]}
+      labelDisplayedRows={() => " "}
+      backIconButtonProps={{ disabled: true }}
+      nextIconButtonProps={{ disabled: true }}
+    />
   </TableContainer>
+  </Box>
 ) : (
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<TableContainer component={Paper}>
<Table size="small">
<TableHead>
<TableRow>
<TableCell>Title</TableCell>
<TableCell align="center">Repository</TableCell>
<TableCell align="center">State</TableCell>
<TableCell>Created</TableCell>
</TableRow>
</TableHead>
<TableBody>
{[...Array(6)].map((_, index) => (
<TableRow key={index}>
<TableCell>
<Box display="flex" alignItems="center" gap={1}>
<Skeleton
variant="circular"
width={20}
height={20}
animation="wave"
/>
<Skeleton
variant="text"
width="80%"
height={30}
animation="wave"
/>
</Box>
</TableCell>
<TableCell align="center">
<Skeleton
variant="text"
width={100}
height={25}
animation="wave"
sx={{ mx: "auto" }}
/>
</TableCell>
<TableCell align="center">
<Skeleton
variant="rounded"
width={70}
height={25}
animation="wave"
sx={{ mx: "auto" }}
/>
</TableCell>
<TableCell>
<Skeleton
variant="text"
width={90}
height={25}
animation="wave"
/>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>
) : (
<Box sx={{ maxHeight: "400px", overflowY: "auto" }}>
<TableContainer component={Paper}>
<Table size="small">
<TableHead>
<TableRow>
<TableCell>Title</TableCell>
<TableCell align="center">Repository</TableCell>
<TableCell align="center">State</TableCell>
<TableCell>Created</TableCell>
</TableRow>
</TableHead>
<TableBody>
{[...Array(6)].map((_, index) => (
<TableRow key={index}>
<TableCell>
<Box display="flex" alignItems="center" gap={1}>
<Skeleton
variant="circular"
width={20}
height={20}
animation="wave"
/>
<Skeleton
variant="text"
width="80%"
height={30}
animation="wave"
/>
</Box>
</TableCell>
<TableCell align="center">
<Skeleton
variant="text"
width={100}
height={25}
animation="wave"
sx={{ mx: "auto" }}
/>
</TableCell>
<TableCell align="center">
<Skeleton
variant="rounded"
width={70}
height={25}
animation="wave"
sx={{ mx: "auto" }}
/>
</TableCell>
<TableCell>
<Skeleton
variant="text"
width={90}
height={25}
animation="wave"
/>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
<TablePagination
component="div"
count={0}
page={0}
onPageChange={() => {}}
rowsPerPage={ROWS_PER_PAGE}
rowsPerPageOptions={[ROWS_PER_PAGE]}
labelDisplayedRows={() => " "}
backIconButtonProps={{ disabled: true }}
nextIconButtonProps={{ disabled: true }}
/>
</TableContainer>
</Box>
) : (
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/Tracker/Tracker.tsx` around lines 283 - 348, The loading branch
that renders the placeholder rows (the [...Array(6)].map(...) block inside
TableContainer) must include the same scroll wrapper and pagination area used in
the loaded branch so layout doesn't shift; wrap the TableContainer or the Table
in the same scroll container component (the same Box/div with the scrolling
styles) and add a stub pagination component or placeholder element matching the
real pagination (e.g., same height and structure as the TablePagination used
when data is loaded) so spacing is identical between loading and loaded states.
Ensure you modify the loading branch where TableContainer and the skeleton rows
are rendered to reuse the same scroll wrapper and pagination placeholders as the
loaded branch.

@mehul-m-prajapati
Copy link
Copy Markdown
Collaborator

@KunjalVanra - pls resolve conflicts

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/pages/Tracker/Tracker.tsx (1)

24-32: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Remove duplicate Skeleton import to fix module parse failure.

Skeleton is imported twice from @mui/material (lines 24 and 31), creating a duplicate binding that breaks compilation.

Proposed fix
 import {
   Container,
   Box,
   TextField,
   Button,
   Paper,
   Table,
   TableBody,
   TableCell,
   TableContainer,
   TableHead,
   TableRow,
   TablePagination,
   Link,
   Alert,
   Skeleton,
   Tabs,
   Tab,
   Select,
   MenuItem,
   FormControl,
   InputLabel,
-  Skeleton,
   Typography,
 } from "`@mui/material`";
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/Tracker/Tracker.tsx` around lines 24 - 32, The import list contains
a duplicate binding for Skeleton which breaks compilation; edit the module's
import statement that currently lists "Skeleton" twice (alongside Tabs, Tab,
Select, MenuItem, FormControl, InputLabel, Typography) and remove the redundant
Skeleton entry so each symbol is imported only once.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/pages/Tracker/Tracker.tsx`:
- Around line 24-32: The import list contains a duplicate binding for Skeleton
which breaks compilation; edit the module's import statement that currently
lists "Skeleton" twice (alongside Tabs, Tab, Select, MenuItem, FormControl,
InputLabel, Typography) and remove the redundant Skeleton entry so each symbol
is imported only once.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 754b5274-f6b0-4c67-8d54-6ede08f9fad8

📥 Commits

Reviewing files that changed from the base of the PR and between d8cfba5 and 097b8e0.

📒 Files selected for processing (1)
  • src/pages/Tracker/Tracker.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants