Skip to content

Fix layout overflow, card containment, and hook ordering issues#339

Merged
awindsr merged 5 commits into
gtech-mulearn:devfrom
erzer12:dev
Jul 25, 2026
Merged

Fix layout overflow, card containment, and hook ordering issues#339
awindsr merged 5 commits into
gtech-mulearn:devfrom
erzer12:dev

Conversation

@erzer12

@erzer12 erzer12 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces several improvements to the intern leaderboard and public profile pages, focusing on enhanced UI/UX, code maintainability, and feature completeness. The main changes include a complete redesign of the leaderboard podium section with new medal visuals, improved linking and navigation, and the integration of the Achievements feature into the public profile page. Additionally, there are multiple layout and overflow handling improvements across event and profile components to ensure better responsiveness and prevent horizontal scrolling issues.

Leaderboard Podium Redesign and Feature Enhancements:

  • Added a new Medal component with SVG gradients for the top 3 ranks, and updated the podium UI to use this component for a more visually appealing leaderboard. Podium cards are now clickable and link to user profiles if available. (src/app/(dashboard)/dashboard/intern/leaderboard/intern-leaderboard-client.tsx) [1] [2]
  • Refactored the podium and leaderboard data handling for better performance and maintainability, including use of useMemo for identity objects and improved data mapping for user cards. (src/app/(dashboard)/dashboard/intern/leaderboard/intern-leaderboard-client.tsx) [1] [2] [3]

Profile Page Feature Integration and Layout Improvements:

Event Page Responsiveness and Readability:

  • Enhanced event detail and about section layouts by adding overflow-x-hidden, break-words, and related classes to prevent horizontal scrolling and improve text wrapping, especially for long event descriptions. (src/features/events/components/event-detail-view.tsx, src/features/events/components/event-about-section.tsx) [1] [2] [3]

These changes collectively improve the user experience, maintainability, and visual appeal of the application.

erzer12 and others added 2 commits July 24, 2026 01:16
- Fix React Rules of Hooks error in intern leaderboard client by calling hooks at top-level
- Fix horizontal layout overflow on event detail page with grid min-w-0 containment
- Enclose event detail cards inside parent background container
- Fix layout alignment on public profile page
@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

@erzer12 is attempting to deploy a commit to the awindsr's projects Team on Vercel.

A member of the Team first needs to authorize it.

@netlify

netlify Bot commented Jul 23, 2026

Copy link
Copy Markdown

👷 Deploy request for staging-mulearn pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit c2f9251

@erzer12

erzer12 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

@alvin-dennis eda njn intern leaderboard il changed top 3 to be like that in the normal leaderboard
however leaderboard list api il profilepic illa , appo ippo userprofile il ninnu top3 il image irikune ippo
api il backend add akiyale ath correct cheyan pattu

@erzer12
erzer12 requested review from alvin-dennis and awindsr July 23, 2026 19:58
@greptile-apps

greptile-apps Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR addresses layout overflow/horizontal-scroll regressions across the event detail, public profile, and own-profile pages, and ships a complete podium redesign for the intern leaderboard with a new inline Medal SVG component, clickable profile links, and a corrected getPodiumUser that now returns null for empty slots instead of a placeholder object. It also wires up the Achievements component on the public profile page and fixes the mobile DOM order (tabs before sidebar) on both profile views.

  • Leaderboard redesign: getPodiumUser returns null when the slot is unfilled (closing the previously flagged always-truthy guard bug); leaderboardIdentity is memoised; podium cards conditionally render as <Link> when a profile URL is available.
  • Profile DOM order fix: Both profile-client.tsx and publicprofile-client.tsx now place the main content column before the sidebar in DOM order (removing the lg:order-* overrides), so mobile renders tabs → sidebar as expected.
  • Event and about-section overflow: overflow-x-hidden, min-w-0, and break-words classes added to contain long descriptions; the non-full layout path now returns innerContent directly (no spurious wrapper div).

Confidence Score: 5/5

Safe to merge — changes are confined to UI layout, the podium component, and the Achievements tab wiring, with no mutations or auth logic touched.

