Skip to content

feat: add MarketTickerTape component and include in Navbar - #77

Merged
DevMuhdishaq merged 1 commit into
StelTade:mainfrom
EDOHWARES:feat/market-ticker-tape
Jun 21, 2026
Merged

feat: add MarketTickerTape component and include in Navbar#77
DevMuhdishaq merged 1 commit into
StelTade:mainfrom
EDOHWARES:feat/market-ticker-tape

Conversation

@EDOHWARES

Copy link
Copy Markdown
Contributor

PR: Implement Live Market Ticker Tape

Summary

  • Adds a persistent, animated market ticker tape to the app that displays live prices and 24h changes for top cryptocurrencies.
  • Lightweight implementation with caching and graceful error handling.

Files changed

  • Added: MarketTickerTape.tsx
  • Modified: Navbar.tsx (imports and mounts the ticker so it is visible site-wide)

What it does

  • Fetches top 20 cryptocurrencies by market cap from CoinGecko (USD) and displays:
    • Symbol (uppercase)
    • Current price (localized USD formatting)
    • 24h percentage change (color-coded: green for positive, red for negative)

Caching strategy

  • Results cached in localStorage with a 5-minute TTL to minimize load and speed up page render.
  • On fetch failure, attempts to show cached data and shows a friendly error message if nothing is available.

Auto-refresh

  • Auto-refreshes data every 5 minutes (aligns with acceptance criteria).

Animation

  • Smooth infinite horizontal scroll implemented by duplicating the item list and animating translateX.
  • Desktop animation duration: 28s
  • Mobile animation duration: 20s
  • Keeps scroll smooth and responsive.

Pause-on-hover

  • Hovering the ticker pauses animation immediately using CSS animation-play-state: paused.

Responsive behavior

  • Condensed mobile view hides price text while keeping symbol and 24h change readable.

Accessibility & performance

  • Uses aria-live="polite" to announce updates.
  • Caching reduces network requests and minimizes initial load impact.

Notes / Caveats

  • Source: CoinGecko public API (subject to rate limits).
  • Consider using an API key or server-side proxy if heavy traffic is expected.
  • Animation speed, duration, and styling can be tuned to match brand guidelines.
  • The ticker is included via Navbar so it appears across waitlist and related pages.

How to test locally

  1. Start the dev server:
npm install
npm run dev
  1. Open site pages (home, waitlist, premium).
  • The ticker should be fixed to the viewport bottom.
  1. Verify:
  • Symbols, prices, and 24h changes for the top ~20 coins.
  • Positive changes appear green; negative changes appear red.
  • Hovering the ticker pauses scrolling immediately.
  • Prices update every 5 minutes (or refresh the page to observe a fresh fetch).
  • If the network is unavailable, cached data (if present) is shown; otherwise a friendly error message is displayed.
  1. Resize to mobile widths to verify the condensed layout.

Acceptance mapping

  • Displays top 20 by market cap: ✅ (CoinGecko per_page=20)
  • 24h changes update every 5 minutes: ✅ (fetch interval + cache TTL = 5 minutes)
  • Smooth animation & pause-on-hover: ✅ (CSS keyframes + animation-play-state)
  • Mobile condensed view: ✅ (price hidden on small screens)
  • Error state: ✅ (friendly message with cached fallback)

Possible follow-ups

  • Move fetching to an internal API route (server-side) to reduce dependency on CoinGecko rate limits.
  • Tune animation speed or styling to better match product branding.
  • Add unit tests and end-to-end tests for the component.

Closes #63

@EDOHWARES

Copy link
Copy Markdown
Contributor Author

Pls approve workflow and merge PR

@DevMuhdishaq
DevMuhdishaq merged commit 58cd83a into StelTade:main Jun 21, 2026
0 of 2 checks passed
@grantfox-oss grantfox-oss Bot mentioned this pull request Jun 21, 2026
6 tasks
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.

Implement Live Market Ticker Tape

2 participants