Skip to content

feat: Add mentor performance page for team leads #721

Open
dhinesh-kumar-m wants to merge 2 commits intoassigned-mentorsfrom
mentor-performances
Open

feat: Add mentor performance page for team leads #721
dhinesh-kumar-m wants to merge 2 commits intoassigned-mentorsfrom
mentor-performances

Conversation

@dhinesh-kumar-m
Copy link
Contributor

  • Introduced a new page for team leads to view mentor performance, including academic and review metrics.
  • Created separate components for academic and review performance tables, displaying relevant data such as attendance, average ratings, and total reviews.
  • Implemented a filter group for enhanced search functionality and navigation.
  • Updated the team lead menu to include a link to the new mentor performance page.
  • Enhanced the layout and design for improved user experience and consistency across the dashboard.

- Introduced a new page for team leads to view mentor performance, including academic and review metrics.
- Created separate components for academic and review performance tables, displaying relevant data such as attendance, average ratings, and total reviews.
- Implemented a filter group for enhanced search functionality and navigation.
- Updated the team lead menu to include a link to the new mentor performance page.
- Enhanced the layout and design for improved user experience and consistency across the dashboard.
- Updated the performance overview HTML to improve the layout and design, including a new header section for "Top Performers."
- Added a link to view full reports, enhancing navigation for team leads.
- Improved the structure of the navigation tab for better usability and visual clarity.
@gemini-code-assist
Copy link

Summary of Changes

Hello @dhinesh-kumar-m, 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 significantly enhances the team lead dashboard by introducing a comprehensive 'Mentor Performance' page. This new feature provides team leads with a centralized view of mentor effectiveness, broken down into academic and review-based metrics. The implementation includes new data structures, dedicated UI components for displaying and filtering this information, and updates to the navigation menu for easy access, ultimately empowering team leads with better insights into mentor contributions.

Highlights

  • New Mentor Performance Page: Introduced a dedicated page for team leads to monitor mentor performance, encompassing both academic and review metrics.
  • Detailed Performance Tables: Implemented separate, sortable tables for academic performance (batches handled, student attendance, average scores) and review performance (average ratings, total reviews, star counts).
  • Enhanced Navigation and Filtering: Added a filter group for improved search capabilities and updated the team lead menu with a new 'Reports' dropdown, including a direct link to the mentor performance page.
  • Data Expansion: Extended existing JSON data files (review_performance.json, top_accademic_performers.json) with additional mentor entries to populate the new performance tables.
  • Improved User Experience: Integrated new UI components for a consistent and user-friendly experience within the dashboard.

🧠 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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

@github-actions
Copy link

PR Preview Action v1.8.0

QR code for preview link

🚀 View preview at
https://testpress.github.io/design/pr-preview/pr-721/

Built to branch gh-pages at 2026-01-20 06:32 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

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 introduces a new mentor performance page for team leads, complete with academic and review metrics tables. The implementation is well-structured into separate components. However, I've identified a few high-severity issues related to accessibility and data correctness in the new table components. Specifically, there are duplicated HTML IDs which will cause issues, and a bug in displaying mentor ranks that will show incorrect data when tables are sorted. I've also noted some minor code quality improvements for duplicated CSS classes. Please address the high-severity issues to ensure the page functions correctly and is accessible.

Comment on lines +11 to +108
<th scope="col">
<!-- Sort Dropdown -->
<div class="hs-dropdown relative inline-flex w-full cursor-pointer">
<button id="hs-pro-eptai" type="button"
class="px-4 py-2.5 text-start w-full flex items-center gap-x-1 text-sm font-normal text-stone-500 focus:outline-hidden focus:bg-stone-100 dark:text-neutral-500 dark:focus:bg-neutral-700"
aria-haspopup="menu" aria-expanded="false" aria-label="Dropdown">
Rank
<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="m7 15 5 5 5-5" />
<path d="m7 9 5-5 5 5" />
</svg>
</button>

