📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
fix: out of bounds sidebar when a header banner is visible
Blue Mousee7699edcb213
diff --git a/web/app/components/Header/index.tsx b/web/app/components/Header/index.tsxindex b57e9b4ae..29391f1a0 100644--- a/web/app/components/Header/index.tsx+++ b/web/app/components/Header/index.tsx@@ -414,7 +414,7 @@ const TrialBanner = ({ status, rawStatus }: TrialBannerProps) => {const { t } = useTranslation('common')return (- <div className='w-full bg-slate-900 text-gray-100 dark:bg-slate-800/70'>+ <div className='header-banner w-full bg-slate-900 text-gray-100 dark:bg-slate-800/70'><div className='mx-auto max-w-7xl px-4 py-2 text-center text-sm sm:px-6 lg:px-8'><span className='font-medium'>{status}</span><span className='mx-1.5'>—</span>@@ -455,7 +455,7 @@ const DashboardLockedBanner = () => {return (<>- <div className='w-full bg-amber-500 text-gray-50'>+ <div className='header-banner w-full bg-amber-500 text-gray-50'><div className='mx-auto max-w-7xl space-x-2 px-4 py-2 text-center text-sm sm:px-6 lg:px-8'><span>{t('dashboard.accountLocked')}</span><buttondiff --git a/web/app/pages/Project/View/components/ProjectSidebar.tsx b/web/app/pages/Project/View/components/ProjectSidebar.tsxindex 8dc74214b..325337c66 100644--- a/web/app/pages/Project/View/components/ProjectSidebar.tsx+++ b/web/app/pages/Project/View/components/ProjectSidebar.tsx@@ -467,8 +467,8 @@ const ProjectSidebar: React.FC<ProjectSidebarProps> = ({: cn('transition-[width,height] duration-300 ease-in-out',isScrolled- ? 'h-[calc(100vh-1.5rem)]'- : 'h-[calc(100vh-60px-1rem)]',+ ? 'h-[calc(100vh-var(--banner-height)-1.5rem)]'+ : 'h-[calc(100vh-var(--header-total-height)-1rem)]',isCollapsed ? 'w-14' : 'w-56',),className,diff --git a/web/app/styles/tailwind.css b/web/app/styles/tailwind.cssindex d3f501de8..64196975c 100644--- a/web/app/styles/tailwind.css+++ b/web/app/styles/tailwind.css@@ -21,10 +21,12 @@/* Heights */--header-height: 60px;- --height-including-header: calc(100vh - var(--header-height));+ --banner-height: 0px;+ --header-total-height: calc(var(--header-height) + var(--banner-height));+ --height-including-header: calc(100vh - var(--header-total-height));--min-height-page: calc(100vh - 74px);--min-height-min-footer: calc(100vh - 157px);- --min-height-including-header: calc(100vh - var(--header-height));+ --min-height-including-header: calc(100vh - var(--header-total-height));--default-transition-duration: 200ms;}@@ -259,6 +261,10 @@::file-selector-button {border-color: var(--color-gray-200, currentColor);}++ :root:has(.header-banner) {+ --banner-height: 40px;+ }}@layer base {