fix: ensure full width highlighting for list items in sessions and folders
This commit is contained in:
@@ -187,15 +187,15 @@ const FolderSelectionView: Component<FolderSelectionViewProps> = (props) => {
|
|||||||
<div class="panel-list">
|
<div class="panel-list">
|
||||||
<For each={folders()}>
|
<For each={folders()}>
|
||||||
{(folder, index) => (
|
{(folder, index) => (
|
||||||
<div class="panel-list-item">
|
<div
|
||||||
<div class="flex items-center">
|
class="panel-list-item w-full"
|
||||||
|
classList={{
|
||||||
|
"panel-list-item-highlight": focusMode() === "recent" && selectedIndex() === index(),
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div class="flex items-center w-full">
|
||||||
<button
|
<button
|
||||||
class="panel-list-item-content"
|
class="panel-list-item-content flex-1 w-full"
|
||||||
classList={{
|
|
||||||
"panel-list-item-highlight ring-2 ring-inset":
|
|
||||||
focusMode() === "recent" && selectedIndex() === index(),
|
|
||||||
}}
|
|
||||||
style={{ "--tw-ring-color": "var(--accent-primary)" }}
|
|
||||||
onClick={() => handleFolderSelect(folder.path)}
|
onClick={() => handleFolderSelect(folder.path)}
|
||||||
onMouseEnter={() => {
|
onMouseEnter={() => {
|
||||||
setFocusMode("recent")
|
setFocusMode("recent")
|
||||||
|
|||||||
@@ -179,14 +179,15 @@ const InstanceWelcomeView: Component<InstanceWelcomeViewProps> = (props) => {
|
|||||||
<div class="panel-list">
|
<div class="panel-list">
|
||||||
<For each={parentSessions()}>
|
<For each={parentSessions()}>
|
||||||
{(session, index) => (
|
{(session, index) => (
|
||||||
<div class="panel-list-item">
|
<div
|
||||||
|
class="panel-list-item w-full"
|
||||||
|
classList={{
|
||||||
|
"panel-list-item-highlight": focusMode() === "sessions" && selectedIndex() === index(),
|
||||||
|
}}
|
||||||
|
>
|
||||||
<button
|
<button
|
||||||
data-session-index={index()}
|
data-session-index={index()}
|
||||||
class="panel-list-item-content group"
|
class="panel-list-item-content group w-full"
|
||||||
classList={{
|
|
||||||
"panel-list-item-highlight ring-accent-inset":
|
|
||||||
focusMode() === "sessions" && selectedIndex() === index(),
|
|
||||||
}}
|
|
||||||
onClick={() => handleSessionSelect(session.id)}
|
onClick={() => handleSessionSelect(session.id)}
|
||||||
onMouseEnter={() => {
|
onMouseEnter={() => {
|
||||||
setFocusMode("sessions")
|
setFocusMode("sessions")
|
||||||
|
|||||||
@@ -85,10 +85,10 @@ const SessionPicker: Component<SessionPickerProps> = (props) => {
|
|||||||
{(session) => (
|
{(session) => (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="selector-option w-full text-left"
|
class="selector-option w-full text-left hover:bg-surface-hover focus:bg-surface-hover"
|
||||||
onClick={() => handleSessionSelect(session.id)}
|
onClick={() => handleSessionSelect(session.id)}
|
||||||
>
|
>
|
||||||
<div class="selector-option-content">
|
<div class="selector-option-content w-full">
|
||||||
<span class="selector-option-label truncate">
|
<span class="selector-option-label truncate">
|
||||||
{session.title || "Untitled"}
|
{session.title || "Untitled"}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -1029,7 +1029,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.selector-option {
|
.selector-option {
|
||||||
@apply px-3 py-2 cursor-pointer rounded outline-none transition-colors flex items-start gap-2;
|
@apply px-3 py-2 cursor-pointer rounded outline-none transition-colors flex items-start gap-2 w-full;
|
||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1373,7 +1373,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.panel-list-item {
|
.panel-list-item {
|
||||||
@apply border-b last:border-b-0 transition-colors;
|
@apply border-b last:border-b-0 transition-colors w-full;
|
||||||
border-color: var(--border-base);
|
border-color: var(--border-base);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1381,20 +1381,20 @@
|
|||||||
background-color: var(--surface-hover);
|
background-color: var(--surface-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-list-item-content {
|
|
||||||
@apply flex-1 text-left px-4 py-3 flex items-center justify-between gap-3 outline-none transition-colors;
|
|
||||||
}
|
|
||||||
|
|
||||||
.panel-list-item-content:hover {
|
|
||||||
background-color: var(--surface-hover);
|
|
||||||
}
|
|
||||||
|
|
||||||
.panel-list-item-highlight {
|
.panel-list-item-highlight {
|
||||||
background-color: rgba(0, 102, 255, 0.1);
|
background-color: rgba(0, 102, 255, 0.1) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-theme="dark"] .panel-list-item-highlight {
|
[data-theme="dark"] .panel-list-item-highlight {
|
||||||
background-color: rgba(0, 128, 255, 0.2);
|
background-color: rgba(0, 128, 255, 0.2) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-list-item-content {
|
||||||
|
@apply flex-1 text-left px-4 py-3 flex items-center justify-between gap-3 outline-none transition-colors w-full;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-list-item-content:hover {
|
||||||
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-empty-state {
|
.panel-empty-state {
|
||||||
|
|||||||
Reference in New Issue
Block a user