The three previously-flagged issues (always-truthy podium guards, spurious empty div for non-full event layout, sidebar appearing above tabs on mobile) are all correctly resolved. The Achievements component is used with the right props from the existing barrel. The only remaining nit is the non-standard scale-120 Tailwind class on a purely decorative blur element, which has no functional impact.

No files require special attention; the leaderboard client has the scale-120 cosmetic issue but it only affects a background glow blur.

Important Files Changed

Filename Overview
src/app/(dashboard)/dashboard/intern/leaderboard/intern-leaderboard-client.tsx Major podium redesign: new Medal SVG component, getPodiumUser now correctly returns null for empty slots, and useMemo added for leaderboardIdentity. One non-standard Tailwind class (scale-120) in the rank-1 glow blur element.
src/app/(dashboard)/dashboard/profile/profile-client.tsx DOM order fix: sidebar div moved from first-in-DOM (visually second via lg:order-2) to last-in-DOM; on mobile tabs now correctly appear above sidebar. Clean change.
src/app/(dashboard)/profile/[muid]/publicprofile-client.tsx Achievements component wired up with correct props (muid, userName, isOwnProfile), replacing the placeholder. Layout/overflow wrappers added; sidebar is already last in DOM so mobile order is correct.
src/features/events/components/event-detail-view.tsx Fragment replaced with a conditional-return pattern; non-full layouts now return innerContent directly (no extra div), fixing the previous empty-div regression. Overflow and min-width fixes added.
src/features/events/components/event-about-section.tsx Minor: adds break-words class to prevent long descriptions from causing horizontal overflow. Clean one-line change.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph LeaderboardClient["LeaderboardPageClient"]
        H[Hooks: useState, useMemo, useLeaderboard x2] --> P["getPodiumUser(0/1/2) → null | user"]
        P --> LG{"isPodiumLoading or isBoardLoading?"}
        LG -- Yes --> SP[Spinner]
        LG -- No --> RC["renderPodiumCard(top1/2/3, rank)"]
        RC --> LN{"user.link?"}
        LN -- Yes --> LK["Link href={user.link}"]
        LN -- No --> DV["div wrapper"]
        RC --> TABLE["listRows → Table + Pagination"]
    end
    subgraph PublicProfile["PublicProfilePageClient"]
        PP[usePublicProfile, usePublicUserLog] --> TAB{activeTab}
        TAB -- achievements --> ACH["Achievements muid, userName, isOwnProfile"]
        TAB -- badges --> BDG["Badges"]
        TAB -- others --> OTH["BasicDetails / KarmaHistory / MuVoyage"]
    end
    subgraph EventDetail["EventDetailView"]
        EV["innerContent (always built)"] --> FL{"layout === full?"}
        FL -- Yes --> WRP["div overflow-x-hidden wrapper"]
        FL -- No --> BARE["return innerContent directly"]
    end
Loading

Reviews (4): Last reviewed commit: "fix(intern-leaderboard): add accessibili..." | Re-trigger Greptile

Comment thread src/app/(dashboard)/profile/[muid]/publicprofile-client.tsx
Comment thread src/features/events/components/event-detail-view.tsx Outdated
… view wrapper and lint changes

- Fix mobile layout regression on profile pages by placing main content before sidebar in DOM order
- Avoid rendering extra div wrapper in event-detail-view when layout is not full
erzer12 added 2 commits July 24, 2026 01:53
…SVGs and lint fix

- Mark decorative background topo SVGs with aria-hidden="true" to remove them from screen reader tree
@alvin-dennis alvin-dennis moved this from Backlog to In progress in µlearn 5.0 Jul 24, 2026
@awindsr

awindsr commented Jul 24, 2026

Copy link
Copy Markdown
Member

Screenshots please

@erzer12

erzer12 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

hidden achievements

image to
image

intern leaderboard refactor

image to
image

manage-event detail

image to
image

event detail

image to
image

@awindsr
awindsr merged commit 8b94f55 into gtech-mulearn:dev Jul 25, 2026
4 of 7 checks passed
@github-project-automation github-project-automation Bot moved this from Triage to QA in µLearn Delivery Jul 25, 2026
@github-project-automation github-project-automation Bot moved this from In progress to Integration Testing in µlearn 5.0 Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: QA
Status: Integration Testing

Development

Successfully merging this pull request may close these issues.

3 participants