Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 29, 2026

Changes

Leaderboard loading placeholders were simple rectangles causing profile pictures to shift horizontally when data loaded. The placeholder didn't reserve space for the score/emoji columns on the left.

Before: Single placeholder element

const PlaceholderList = classed(ElementPlaceholder, 'h-12 my-1.5 rounded-12');

After: Structured placeholder matching actual DOM hierarchy

const LeaderboardPlaceholderItem = (): ReactElement => (
  <li>
    <div className="flex w-full flex-row items-center rounded-8 px-2">
      <ElementPlaceholder className="inline-flex h-4 min-w-14 justify-center rounded-6" />
      <ElementPlaceholder className="h-6 w-6 min-w-8 rounded-6 pl-1" />
      <div className="flex min-w-0 flex-shrink flex-row items-center p-2">
        <ElementPlaceholder className="h-8 w-8 rounded-10" />
        <div className="ml-2 flex flex-1 flex-col gap-1">
          <ElementPlaceholder className="h-3 w-24 rounded-6" />
          <ElementPlaceholder className="h-2.5 w-16 rounded-6" />
        </div>
      </div>
    </div>
  </li>
);

Key spacing matches:

  • Score column: min-w-14 (not fixed width)
  • Emoji column: min-w-8 pl-1 (exact match to UserTopList)
  • Profile wrapper: p-2 padding
  • Image: h-8 w-8

Affects UserTopList, CompanyTopList, and PopularHotTakesList on /users page.

Events

Did you introduce any new tracking events?

Experiment

Did you introduce any new experiments?

Manual Testing

Caution

Please make sure existing components are not breaking/affected by this PR

Verify no layout shift on /users page load - profile pictures should remain stationary during skeleton loading state.

On those affected packages:

  • Have you done sanity checks in the webapp?
  • Have you done sanity checks in the extension?
  • Does this not break anything in companion?

Did you test the modified components media queries?

  • MobileL (420px)
  • Tablet (656px)
  • Laptop (1020px)

Did you test on actual mobile devices?

  • iOS (Chrome and Safari)
  • Android
Original prompt

Fix the layout shift that happens on the users leaderboard page when loading the page fresh


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Preview domain

https://copilot-fix-layout-shift-leaderb.preview.app.daily.dev

@vercel
Copy link

vercel bot commented Jan 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview Jan 30, 2026 1:47pm

Request Review

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Co-authored-by: omBratteng <1681525+omBratteng@users.noreply.github.com>
Copilot AI and others added 2 commits January 29, 2026 20:14
Co-authored-by: omBratteng <1681525+omBratteng@users.noreply.github.com>
…rd types

Co-authored-by: omBratteng <1681525+omBratteng@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix layout shift on users leaderboard page Fix layout shift on users leaderboard page load Jan 29, 2026
Copilot AI requested a review from omBratteng January 29, 2026 20:21
Copilot AI and others added 2 commits January 30, 2026 13:34
…l layout

Co-authored-by: omBratteng <1681525+omBratteng@users.noreply.github.com>
Co-authored-by: omBratteng <1681525+omBratteng@users.noreply.github.com>
…w-8 pl-1)

Co-authored-by: omBratteng <1681525+omBratteng@users.noreply.github.com>
Copilot AI changed the title Fix layout shift on users leaderboard page load Fix leaderboard placeholder to prevent horizontal layout shift Jan 30, 2026
@omBratteng omBratteng closed this Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants