feat(ui): unify overlay animations and trim tooltip delays
Use base-ui's transition-status pattern (data-starting-style / data-ending-style) for Dialog, DropdownMenu, Select, Tooltip and Popover so open/close animate consistently at 150ms ease-out without flicker. Wrap dialog popups in a centered flex container so the scale animation no longer fights with translate-based positioning, and switch PendingChangesBar to a real Popover so it actually animates closed. Convert ScheduledTaskEditorDialog from raw Radix to the shared Dialog wrapper, give ScheduledTasksDialog a stable min-height to prevent layout shift mid-animation, and reset NewWorktreeDialog form state on open instead of close so fields don't empty during the close transition. Drop tooltip delay from 700ms to 300ms globally and remove all per-component overrides except the model/variant/agent selectors in the chat input (600ms).
This commit is contained in:
@@ -657,46 +657,39 @@ export function NewWorktreeDialog({
|
||||
void loadDefaultSourceBranch();
|
||||
}, [branches, projectDirectory, newBranchState.sourceBranch]);
|
||||
|
||||
// Reset state when dialog opens/closes
|
||||
// Reset state on each open. Resetting on close would empty the form during
|
||||
// the close animation, causing visible flicker.
|
||||
React.useEffect(() => {
|
||||
if (!open) {
|
||||
setMode('new-branch');
|
||||
setNewBranchState({
|
||||
branchName: '',
|
||||
worktreeName: '',
|
||||
isSyncingWorktreeName: true,
|
||||
sourceBranch: '',
|
||||
linkedIssue: null,
|
||||
linkedPr: null,
|
||||
includePrDiff: false,
|
||||
});
|
||||
setExistingBranchState({
|
||||
selectedBranch: '',
|
||||
worktreeName: '',
|
||||
});
|
||||
setExistingBranchDropdownOpen(false);
|
||||
setSourceBranchDropdownOpen(false);
|
||||
setExistingBranchPickerOpen(false);
|
||||
setSourceBranchPickerOpen(false);
|
||||
setExistingBranchQuery('');
|
||||
setSourceBranchQuery('');
|
||||
setValidation({
|
||||
isValidating: false,
|
||||
branchError: null,
|
||||
worktreeError: null,
|
||||
touched: false,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// Generate unique slug when dialog opens
|
||||
if (!open) return;
|
||||
|
||||
setMode('new-branch');
|
||||
setExistingBranchState({
|
||||
selectedBranch: '',
|
||||
worktreeName: '',
|
||||
});
|
||||
setExistingBranchDropdownOpen(false);
|
||||
setSourceBranchDropdownOpen(false);
|
||||
setExistingBranchPickerOpen(false);
|
||||
setSourceBranchPickerOpen(false);
|
||||
setExistingBranchQuery('');
|
||||
setSourceBranchQuery('');
|
||||
setValidation({
|
||||
isValidating: false,
|
||||
branchError: null,
|
||||
worktreeError: null,
|
||||
touched: false,
|
||||
});
|
||||
|
||||
const uniqueSlug = generateUniqueSlug();
|
||||
setNewBranchState(prev => ({
|
||||
...prev,
|
||||
setNewBranchState({
|
||||
branchName: uniqueSlug,
|
||||
worktreeName: uniqueSlug,
|
||||
isSyncingWorktreeName: true,
|
||||
}));
|
||||
sourceBranch: '',
|
||||
linkedIssue: null,
|
||||
linkedPr: null,
|
||||
includePrDiff: false,
|
||||
});
|
||||
}, [open, generateUniqueSlug]);
|
||||
|
||||
// Sync worktree name with branch name for new-branch mode
|
||||
|
||||
Reference in New Issue
Block a user