{% include 'src/simba/partials/dropdowns/table_sort.html' %}
</div>
<!-- End Sort Dropdown -->
</th>
<th scope="col" class="w-40">
<!-- Sort Dropdown -->
<div class="hs-dropdown relative inline-flex w-full cursor-pointer">
<button id="hs-pro-eptai" type="button"
class="px-4 py-2.5 text-start w-full flex items-center gap-x-1 text-sm font-normal text-stone-500 focus:outline-hidden focus:bg-stone-100 dark:text-neutral-500 dark:focus:bg-neutral-700"
aria-haspopup="menu" aria-expanded="false" aria-label="Dropdown">
Mentor
<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="m7 15 5 5 5-5" />
<path d="m7 9 5-5 5 5" />
</svg>
</button>

{% include 'src/simba/partials/dropdowns/table_sort.html' %}
</div>
<!-- End Sort Dropdown -->
</th>

<th scope="col" class="min-w-40">
<!-- Sort Dropdown -->
<div class="hs-dropdown relative inline-flex w-full cursor-pointer">
<button id="hs-pro-eptai" type="button"
class="px-4 py-2.5 text-start w-full flex items-center gap-x-1 text-sm font-normal text-stone-500 focus:outline-hidden focus:bg-stone-100 dark:text-neutral-500 dark:focus:bg-neutral-700"
aria-haspopup="menu" aria-expanded="false" aria-label="Dropdown">
Batches Handled
<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="m7 15 5 5 5-5" />
<path d="m7 9 5-5 5 5" />
</svg>
</button>

{% include 'src/simba/partials/dropdowns/table_sort.html' %}
</div>
<!-- End Sort Dropdown -->
</th>

<th scope="col" class="min-w-40">
<!-- Sort Dropdown -->
<div class="hs-dropdown relative inline-flex w-full cursor-pointer">
<button id="hs-pro-eptai" type="button"
class="px-4 py-2.5 text-start w-full flex items-center gap-x-1 text-sm font-normal text-stone-500 focus:outline-hidden focus:bg-stone-100 dark:text-neutral-500 dark:focus:bg-neutral-700"
aria-haspopup="menu" aria-expanded="false" aria-label="Dropdown">
Student Attendance %
<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="m7 15 5 5 5-5" />
<path d="m7 9 5-5 5 5" />
</svg>
</button>

{% include 'src/simba/partials/dropdowns/table_sort.html' %}
</div>
<!-- End Sort Dropdown -->
</th>

<th scope="col" class="min-w-40">
<!-- Sort Dropdown -->
<div class="hs-dropdown relative inline-flex w-full cursor-pointer">
<button id="hs-pro-eptai" type="button"
class="px-4 py-2.5 text-start w-full flex items-center gap-x-1 text-sm font-normal text-stone-500 focus:outline-hidden focus:bg-stone-100 dark:text-neutral-500 dark:focus:bg-neutral-700"
aria-haspopup="menu" aria-expanded="false" aria-label="Dropdown">
Average Student Score %
<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="m7 15 5 5 5-5" />
<path d="m7 9 5-5 5 5" />
</svg>
</button>

{% include 'src/simba/partials/dropdowns/table_sort.html' %}
</div>
<!-- End Sort Dropdown -->
</th>

Choose a reason for hiding this comment

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

high

The id="hs-pro-eptai" is used for all sortable column header buttons in this table. Element IDs must be unique within an HTML document. This duplication will cause issues with accessibility and JavaScript functionality.

Please assign a unique ID to each button. For example:

  • academic-sort-rank
  • academic-sort-mentor
  • academic-sort-batches

This will also allow you to correctly pass the column_id to the table_sort.html partial, which is currently not being done.

<circle cx="12" cy="8" r="6" />
</svg>
{% else %}
<span class="text-sm text-stone-800 dark:text-white ms-1">#{{loop.index}}</span>

Choose a reason for hiding this comment

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

high

The rank is being displayed using loop.index. This is incorrect because if the data is sorted by any other column, loop.index will not reflect the mentor's actual rank. You should use performer.rank to display the correct rank.

              <span class="text-sm text-stone-800 dark:text-white ms-1">#{{performer.rank}}</span>

