Skip to content

feat(streak): build streak screen, calendar component, and exclude sidenav from full-screen pages#369

Merged
A6dulmalik merged 1 commit intoMindBlockLabs:mainfrom
simplicityf:feat/streak
Mar 26, 2026
Merged

feat(streak): build streak screen, calendar component, and exclude sidenav from full-screen pages#369
A6dulmalik merged 1 commit intoMindBlockLabs:mainfrom
simplicityf:feat/streak

Conversation

@simplicityf
Copy link
Copy Markdown
Contributor

@simplicityf simplicityf commented Mar 26, 2026

Summary

Built and assembled the full Streak feature screen for Mind Block, including all UI components,
page assembly, and layout exclusion for the sidenav.


Changes

1. Streak Page (frontend/app/streak/page.tsx)

Assembled the full Streak screen using all previously created components.

Structure:

  • StreakNavbar — top navbar with logo, streak count, points badge, and profile avatar
  • Page header row — close (✕) button, centered "Streak" title, share icon
  • StreakSummaryCard — displays streak count badge + "day streak!" label + flame icon;
    goes greyscale when streakCount === 0
  • StreakCalendar — full month calendar with navigation and streak day indicators
  • Continue button — navigates back to /dashboard
  • ShareStreakModal — bottom sheet triggered by the share icon, includes share card
    preview and 6 share options (Contacts, Telegram, Twitter, WhatsApp, E-mail, More)

2. StreakCalendar (frontend/components/StreakCalendar.tsx)

Monthly calendar component that visualises streak history.

Features:

  • Month navigation (previous/next) with onMonthChange callback
  • Monday-first 7-column grid layout
  • Weekday header labels (Mon–Sun)
  • Per-day StreakDayIndicator dots with 4 states:
    • empty — no activity
    • completed — activity done, not part of a streak run
    • streak — part of a consecutive streak run (fire icon + glow + horizontal highlight bar)
    • missed — day was missed
  • Today highlight with white ring
  • Accepts StreakData map keyed by YYYY-MM-DD

3. ClientLayout (frontend/components/ClientLayout.tsx)

Updated layout to hide the sidenav on pages that render full-screen without the sidebar.

Changes:

  • Added usePathname() to detect the current route
  • Introduced ROUTES_WITHOUT_SIDENAV constant for easy future maintenance
  • Wrapped both <SideNav> and the mobile <Menu> hamburger button in a single
    conditional block so both are hidden together

Excluded routes:

Route Reason
/ Landing page — standalone layout
/streak Full-screen streak view

Testing

  • Streak count displays correctly for active and zero states
  • Calendar renders correct month with accurate day offsets
  • Streak run highlights (fire icon + bar) appear on consecutive days
  • Month navigation moves forward and backward correctly
  • Share modal opens and closes correctly
  • Sidenav renders normally on all other routes
  • No layout shift or hydration errors on route change

Related Issue

Closes #276

Screenrecord

default.0.mp4

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 26, 2026

@simplicityf 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

@simplicityf simplicityf changed the title feat: hide sidenav and mobile menu toggle on streak and auth pages feat(streak): build streak screen, calendar component, and exclude sidenav from full-screen pages Mar 26, 2026
@A6dulmalik A6dulmalik merged commit 8a2a6c6 into MindBlockLabs:main Mar 26, 2026
8 of 12 checks passed
OthmanImam added a commit to OthmanImam/mindBlock_Backend that referenced this pull request Mar 28, 2026
- Implement automated benchmarking system to measure latency overhead of each middleware individually
- Create benchmark.ts script with load testing client for realistic performance measurement
- Support benchmarking of JWT Auth, RBAC, Security Headers, Timeout, Circuit Breaker, and Correlation ID middleware
- Add npm scripts: 'benchmark' and 'benchmark:ci' for running performance tests
- Update PERFORMANCE.md with comprehensive benchmarking documentation and usage guide
- Add benchmark integration tests to verify middleware initialization
- Update package.json with autocannon (load testing) and ts-node dependencies
- Update README.md with performance benchmarking section
- Update tsconfig.json to include scripts directory
- Export security middleware components for benchmarking

All implementation confined to middleware repository as required.
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 — Build Streak Page Layout

2 participants