Skip to content

Commit bb6bbf6

Browse files
committed
feat(ui): sidebar rows use full width; actions overlay with a hover fade
Session-row titles run to the sidebar edge instead of reserving the hover action cluster's width in-flow. The trailing aside overlays the row (pointer-events off at rest so link clicks pass through) and the link content fades out beneath the surfaced controls via a mask, which stays correct over rest/hover/active/selected backgrounds. Rows with a child toggle keep it rightmost; actions land at the link edge either way. Child rows keep the in-flow aside since their runtime trail is resting content. Touch keeps actions visible, so the fade is permanent there.
1 parent ff3ed99 commit bb6bbf6

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

‎ui/src/styles/layout.css‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1939,6 +1939,43 @@ html.openclaw-native-macos
19391939
padding-right: 2px;
19401940
}
19411941

1942+
/* Resting rows give the title the full sidebar width: the trailing aside
1943+
overlays the row instead of reserving button width in-flow. It must not
1944+
intercept clicks on the link tail beneath it — the buttons re-enable
1945+
their own pointer-events on hover/focus. Child rows keep the in-flow
1946+
aside because their runtime trail is resting content, not a hover swap. */
1947+
.sidebar-recent-session:not(.sidebar-recent-session--child) > .sidebar-recent-session__aside {
1948+
position: absolute;
1949+
top: 50%;
1950+
right: 2px;
1951+
transform: translateY(-50%);
1952+
pointer-events: none;
1953+
}
1954+
1955+
/* Rows with a child toggle keep it as the rightmost in-flow control; the
1956+
overlaid actions land just left of it, at the link's right edge — the
1957+
same link-relative geometry as toggle-less rows, so one mask fits both. */
1958+
.sidebar-recent-session:not(.sidebar-recent-session--child):has(> .sidebar-child-session-toggle)
1959+
> .sidebar-recent-session__aside {
1960+
right: 35px;
1961+
}
1962+
1963+
/* While the actions are surfaced, the link content fades out beneath them.
1964+
A mask (not a background scrim) keeps the fade correct over rest, hover,
1965+
active, and selected row backgrounds alike. */
1966+
.sidebar-recent-session:not(.sidebar-recent-session--child):hover > .sidebar-recent-session__link,
1967+
.sidebar-recent-session:not(.sidebar-recent-session--child):focus-within
1968+
> .sidebar-recent-session__link {
1969+
mask-image: linear-gradient(to right, black calc(100% - 80px), transparent calc(100% - 52px));
1970+
}
1971+
1972+
/* Touch keeps the actions permanently visible, so the fade is permanent too. */
1973+
@media (hover: none), (pointer: coarse) {
1974+
.sidebar-recent-session:not(.sidebar-recent-session--child) > .sidebar-recent-session__link {
1975+
mask-image: linear-gradient(to right, black calc(100% - 80px), transparent calc(100% - 52px));
1976+
}
1977+
}
1978+
19421979
.nav-collapse-toggle {
19431980
width: 36px;
19441981
height: 36px;

0 commit comments

Comments
 (0)