Skip to content

feat: init stats page refresh (WIP/ON HOLD) #547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 60 commits into
base: main
Choose a base branch
from

Conversation

Logannford
Copy link
Collaborator

@Logannford Logannford commented Mar 24, 2025

Block one (wip):
Screenshot 2025-03-25 at 23 20 24

Block two (wip):
Screenshot 2025-03-25 at 23 20 56

@Logannford Logannford added App This feature is related to the app design large this feature is a large feature statistics Feature branch labels Mar 24, 2025
@Logannford Logannford requested a review from Copilot March 24, 2025 21:00
@Logannford Logannford self-assigned this Mar 24, 2025
@Logannford Logannford linked an issue Mar 24, 2025 that may be closed by this pull request
Copy link

vercel bot commented Mar 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
techblitz ❌ Failed (Inspect) Apr 23, 2025 9:03pm

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new statistics page refresh feature by implementing a radial chart for coding question difficulty data. Key changes include:

  • Adding the DifficultyRadialChart component to visualize difficulty breakdown.
  • Extending types to include difficulty records.
  • Updating data fetching logic to support difficulty data.
  • Integrating the new chart and updating page metadata in the statistics page.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/components/app/statistics/difficulty-radial-chart.tsx New chart component for displaying difficulty data with a custom legend and tooltip.
src/types/Stats.ts Extended StatsChartData type to optionally include difficulty records.
src/utils/data/statistics/get-stats-chart-data.ts Added parameters and logic for separating data by difficulty.
src/app/(app)/(default_layout)/statistics/page.tsx Updated page layout to include the new DifficultyRadialChart and improved metadata.
Comments suppressed due to low confidence (2)

src/components/app/statistics/difficulty-radial-chart.tsx:28

  • The 'backgroundColor' prop is accepted but not used anywhere in the component. Consider applying it to a container element if it is intended to style the background.
export default function DifficultyRadialChart({ questionData, step, backgroundColor }: { ... }) {

src/utils/data/statistics/get-stats-chart-data.ts:127

  • The 'includeDifficultyData' flag is declared in the function signature and passed from getData but is never used in the logic. Clarify whether this flag should drive the inclusion of difficulty data, or remove it to avoid confusion.
if (separateByDifficulty) {

@Logannford Logannford requested a review from Copilot March 24, 2025 22:01
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new statistics page refresh with an added difficulty radial chart for visualizing question difficulty levels, and updates several stats data fetching functions to support a flexible date range. The key changes include:

  • Adding the DifficultyRadialChart component to render difficulty statistics.
  • Updating the getStatsChartData and related functions to handle an 'all' range and include difficulty data.
  • Enhancing the statistics page layout and hero component with dynamic metadata and grid positioning.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/components/app/statistics/difficulty-radial-chart.tsx New component for visualizing difficulty statistics using a radial chart.
src/utils/data/statistics/get-stats-chart-data.ts Modified stats functions to support an 'all' range and include difficulty data.
src/types/Stats.ts Updated type definitions to include difficulties data.
src/app/(app)/(default_layout)/statistics/page.tsx Updated statistics page to integrate the new chart and metadata generation.
src/components/shared/hero.tsx Added gridPosition prop for flexible hero layout.
src/app/(app)/(default_layout)/layout.tsx Minor layout adjustments for container usage.
Comments suppressed due to low confidence (2)

src/utils/data/statistics/get-stats-chart-data.ts:356

  • [nitpick] Consider extracting the default value '90d' into a well-named constant to improve clarity and maintainability across the similar functions.
getTotalQuestionCount(userUid, to, from === 'all' ? '90d' : from), // Default to 90d for count if 'all' is used

src/components/app/statistics/difficulty-radial-chart.tsx:70

  • [nitpick] Using the index as a key may lead to unexpected behavior if the order of items changes; consider using a stable unique identifier such as the difficulty value as the key.
<div key={index} className="flex items-center">

Signed-off-by: Logan Ford <110533855+Logannford@users.noreply.github.com>
@Logannford Logannford changed the title feat: init stats page refresh feat: init stats page refresh (WIP/ON HOLD) Apr 23, 2025
Signed-off-by: Logan Ford <110533855+Logannford@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App This feature is related to the app design Feature branch large this feature is a large feature statistics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[improvement]: stats page UI improvements
1 participant