Skip to content

feat: Show total contents on course cards#43

Open
Gowreesh-A-M wants to merge 2 commits intofeat/integrate-course-listfrom
feat/course-card-total-contents
Open

feat: Show total contents on course cards#43
Gowreesh-A-M wants to merge 2 commits intofeat/integrate-course-listfrom
feat/course-card-total-contents

Conversation

@Gowreesh-A-M
Copy link
Collaborator

  • Show content counts instead of duration on the Study tab.
  • Fix API mapping for contents_count and add a DB migration.
  • Link Explore stubs to mock data for a complete dashboard view.

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the user experience by replacing approximate course durations with a precise count of learning contents on course cards. This change involves comprehensive updates across the data layer, including API mapping, database schema migration, and UI adjustments, to ensure accuracy and provide users with more meaningful information about course volume. Additionally, it enhances the development environment by integrating mock data for various explore features.

Highlights

  • UI Update: Course cards on the Study tab now display the total number of contents (lessons, tests, assessments) instead of the total duration, providing a more granular view of course volume.
  • Data Model & API Mapping: The CourseDto and RemoteCourseDto have been updated to include a totalContents field, which is mapped from the total_contents API field. The totalDuration field has been deprecated.
  • Database Migration: A non-destructive database migration (schema version 7 to 8) was implemented to add a totalContents column to the CoursesTable in the local Drift database. Existing rows are backfilled with total_lessons as a fallback.
  • Localization & Mock Data: Localization files (app_en.arb, app_ar.arb, app_ml.arb) were updated to include a plural label for 'contents'. Mock data sources were also updated to provide realistic totalContents values.
  • Explore Stubs Integration: API calls for Explore banners, study tips, short lessons, and discovery courses now link to mock data, enabling a complete dashboard view for development.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully migrates the course cards from displaying duration to showing the total number of contents. The changes span across the data model, database schema with a proper migration, API data mapping, and UI components. The use of mock data for the Explore stubs is also a good step for development.

I've provided a few suggestions to improve code robustness and maintainability:

  • Decoupling HttpDataSource from MockDataSource.
  • Making the JSON parsing in RemoteCourseDto safer against potential type mismatches from the API.
  • Implementing proper pluralization for UI strings to enhance the user experience.

Overall, this is a solid feature implementation.

@Gowreesh-A-M Gowreesh-A-M force-pushed the feat/integrate-course-list branch from e4558a7 to 0ef834d Compare March 23, 2026 14:03
- Fix API mapping to use 'contents_count' with robust num parsing.
- Migrate Study cards from duration to localized content counts.
- Implement proper pluralization support for chapters and contents.
- Restore original behavior for Profile and Explore tabs.
@Gowreesh-A-M Gowreesh-A-M force-pushed the feat/course-card-total-contents branch from 5337de6 to 42b76a6 Compare March 23, 2026 15:23
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