fix(web): keep chat row actions visible in reserved columns
This commit is contained in:
+29
-68
@@ -163,10 +163,11 @@
|
||||
text-transform: none;
|
||||
}
|
||||
.chat-row {
|
||||
--chat-row-control: 44px;
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
gap: 2px;
|
||||
grid-template-columns: minmax(0, 1fr) 22px var(--chat-row-control);
|
||||
gap: 8px;
|
||||
align-items: start;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -174,7 +175,7 @@
|
||||
and the Chat actions menu is a sibling of this button. */
|
||||
.chat-session-button {
|
||||
grid-column: 1;
|
||||
grid-row: 1 / span 3;
|
||||
grid-row: 1;
|
||||
display: grid;
|
||||
gap: 2px;
|
||||
width: 100%;
|
||||
@@ -198,9 +199,6 @@
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
/* The star is an absolute top-right overlay; reserve its corner so it never
|
||||
covers the Streaming/New/Idle word on a touch screen where it is always on. */
|
||||
padding-right: 26px;
|
||||
}
|
||||
.chat-row .row-title { min-width: 0; }
|
||||
.chat-row .row-meta { grid-column: 1; }
|
||||
@@ -209,41 +207,25 @@
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.chat-row-model { font-size: 11px; }
|
||||
/* Star (top-right) and the more menu (bottom-right) sit over the row's own
|
||||
corners on hover/focus, so they never become an extra row or reserve width. */
|
||||
.chat-row-model { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
/* Visible, dedicated trailing controls: no invisible hit targets, hover reveal,
|
||||
or overlays on the title, path, model or backend activity mark. */
|
||||
.chat-row-actions {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity 100ms ease-out;
|
||||
grid-column: 3;
|
||||
grid-row: 1;
|
||||
display: grid;
|
||||
gap: 2px;
|
||||
}
|
||||
.chat-row-actions > .chat-star,
|
||||
.chat-row-actions > .chat-menu-button,
|
||||
.chat-row-actions > .chat-menu-panel { pointer-events: auto; }
|
||||
.chat-row:hover .chat-row-actions,
|
||||
.chat-row:focus-within .chat-row-actions,
|
||||
.chat-row.menu-open .chat-row-actions { opacity: 1; }
|
||||
|
||||
/* An open menu paints above the rows below it, not under their content. */
|
||||
.chat-row.menu-open { z-index: 30; }
|
||||
@media (hover: none) {
|
||||
.chat-row-actions { opacity: 1; }
|
||||
.chat-row-actions > .chat-star,
|
||||
.chat-row-actions > .chat-menu-button,
|
||||
.chat-row-actions > .chat-menu-panel { pointer-events: auto; }
|
||||
}
|
||||
.chat-row-actions .chat-menu-item { padding: 3px 10px; font-size: 12px; }
|
||||
.chat-row-actions .chat-menu-item { min-height: 44px; padding: 8px 12px; font-size: 12px; }
|
||||
/* The local star: outline when unstarred, filled and accented when starred. */
|
||||
.chat-star {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 6px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
width: var(--chat-row-control);
|
||||
height: var(--chat-row-control);
|
||||
min-width: 44px;
|
||||
min-height: 44px;
|
||||
padding: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@@ -251,33 +233,29 @@
|
||||
border-radius: var(--radius-control);
|
||||
background: var(--color-surface);
|
||||
color: var(--muted);
|
||||
font-size: 13px;
|
||||
font-size: 18px;
|
||||
line-height: 1;
|
||||
}
|
||||
.chat-star:hover { color: var(--color-text); }
|
||||
.chat-star.starred { color: var(--color-accent); }
|
||||
.chat-row .chat-menu-button {
|
||||
position: absolute;
|
||||
right: 6px;
|
||||
bottom: 5px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
width: var(--chat-row-control);
|
||||
height: var(--chat-row-control);
|
||||
min-width: 44px;
|
||||
min-height: 44px;
|
||||
padding: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--color-surface);
|
||||
border-radius: var(--radius-control);
|
||||
font-size: 13px;
|
||||
font-size: 18px;
|
||||
line-height: 1;
|
||||
}
|
||||
/* The row menu opens below the bottom-right button; the open row stacks above
|
||||
its neighbours so the panel is not covered by the next row. */
|
||||
.chat-row .chat-menu-panel { top: calc(100% + 4px); bottom: auto; right: 8px; }
|
||||
/* Viewport-anchored on explicit click so the list scroller cannot clip items. */
|
||||
.chat-row .chat-menu-panel { position: fixed; top: auto; bottom: auto; right: auto; }
|
||||
.chat-menu-wrap { position: relative; }
|
||||
.chat-row-actions.chat-menu-wrap { position: absolute; inset: 0; }
|
||||
.chat-row-actions button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
|
||||
.chat-menu-button { min-width: 30px; font-size: 15px; line-height: 1; }
|
||||
.chat-menu-panel {
|
||||
position: absolute;
|
||||
@@ -1195,23 +1173,8 @@
|
||||
.chat-group-toggle { min-height: 40px; padding: 10px 42px; font-size: 12px; }
|
||||
.chat-group-directory .chat-group-title { font-size: 12px; }
|
||||
.chat-row { min-height: 96px; }
|
||||
.chat-row .row-head { padding-right: 50px; }
|
||||
.chat-backend-logo { width: 22px; height: 22px; }
|
||||
.chat-backend-logo svg { width: 20px; height: 20px; }
|
||||
.chat-star {
|
||||
top: 2px;
|
||||
right: 2px;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
font-size: 18px;
|
||||
}
|
||||
.chat-row .chat-menu-button {
|
||||
right: 2px;
|
||||
bottom: 2px;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
font-size: 18px;
|
||||
}
|
||||
.chat-row-actions .chat-menu-item { padding: 8px 12px; font-size: 14px; }
|
||||
.back-button .back-chevron { width: 24px; height: 24px; }
|
||||
.chat-bar-title { font-size: 18px; }
|
||||
@@ -1225,9 +1188,9 @@
|
||||
.chat-create-backend { padding: 6px 12px; border: 1px solid var(--border); color: var(--muted); }
|
||||
.chat-create-backend.selected { border-color: var(--accent); background: var(--tint-selected); color: var(--text); }
|
||||
.chat-backend-logo {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
right: 54px;
|
||||
grid-column: 2;
|
||||
grid-row: 1;
|
||||
margin-top: 12px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -1241,7 +1204,6 @@
|
||||
.chat-question-field[hidden] { display: none; }
|
||||
.chat-backend-logo[data-activity="streaming"] { color: var(--accent); }
|
||||
.chat-backend-logo[data-activity="new"] { color: var(--ok); }
|
||||
.chat-row .row-head { padding-right: 86px; }
|
||||
.chat-backend-chip {
|
||||
flex: 0 0 auto;
|
||||
padding: 1px 6px;
|
||||
@@ -1271,6 +1233,5 @@
|
||||
.chat-reasoning-toggle, .chat-tool-chip, .chat-group-toggle,
|
||||
.chat-send, .chat-stop, .chat-attach, .chat-model-button, .chat-model-option,
|
||||
.chat-new { min-height: 48px; }
|
||||
.chat-row .chat-star, .chat-row .chat-menu-button { width: 48px; height: 48px; }
|
||||
.chat-row .row-head { padding-right: 86px; }
|
||||
.chat-row { --chat-row-control: 48px; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user