From d5096dbba33d68d1b7781a2634f46f88cc04bfeb Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Mon, 21 Sep 2026 01:58:03 +0100 Subject: [PATCH] Refactor Dashboard Tabs and Enhance CSS Styles - Updated CSS for dashboard tabs to improve layout and overflow handling, ensuring better visibility and usability. - Replaced Typography's Text component with a custom ElipsisText component for improved text overflow management. - Simplified tab selection logic in NavigationTabsContext, enhancing scrolling behavior when selecting tabs. - Introduced a new utility function to scroll tabs into view, improving user experience during navigation. --- assets/stylesheets/App.css | 9 +- .../Dashboard/common/DashboardTabs.jsx | 40 +------- .../context/NavigationTabsContext.jsx | 94 +++++++++++++------ 3 files changed, 77 insertions(+), 66 deletions(-) diff --git a/assets/stylesheets/App.css b/assets/stylesheets/App.css index b09ca991..6ba57ceb 100644 --- a/assets/stylesheets/App.css +++ b/assets/stylesheets/App.css @@ -3640,6 +3640,7 @@ body.objectKanbanColumnResizing * { display: inline-flex; align-items: center; justify-content: center; + max-width: 240px; overflow: visible; margin: 5px 0 0 0; padding: 0 10px 0 10px; @@ -3843,8 +3844,14 @@ body.objectKanbanColumnResizing * { } .dashboard-tabs-label { - max-width: 280px; + max-width: 186px; min-width: 0; + overflow: hidden; +} + +.dashboard-tabs-label .elipsis-text-wrapper.ant-typography { + min-width: 0; + max-width: 100%; } .dashboard-tab-item-container[data-sticky-placeholder='true'] diff --git a/src/components/Dashboard/common/DashboardTabs.jsx b/src/components/Dashboard/common/DashboardTabs.jsx index 41deb686..f86aa9e7 100644 --- a/src/components/Dashboard/common/DashboardTabs.jsx +++ b/src/components/Dashboard/common/DashboardTabs.jsx @@ -7,8 +7,9 @@ import { useState, memo } from 'react' -import { Button, Flex, Popover, Typography } from 'antd' +import { Button, Flex, Popover } from 'antd' import DashboardTabPreview from './DashboardTabPreview' +import ElipsisText from './ElipsisText' import classNames from 'classnames' import ScrollBox from './ScrollBox' import PlusIcon from '../../Icons/PlusIcon' @@ -23,8 +24,6 @@ import { import { getDesktopWindowId } from '../../../electrobun-bridge.js' import { hasExternalTabDrag, writeTabDragData } from './tabDrag' -const { Text } = Typography - const DashboardTabChrome = () => ( <>