Skip to content

Polish explorer folder open, close, and collapse behavior#672

Open
RA1NCS wants to merge 2 commits into
athasdev:masterfrom
RA1NCS:gshcdx/explorer-terminal-polish
Open

Polish explorer folder open, close, and collapse behavior#672
RA1NCS wants to merge 2 commits into
athasdev:masterfrom
RA1NCS:gshcdx/explorer-terminal-polish

Conversation

@RA1NCS
Copy link
Copy Markdown
Contributor

@RA1NCS RA1NCS commented May 8, 2026

What really changes

The file explorer now treats open, close, and collapse as three separate actions instead of blending them together. Normal open and close preserve the folder's previous nested state, while the collapse control intentionally resets the subtree and uses the stepped folder-only collapse animation.

The explorer controls are also more consistent at the workspace root and in sticky ancestor rows, and the terminal multiline paste warning now supports a do-not-show-again flow with a settings toggle to restore it.

Point by point

  • regular folder close now hides the subtree without wiping nested open state
  • collapse now stays explicit, resets descendants, and only stair-animates folder rows
  • root rows keep their own collapse affordance without collapsing the repo itself
  • sticky ancestor rows now keep the same trailing action behavior while scrolling
  • multiline terminal paste warnings can be disabled once and turned back on from settings

Implementation details

  • split normal folder close from destructive subtree collapse instead of routing both through one path
  • kept workspace root rows on dedicated semantics so the repo itself never disappears
  • preserved cached child state for normal close, and reserved descendant state clearing for the explicit collapse control only
  • mirrored the trailing action in the sticky ancestor render path so behavior stays aligned between normal and sticky rows

@RA1NCS RA1NCS force-pushed the gshcdx/explorer-terminal-polish branch from 755ae39 to f7ccfde Compare May 8, 2026 08:26
@mehmetozguldev mehmetozguldev self-requested a review May 9, 2026 11:36
Copy link
Copy Markdown
Member

@mehmetozguldev mehmetozguldev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, the product direction here is good. Preserving nested folder state on normal close and separating explicit collapse behavior makes sense, and the terminal
paste warning setting is useful.

Before merging, please update this against current master and fix two issues:

  1. The merged result currently fails typecheck because Terminal uses Button variant="outline" and variant="primary", but the current shared Button primitive only
    supports the existing variants. Please align these call sites with the current Button API.

  2. The explorer row wrapper now defaults to max-height: 24px, but comfortable density uses 28px rows and the CSS variable is only set during row animation. Please
    make the row height stable for all densities so comfortable rows don’t get clipped.

Also worth making the new explicit collapse action reachable from keyboard or context menu, since it is now a distinct explorer action.

- keep regular folder close separate from destructive collapse so nested
  state restores when reopened
- refine root row controls, sticky row actions, and folder motion so the
  tree behaves consistently while scrolling
- keep the terminal paste warning flow local to the terminal with a
  persisted do-not-show-again setting
@RA1NCS RA1NCS force-pushed the gshcdx/explorer-terminal-polish branch from f7ccfde to 588094a Compare May 11, 2026 03:54
@RA1NCS
Copy link
Copy Markdown
Contributor Author

RA1NCS commented May 11, 2026

Addressed review. This branch is now rebased onto current master, the terminal paste dialog uses the current Button variants, file-tree row height is stable across densities instead of defaulting to 24px during non-animated rows, and the explicit collapse action is reachable from the context menu as well as the row action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants