Skip to content

Commit 92756aa

Browse files
committed
fix: Force sidebar to ALWAYS stay visible - disable broken collapse toggle
1 parent 4372d6e commit 92756aa

File tree

1 file changed

+17
-35
lines changed

1 file changed

+17
-35
lines changed

frontend/static/style.css

Lines changed: 17 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -384,49 +384,31 @@ header {
384384
}
385385
}
386386

387-
/* --- SIDEBAR TOGGLE BUTTON - ALWAYS VISIBLE --- */
387+
/* --- SIDEBAR ALWAYS VISIBLE (Streamlit Cloud fix) --- */
388388

389-
/* The expand button when sidebar is collapsed - make it VERY visible */
390-
[data-testid="stSidebarCollapsedControl"] {
391-
display: block !important;
389+
/* Force sidebar to ALWAYS be visible and NEVER collapse */
390+
[data-testid="stSidebar"] {
391+
transform: translateX(0) !important;
392392
visibility: visible !important;
393-
opacity: 1 !important;
394-
position: fixed !important;
395-
top: 14px !important;
396-
left: 14px !important;
397-
z-index: 999999 !important;
393+
display: block !important;
394+
min-width: 280px !important;
395+
width: 280px !important;
398396
}
399397

400-
[data-testid="stSidebarCollapsedControl"] button {
401-
display: flex !important;
398+
/* Force expanded state even when aria says collapsed */
399+
[data-testid="stSidebar"][aria-expanded="false"] {
400+
transform: translateX(0) !important;
402401
visibility: visible !important;
403-
opacity: 1 !important;
404-
background: linear-gradient(135deg, #3B82F6, #8B5CF6) !important;
405-
border: none !important;
406-
border-radius: 10px !important;
407-
padding: 12px 16px !important;
408-
color: white !important;
409-
font-size: 1.3rem !important;
410-
box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5) !important;
411-
cursor: pointer !important;
412-
transition: all 0.2s ease !important;
413-
}
414-
415-
[data-testid="stSidebarCollapsedControl"] button:hover {
416-
transform: scale(1.1) !important;
417-
box-shadow: 0 6px 25px rgba(59, 130, 246, 0.6) !important;
402+
min-width: 280px !important;
403+
margin-left: 0 !important;
418404
}
419405

420-
/* The collapse button inside sidebar - make it styled nicely */
406+
/* Hide the collapse button - since it's broken on Cloud */
421407
button[data-testid="stSidebarCollapseButton"] {
422-
background: rgba(59, 130, 246, 0.2) !important;
423-
border: 1px solid rgba(59, 130, 246, 0.3) !important;
424-
border-radius: 8px !important;
425-
color: #60A5FA !important;
426-
transition: all 0.2s ease !important;
408+
display: none !important;
427409
}
428410

429-
button[data-testid="stSidebarCollapseButton"]:hover {
430-
background: rgba(59, 130, 246, 0.3) !important;
431-
transform: scale(1.05);
411+
/* Hide the expand control - we don't need it since sidebar is always visible */
412+
[data-testid="stSidebarCollapsedControl"] {
413+
display: none !important;
432414
}

0 commit comments

Comments
 (0)