Comment on lines +11 to +185
<th scope="col">
<!-- Sort Dropdown -->
<div class="hs-dropdown relative inline-flex w-full cursor-pointer">
<button id="hs-pro-eptai" type="button"
class="px-4 py-2.5 text-start w-full flex items-center gap-x-1 text-sm font-normal text-stone-500 focus:outline-hidden focus:bg-stone-100 dark:text-neutral-500 dark:focus:bg-neutral-700"
aria-haspopup="menu" aria-expanded="false" aria-label="Dropdown">
Rank
<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="m7 15 5 5 5-5" />
<path d="m7 9 5-5 5 5" />
</svg>
</button>

{% include 'src/simba/partials/dropdowns/table_sort.html' %}
</div>
<!-- End Sort Dropdown -->
</th>
<th scope="col" class="w-40">
<!-- Sort Dropdown -->
<div class="hs-dropdown relative inline-flex w-full cursor-pointer">
<button id="hs-pro-eptai" type="button"
class="px-4 py-2.5 text-start w-full flex items-center gap-x-1 text-sm font-normal text-stone-500 focus:outline-hidden focus:bg-stone-100 dark:text-neutral-500 dark:focus:bg-neutral-700"
aria-haspopup="menu" aria-expanded="false" aria-label="Dropdown">
Mentor
<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="m7 15 5 5 5-5" />
<path d="m7 9 5-5 5 5" />
</svg>
</button>

{% include 'src/simba/partials/dropdowns/table_sort.html' %}
</div>
<!-- End Sort Dropdown -->

</th>

<th scope="col" class="min-w-36">
<!-- Sort Dropdown -->
<div class="hs-dropdown relative inline-flex w-full cursor-pointer">
<button id="hs-pro-eptai" type="button"
class="px-4 py-2.5 text-start w-full flex items-center gap-x-1 text-sm font-normal text-stone-500 focus:outline-hidden focus:bg-stone-100 dark:text-neutral-500 dark:focus:bg-neutral-700"
aria-haspopup="menu" aria-expanded="false" aria-label="Dropdown">
Average Rating
<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="m7 15 5 5 5-5" />
<path d="m7 9 5-5 5 5" />
</svg>
</button>

{% include 'src/simba/partials/dropdowns/table_sort.html' %}
</div>
<!-- End Sort Dropdown -->
</th>

<th scope="col" class="min-w-36">
<!-- Sort Dropdown -->
<div class="hs-dropdown relative inline-flex w-full cursor-pointer">
<button id="hs-pro-eptai" type="button"
class="px-4 py-2.5 text-start w-full flex items-center gap-x-1 text-sm font-normal text-stone-500 focus:outline-hidden focus:bg-stone-100 dark:text-neutral-500 dark:focus:bg-neutral-700"
aria-haspopup="menu" aria-expanded="false" aria-label="Dropdown">
Total Reviews
<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="m7 15 5 5 5-5" />
<path d="m7 9 5-5 5 5" />
</svg>
</button>

{% include 'src/simba/partials/dropdowns/table_sort.html' %}
</div>
<!-- End Sort Dropdown -->
</th>

<th scope="col">
<!-- Sort Dropdown -->
<div class="hs-dropdown relative inline-flex w-full cursor-pointer">
<button id="hs-pro-eptai" type="button"
class="px-4 py-2.5 text-start w-full flex items-center gap-x-1 text-sm font-normal text-stone-500 focus:outline-hidden focus:bg-stone-100 dark:text-neutral-500 dark:focus:bg-neutral-700"
aria-haspopup="menu" aria-expanded="false" aria-label="Dropdown">
5 Stars
<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="m7 15 5 5 5-5" />
<path d="m7 9 5-5 5 5" />
</svg>
</button>

{% include 'src/simba/partials/dropdowns/table_sort.html' %}
</div>
<!-- End Sort Dropdown -->
</th>
<th scope="col">
<!-- Sort Dropdown -->
<div class="hs-dropdown relative inline-flex w-full cursor-pointer">
<button id="hs-pro-eptai" type="button"
class="px-4 py-2.5 text-start w-full flex items-center gap-x-1 text-sm font-normal text-stone-500 focus:outline-hidden focus:bg-stone-100 dark:text-neutral-500 dark:focus:bg-neutral-700"
aria-haspopup="menu" aria-expanded="false" aria-label="Dropdown">
4 Stars
<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="m7 15 5 5 5-5" />
<path d="m7 9 5-5 5 5" />
</svg>
</button>

