mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #339] [CLOSED] fix(ui): prevent chat folder glitch during expand/collapse transition and reorder #4566
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#4566
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/339
Author: @ghost
Created: 5/1/2026
Status: ❌ Closed
Base:
main← Head:chat_folder_transition📝 Commits (8)
4f517fffix(ui): prevent chat folder glitch during expand/collapse transitione63e4bffix(chat-sidebar): prevent text selection on folder name during dragfe2d9dafix(chat-sidebar): refine folder header click areas for expand/collapse626a50efix(caht-sidebar): Restore keyboard access for folder expand/collapsee10214cfix(chat-sidebar): folder action buttons visible on keyboard focus.602b0bffix(chat-sidebar): reveal folder action buttons on keyboard focus10c1799fix(chat-sidebar): add aria-expanded to folder name and count for screen readersf3dff3efix(chat-sidebar): wrap entire folder in Reorder.Item so header and contents drag together📊 Changes
1 file changed (+65 additions, -24 deletions)
View changed files
📝
packages/client/src/components/layout/ChatSidebar.tsx(+65 -24)📄 Description
Why this change
Fix three distinct issues with chat sidebar folders: (1) a visual glitch during expand/collapse, (2) unintended text selection during drag-to-reorder, and (3) blank spaces triggering unwanted folder expand/collapse.
What changed
Glitch Issue
FolderRowto separate concerns between drag-to-reorder and expand/collapse:Reorder.Itemnow wraps only the folder header row (the draggable part)Reorder.Itemas a plain conditional renderAnimatePresence+motion.div:y: -8 → 0,opacity: 0 → 1,height: 0 → auto0.25swith easing[0.16, 1, 0.3, 1](matching project'smessage-inanimation)overflow-hiddenon the container to clip content during height animationmode="wait"onAnimatePresenceto prevent exit animation interruption on rapid togglingDrag/Reorder Issue
select-noneutility class to the grip handle div to prevent text selection when initiating a dragChat Folder Click Area Issue
onPointerDownto start drag,onClickwithstopPropagationto prevent togglerole="button",tabIndex={0}, andonKeyDownhandler for Enter/Spacefocus-withinbackground on any child focusgroup-focus-within:opacity-100andfocus-visible:opacity-100Validation
Manual verification
Glitch Issue
Drag/Reorder Issue
Chat Folder Click Area Issue
Logs, screenshots, or video
FIxed Glitch
https://github.com/user-attachments/assets/568c3a45-ef0e-4d94-9f69-f5b7b8cd626f
Fixed Drag/Reorder
https://github.com/user-attachments/assets/a89a674c-2e86-4cb1-844c-c4284a0c3cfd
Summary by CodeRabbit
Bug Fixes
New Features
Style
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.