Skip to content

Releases

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 02:30

Added

  • FunLabLeaderboard names can be links or custom content. Three optional
    props: nameHref(entry) returns a URL to link that name to, or null to leave
    it as text; renderName(entry, name) renders the name cell content and wins
    over nameHref; linkComponent (default "a") renders the links, so a host
    can pass Inertia's Link or a router link. The viewer's row still says
    "(You)", outside the link, and keeps aria-current. Additive: with none of
    them set the markup is byte-for-byte what it was, so consumers do nothing.

Changed

  • Releases need a lab-run certificate. publish.yml gains a read-only
    lab-certificate job that every publishing job needs: a tag is published only
    when the fancy-labs lab has certified that exact version and commit. Consumers
    do nothing; this changes how releases are cut, not what the package does.

Fixed

  • A locked achievement's description is readable (axe color-contrast,
    lab run 601, K36). A locked tile is react-fancy's muted card, and the
    description was its muted text: zinc-500 on zinc-100, 4.39:1, under AA. On a
    locked tile it now uses the soft text token (--fancy-text-soft, zinc-700 by
    default). Earned tiles are unchanged. Nothing to do on upgrade.

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 05 Nov 19:10

Added

  • First release. React surfaces for laravel-fun-lab, built only from react-fancy:
    • FunLabProfileSummary: total XP, achievements and prizes, and each gamed metric's level and progress, said in words and as aria-valuetext. Metric selection is controlled (selectedMetric / onSelectMetric).
    • FunLabLeaderboard: by XP, achievements or prizes, overall or for one gamed metric, over a period, paged. by, metric, period and page are controlled; each control shows only when its handler is set. A real table, with column headers and a row header per entry. The viewer's row says "(You)" and carries aria-current.
    • FunLabAchievementGrid: earned and locked tiles, each saying which in words, with a controlled filter.
    • FunLabXpFeed: rows from the xp.awarded and metric.level-reached broadcasts; feedItemFromEcho and mergeFeed build and de-duplicate them.
    • FunLabLevelUp: a level-up card that never takes focus; its celebration runs only under prefers-reduced-motion: no-preference.
    • FunLabLiveRegionProvider / useFunLabAnnounce: one polite live region, rate-limited so a burst is one summary.
    • createFunLabClient: a fetch-only, read-only client for api/lfl, with host-supplied base URL and headers.
    • Pure helpers levelProgress, metricProgressFromLevels, scoreFor, interpolate, interpolateNodes, pickPlural, formatNumber, createAnnouncer; defaultLabels.
  • Every string is a JSON label, a {name} template or one per CLDR plural category; numbers and plurals follow locale. Numbers render left-to-right inside right-to-left text, and {+name} keeps a sign with its number.
  • data-fancy-fun-lab-* handles on every root, row, tile and control.
  • Peers: @particle-academy/react-fancy >=6.9.0 <7.0.0, React 19, Tailwind v4. Node 22 or newer.
  • Per-metric leaderboards need laravel-fun-lab's ?metric=, in its release after 0.6.0. On an older server, leave metric null.