Skip to content

feat(Selection): add smart hierarchical "select-all" behavior#989

Merged
d3m1d0v merged 3 commits intomainfrom
smart-all-selection
Mar 27, 2026
Merged

feat(Selection): add smart hierarchical "select-all" behavior#989
d3m1d0v merged 3 commits intomainfrom
smart-all-selection

Conversation

@d3m1d0v
Copy link
Copy Markdown
Member

@d3m1d0v d3m1d0v commented Mar 13, 2026

Summary

  • Implemented smart Cmd+A / Ctrl+A behavior that walks up the node tree on each press and selects the content of the nearest matching ancestor, instead of immediately selecting the entire document.
  • Added granular control over how nodes participate in hierarchical select-all via a new selectAll field in NodeSpec:
    • 'content' — select the node's inner content (TextSelection)
    • 'node' — select the node itself (TextSelection spanning the full node range)
    • false — skip this node during traversal
    • undefined — default: textblocks and code nodes select their content, others are skipped
  • Annotated node schemas (Blockquote, Table, YfmCut, YfmNote, YfmTable, YfmTabs, Deflist, QuoteLink) with appropriate selectAll values.

@gravity-ui
Copy link
Copy Markdown

gravity-ui bot commented Mar 13, 2026

Storybook Deployed

@gravity-ui
Copy link
Copy Markdown

gravity-ui bot commented Mar 13, 2026

🎭 Playwright Report

@d3m1d0v d3m1d0v force-pushed the smart-all-selection branch from b25ecfd to ff66626 Compare March 14, 2026 21:37
@d3m1d0v d3m1d0v force-pushed the smart-all-selection branch from ff66626 to bb8602c Compare March 24, 2026 20:01
@d3m1d0v d3m1d0v force-pushed the smart-all-selection branch from bb8602c to de3b423 Compare March 27, 2026 15:11
@d3m1d0v d3m1d0v marked this pull request as ready for review March 27, 2026 15:20
@d3m1d0v d3m1d0v requested a review from makhnatkin as a code owner March 27, 2026 15:20
@d3m1d0v d3m1d0v changed the title feat(Selection): add smart "select-all" behavior that respects node boundaries feat(Selection): add smart "select-all" behavior smart hierarchical select-all Mar 27, 2026
@d3m1d0v d3m1d0v changed the title feat(Selection): add smart "select-all" behavior smart hierarchical select-all feat(Selection): add smart hierarchical "select-all" behavior Mar 27, 2026
@d3m1d0v d3m1d0v merged commit 984428c into main Mar 27, 2026
8 of 9 checks passed
@d3m1d0v d3m1d0v deleted the smart-all-selection branch March 27, 2026 15:34
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