Skip to content

v1.2.2 stats page with starts stats for age groups#131

Merged
konrad2002 merged 2 commits intomasterfrom
develop
May 5, 2026
Merged

v1.2.2 stats page with starts stats for age groups#131
konrad2002 merged 2 commits intomasterfrom
develop

Conversation

@konrad2002
Copy link
Copy Markdown
Member

@konrad2002 konrad2002 commented May 5, 2026

Summary by CodeRabbit

  • New Features

    • Added participants by age statistics view displaying yearly data with gender-specific breakdowns and summary totals.
    • Implemented loading state with visual progress indicator during data fetch.
    • Added multi-language support for the statistics section.
  • Improvements

    • Enhanced meeting title link rendering with improved semantic HTML.

@konrad2002 konrad2002 self-assigned this May 5, 2026
@konrad2002 konrad2002 merged commit babcd43 into master May 5, 2026
6 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 99e81bdb-56ed-4fe9-acde-1f585ea406e0

📥 Commits

Reviewing files that changed from the base of the PR and between 3b1a6cf and 7ac0a22.

📒 Files selected for processing (14)
  • src/app/content/meetings/components/meeting-list-tile/meeting-list-tile.component.html
  • src/app/content/stats/components/stats-participants-ages/stats-participants-ages.component.html
  • src/app/content/stats/components/stats-participants-ages/stats-participants-ages.component.scss
  • src/app/content/stats/components/stats-participants-ages/stats-participants-ages.component.spec.ts
  • src/app/content/stats/components/stats-participants-ages/stats-participants-ages.component.ts
  • src/app/content/stats/pages/page-stats-event/page-stats-event.component.html
  • src/app/content/stats/pages/page-stats-event/page-stats-event.component.spec.ts
  • src/app/content/stats/pages/page-stats-event/page-stats-event.component.ts
  • src/app/core/model/start/start-stats.model.ts
  • src/app/core/service/api/start/start.service.ts
  • src/assets/i18n/cs.json
  • src/assets/i18n/de.json
  • src/assets/i18n/en.json
  • src/assets/i18n/ua.json

📝 Walkthrough

Walkthrough

This pull request adds a new participants-ages statistics component that displays a table of participant counts by year and gender, with loading progress indication. Additionally, a minor accessibility improvement changes the meeting title from a styled span to a semantic anchor element.

Changes

Meeting List Tile Accessibility

Layer / File(s) Summary
Semantic Link Enhancement
src/app/content/meetings/components/meeting-list-tile/meeting-list-tile.component.html
Meeting title element changes from a styled <span> with routerLink to a semantic <a> tag while preserving routing and display text.

Participants Ages Statistics Feature

Layer / File(s) Summary
Data Model
src/app/core/model/start/start-stats.model.ts
Introduces GenderStats (gender + amount), YearStats (year + gender array), and StartStatsResponse (optional year_gender_stats array plus index signature) interfaces.
Service Integration
src/app/core/service/api/start/start.service.ts
Adds getStartStatsByMeeting(meeting: string) method that calls the start/meet/{meeting}/stats API endpoint and returns Observable<StartStatsResponse>.
Component Logic
src/app/content/stats/components/stats-participants-ages/stats-participants-ages.component.ts
Implements StatsParticipantsAgesComponent that subscribes to route meetingId changes, calls getStartStatsByMeeting(), parses response, derives sorted yearStats and unique allGenders, computes summary totals, manages a progress bar ramp to 90% during loading, and provides helper methods for gender/year/column totals.
Component Template
src/app/content/stats/components/stats-participants-ages/stats-participants-ages.component.html
Renders translated title, conditional loading state with percentage and Material progress bar, and a stats table with per-year rows showing gender-specific amounts and totals, plus aggregated footer row.
Component Styling
src/app/content/stats/components/stats-participants-ages/stats-participants-ages.component.scss
Styles .stats-table with border-collapse, padding, alternating row backgrounds, header/footer emphasis, and loading state typography and progress bar layout.
Page Integration
src/app/content/stats/pages/page-stats-event/page-stats-event.component.ts, src/app/content/stats/pages/page-stats-event/page-stats-event.component.html
Imports StatsParticipantsAgesComponent into page component imports and replaces placeholder with <sr-stats-participants-ages> selector in template.
Internationalization
src/assets/i18n/cs.json, src/assets/i18n/de.json, src/assets/i18n/en.json, src/assets/i18n/ua.json
Adds STATS.PARTICIPANTS_AGES translation keys (TITLE, YEAR, PARTICIPANTS, STARTS, TOTAL) across Czech, German, English, and Ukrainian languages.
Tests & Module Setup
src/app/content/stats/components/stats-participants-ages/stats-participants-ages.component.spec.ts, src/app/content/stats/pages/page-stats-event/page-stats-event.component.spec.ts
Adds complete spec for StatsParticipantsAgesComponent with mocked services and translations; updates PageStatsEventComponent test configuration to include HTTP, routing, and translation providers.

Sequence Diagram

sequenceDiagram
    actor User
    participant Route
    participant StatsParticipantsAgesComponent
    participant StartService
    participant API
    participant Template

    User->>Route: Navigate to stats page
    Route->>StatsParticipantsAgesComponent: Route change detected
    StatsParticipantsAgesComponent->>StatsParticipantsAgesComponent: meetingId updated
    StatsParticipantsAgesComponent->>StatsParticipantsAgesComponent: fetchStats() triggered
    StatsParticipantsAgesComponent->>StatsParticipantsAgesComponent: Start progress bar ramp (0% → 90%)
    StatsParticipantsAgesComponent->>StartService: getStartStatsByMeeting(meetingId)
    StartService->>API: GET /start/meet/{meetingId}/stats
    API-->>StartService: Return StartStatsResponse
    StartService-->>StatsParticipantsAgesComponent: Observable<StartStatsResponse>
    StatsParticipantsAgesComponent->>StatsParticipantsAgesComponent: Parse & compute yearStats<br/>Derive allGenders<br/>Calculate summary totals
    StatsParticipantsAgesComponent->>StatsParticipantsAgesComponent: Set progress to 100%<br/>Stop timer
    StatsParticipantsAgesComponent->>Template: Update yearStats, allGenders, fetchingStarts
    Template-->>User: Render stats table with<br/>per-year gender amounts & totals
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 A stats table hops into view,
Participants grouped by their year through and through,
Progress bars ramp as the data takes flight,
Semantic links shine in accessibility's light,
Translation keys ready in four tongues so true! 🌍

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant