Skip to content

feat: add loading/empty/expired/rate-limited states to public rating …#1242

Open
DeePrincipal-dev-lang wants to merge 1 commit into
Shelterflex:mainfrom
DeePrincipal-dev-lang:feat/rating-card-public-states
Open

feat: add loading/empty/expired/rate-limited states to public rating …#1242
DeePrincipal-dev-lang wants to merge 1 commit into
Shelterflex:mainfrom
DeePrincipal-dev-lang:feat/rating-card-public-states

Conversation

@DeePrincipal-dev-lang

Copy link
Copy Markdown

feat: robust public states for tenant rating card (#1087)

The public rating card page (/rating-card/[token]) is often a landlord's first impression of
the platform. Previously it showed a blank screen or raw error on invalid/expired tokens —
exactly the wrong experience for a trust-building surface.

Changes

  • Loading — skeleton shimmer matching the page layout, aria-busy="true" while fetching
  • Success — existing card view, refactored with semantic headings (h1/h2)
  • Empty — Empty primitive inside "Rating History" when ratings.length === 0, with an
    explanatory message
  • Expired / Invalid — friendly copy for 404/410: "ask the tenant to generate a new link";
    Shield icon
  • Rate-limited — distinct state for 429: Clock icon + Alert with "wait a minute and try again";
    never shown as a raw error

Accessibility

  • Semantic

    /

    headings (was bare

    with no page-level heading)

  • role="progressbar" + aria-valuenow/min/max on score bars
  • aria-label on star groups ("4 out of 5 stars") and score numbers
  • aria-hidden on decorative icons
  • on rating dates
  • for landlord comments

OpenGraph / link previews

  • Server layout.tsx adds og:title, og:description, and Twitter card meta — so sharing the link
    in WhatsApp/Slack/email renders a proper preview instead of a bare URL

Out of scope — rating aggregation logic, authenticated management views.
closes #1171

…card

- Loading: skeleton shimmer with aria-busy
- Empty: Empty primitive when no ratings exist
- Expired/invalid: friendly message for 404/410 responses
- Rate-limited: distinct Clock icon + Alert for 429 responses
- a11y: semantic h1/h2, progressbar roles, aria-labels on stars/scores
- OpenGraph/Twitter meta via server layout for link previews
@vercel

vercel Bot commented Jun 28, 2026

Copy link
Copy Markdown

@DeePrincipal-dev-lang is attempting to deploy a commit to the pope-h's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@DeePrincipal-dev-lang Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@pope-h

pope-h commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Please sort the error… thanks

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.

Frontend: Robust loading/empty/expired states for the public tenant rating-card page

2 participants