{% include 'src/simba/partials/dropdowns/table_sort.html' %}
</div>
<!-- End Sort Dropdown -->
</th>
<th scope="col">
<!-- Sort Dropdown -->
<div class="hs-dropdown relative inline-flex w-full cursor-pointer">
<button id="hs-pro-eptai" type="button"
class="px-4 py-2.5 text-start w-full flex items-center gap-x-1 text-sm font-normal text-stone-500 focus:outline-hidden focus:bg-stone-100 dark:text-neutral-500 dark:focus:bg-neutral-700"
aria-haspopup="menu" aria-expanded="false" aria-label="Dropdown">
3 Stars
<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="m7 15 5 5 5-5" />
<path d="m7 9 5-5 5 5" />
</svg>
</button>

{% include 'src/simba/partials/dropdowns/table_sort.html' %}
</div>
<!-- End Sort Dropdown -->
</th>
<th scope="col">
<!-- Sort Dropdown -->
<div class="hs-dropdown relative inline-flex w-full cursor-pointer">
<button id="hs-pro-eptai" type="button"
class="px-4 py-2.5 text-start w-full flex items-center gap-x-1 text-sm font-normal text-stone-500 focus:outline-hidden focus:bg-stone-100 dark:text-neutral-500 dark:focus:bg-neutral-700"
aria-haspopup="menu" aria-expanded="false" aria-label="Dropdown">
2 Stars
<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="m7 15 5 5 5-5" />
<path d="m7 9 5-5 5 5" />
</svg>
</button>

{% include 'src/simba/partials/dropdowns/table_sort.html' %}
</div>
<!-- End Sort Dropdown -->
</th>
<th scope="col">
<!-- Sort Dropdown -->
<div class="hs-dropdown relative inline-flex w-full cursor-pointer">
<button id="hs-pro-eptai" type="button"
class="px-4 py-2.5 text-start w-full flex items-center gap-x-1 text-sm font-normal text-stone-500 focus:outline-hidden focus:bg-stone-100 dark:text-neutral-500 dark:focus:bg-neutral-700"
aria-haspopup="menu" aria-expanded="false" aria-label="Dropdown">
1 Star
<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="m7 15 5 5 5-5" />
<path d="m7 9 5-5 5 5" />
</svg>
</button>

{% include 'src/simba/partials/dropdowns/table_sort.html' %}
</div>
<!-- End Sort Dropdown -->
</th>

Choose a reason for hiding this comment

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

high

The id="hs-pro-eptai" is used for all sortable column header buttons in this table. Element IDs must be unique within an HTML document. This duplication will cause issues with accessibility and JavaScript functionality.

Please assign a unique ID to each button. For example:

  • review-sort-rank
  • review-sort-mentor
  • review-sort-rating

This will also allow you to correctly pass the column_id to the table_sort.html partial, which is currently not being done.

<circle cx="12" cy="8" r="6" />
</svg>
{% else %}
<span class="text-sm text-stone-800 dark:text-white ms-1">#{{loop.index}}</span>

Choose a reason for hiding this comment

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

high

The rank is being displayed using loop.index. This is incorrect because if the data is sorted by any other column, loop.index will not reflect the mentor's actual rank. You should use performer.rank to display the correct rank.

              <span class="text-sm text-stone-800 dark:text-white ms-1">#{{performer.rank}}</span>

<tbody class="divide-y divide-stone-200 dark:divide-neutral-700">
{% for performer in review_performance %}
<tr>
<td class="size-px whitespace-nowrap px-4 py-1 px-4 py-4 text-start">

Choose a reason for hiding this comment

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

medium

The px-4 class is duplicated in this td element. You can remove one of them to clean up the code.

            <td class="size-px whitespace-nowrap py-4 text-start px-4">

<span class="text-sm text-stone-800 dark:text-white ms-1">#{{loop.index}}</span>
{% endif %}
</td>
<td class="size-px whitespace-nowrap px-4 py-1 px-4 py-1">

Choose a reason for hiding this comment

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

medium

The px-4 py-1 classes are duplicated in this td element. You can remove the duplicate to clean up the code.

            <td class="size-px whitespace-nowrap px-4 py-1">

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