Skip to content

Commit ba9e6a7

Browse files
committed
Improve top bar view selector UI and messaging
- Make all view labels single-word (Graph, Dashboard, Table, Card, Kanban, Gantt, Calendar, Activity) - Increase icon sizes with responsive scaling (h-6 to h-10 based on screen size) - Add thinner stroke width (1.5) to icons for cleaner appearance when zoomed - Implement responsive spacing and layout (gap-1 to gap-4, min-w-0 for overflow handling) - Change 'Select a Graph' to 'Create a Graph' when no graphs are available - Maintain horizontal scroll prevention with proper overflow handling Resolves UI space waste and improves visual hierarchy in the view selection area.
1 parent 65057ab commit ba9e6a7

1 file changed

Lines changed: 18 additions & 24 deletions

File tree

packages/web/src/pages/Workspace.tsx

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export function Workspace() {
6060
{/* Graph Information */}
6161
<div className="flex-shrink-0">
6262
<h1 className="text-2xl sm:text-3xl font-bold bg-gradient-to-r from-emerald-400 via-green-300 to-blue-400 bg-clip-text text-transparent">
63-
{currentGraph?.name || 'Select a Graph'}
63+
{currentGraph?.name || (availableGraphs.length > 0 ? 'Select a Graph' : 'Create a Graph')}
6464
</h1>
6565
<div className="flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-gray-400 mt-1">
6666
{currentTeam && (
@@ -100,7 +100,7 @@ export function Workspace() {
100100

101101
{/* All Views Selector - Responsive */}
102102
<div className="flex items-center flex-1 ml-8">
103-
<div className="flex bg-gray-700/50 backdrop-blur-sm rounded-lg p-2 gap-4 overflow-x-auto w-full justify-between">
103+
<div className="flex bg-gray-700/50 backdrop-blur-sm rounded-lg p-2 gap-1 sm:gap-2 lg:gap-4 overflow-x-auto w-full min-w-0">
104104
<button
105105
onClick={() => setViewMode('graph')}
106106
className={`px-3 py-2 text-sm rounded transition-colors whitespace-nowrap flex flex-col items-center space-y-2 ${
@@ -110,9 +110,9 @@ export function Workspace() {
110110
}`}
111111
title="Graph View"
112112
>
113-
<Network className="h-5 w-5" />
113+
<Network className="h-6 w-6 sm:h-8 sm:w-8 lg:h-10 lg:w-10" strokeWidth={1.5} />
114114
<div className="text-xs text-center font-medium">
115-
<div>Graph</div>
115+
Graph
116116
</div>
117117
</button>
118118
<button
@@ -124,9 +124,9 @@ export function Workspace() {
124124
}`}
125125
title="Dashboard View"
126126
>
127-
<LayoutDashboard className="h-5 w-5" />
127+
<LayoutDashboard className="h-6 w-6 sm:h-8 sm:w-8 lg:h-10 lg:w-10" strokeWidth={1.5} />
128128
<div className="text-xs text-center font-medium">
129-
<div>Dashboard</div>
129+
Dashboard
130130
</div>
131131
</button>
132132
<button
@@ -138,10 +138,9 @@ export function Workspace() {
138138
}`}
139139
title="Table View"
140140
>
141-
<Table className="h-5 w-5" />
141+
<Table className="h-6 w-6 sm:h-8 sm:w-8 lg:h-10 lg:w-10" strokeWidth={1.5} />
142142
<div className="text-xs text-center font-medium">
143-
<div>Table</div>
144-
<div>View</div>
143+
Table
145144
</div>
146145
</button>
147146
<button
@@ -153,10 +152,9 @@ export function Workspace() {
153152
}`}
154153
title="Card View"
155154
>
156-
<CreditCard className="h-5 w-5" />
155+
<CreditCard className="h-6 w-6 sm:h-8 sm:w-8 lg:h-10 lg:w-10" strokeWidth={1.5} />
157156
<div className="text-xs text-center font-medium">
158-
<div>Card</div>
159-
<div>View</div>
157+
Card
160158
</div>
161159
</button>
162160
<button
@@ -168,10 +166,9 @@ export function Workspace() {
168166
}`}
169167
title="Kanban View"
170168
>
171-
<Columns className="h-5 w-5" />
169+
<Columns className="h-6 w-6 sm:h-8 sm:w-8 lg:h-10 lg:w-10" strokeWidth={1.5} />
172170
<div className="text-xs text-center font-medium">
173-
<div>Kanban</div>
174-
<div>View</div>
171+
Kanban
175172
</div>
176173
</button>
177174
<button
@@ -183,10 +180,9 @@ export function Workspace() {
183180
}`}
184181
title="Gantt Chart"
185182
>
186-
<GanttChartSquare className="h-5 w-5" />
183+
<GanttChartSquare className="h-6 w-6 sm:h-8 sm:w-8 lg:h-10 lg:w-10" strokeWidth={1.5} />
187184
<div className="text-xs text-center font-medium">
188-
<div>Gantt</div>
189-
<div>Chart</div>
185+
Gantt
190186
</div>
191187
</button>
192188
<button
@@ -198,10 +194,9 @@ export function Workspace() {
198194
}`}
199195
title="Calendar View"
200196
>
201-
<CalendarDays className="h-5 w-5" />
197+
<CalendarDays className="h-6 w-6 sm:h-8 sm:w-8 lg:h-10 lg:w-10" strokeWidth={1.5} />
202198
<div className="text-xs text-center font-medium">
203-
<div>Calendar</div>
204-
<div>View</div>
199+
Calendar
205200
</div>
206201
</button>
207202
<button
@@ -213,10 +208,9 @@ export function Workspace() {
213208
}`}
214209
title="Activity Feed"
215210
>
216-
<Activity className="h-5 w-5" />
211+
<Activity className="h-6 w-6 sm:h-8 sm:w-8 lg:h-10 lg:w-10" strokeWidth={1.5} />
217212
<div className="text-xs text-center font-medium">
218-
<div>Activity</div>
219-
<div>Feed</div>
213+
Activity
220214
</div>
221215
</button>
222216
</div>

0 commit comments

Comments
 (0)