From a4c556776820aa83e110b7e202e4665e8a692cc0 Mon Sep 17 00:00:00 2001 From: Cody Seibert Date: Fri, 12 Dec 2025 15:53:11 -0500 Subject: [PATCH] feat: enhance CoursePromoBadge component with sidebar state management - Updated CoursePromoBadge to accept a sidebarOpen prop, allowing it to render differently based on the sidebar's state. - Implemented tooltip functionality for the collapsed state, improving user interaction and accessibility. - Adjusted styles and structure to support both expanded and collapsed views of the badge. --- apps/app/src/components/layout/sidebar.tsx | 2 +- .../src/components/ui/course-promo-badge.tsx | 53 ++++++++++++++++++- 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/apps/app/src/components/layout/sidebar.tsx b/apps/app/src/components/layout/sidebar.tsx index f573be26..ff28f4e8 100644 --- a/apps/app/src/components/layout/sidebar.tsx +++ b/apps/app/src/components/layout/sidebar.tsx @@ -1136,7 +1136,7 @@ export function Sidebar() { {/* Bottom Section - Running Agents / Bug Report / Settings */}
{/* Course Promo Badge */} - + {/* Running Agents Link */}
+ ); + } + + // Expanded state - show full badge return (
@@ -28,7 +77,7 @@ export function CoursePromoBadge() { e.stopPropagation(); setDismissed(true); }} - className="p-1 rounded-full hover:bg-primary/30 transition-colors cursor-pointer" + className="hidden lg:block p-1 rounded-full hover:bg-primary/30 transition-colors cursor-pointer" aria-label="Dismiss" >