Draft
Conversation
When hovering over text within elements that have mixed content (both text nodes and child elements), the tool now selects the specific text node rather than the entire parent element. This provides more precise selections. Changes: - Add get-text-node-at-position utility using caretRangeFromPoint API - Add create-text-node-bounds utility using Range API for text node bounds - Add getTextNodeContext in context.ts for text node copy content - Integrate text node detection into hover, selection bounds, tag name, copy flow, and context menu in core/index.tsx - Text nodes show as #text in the selection label Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@react-grab/cli
grab
@react-grab/ami
@react-grab/amp
@react-grab/claude-code
@react-grab/codex
@react-grab/copilot
@react-grab/cursor
@react-grab/droid
@react-grab/gemini
@react-grab/opencode
react-grab
@react-grab/relay
@react-grab/utils
commit: |
…text nodes - Tag display now shows Component."truncated text..." instead of #text - Prevent parent element bounds from overriding text node bounds in the Copied! feedback label and grabbed box highlight - Add TEXT_NODE_TAG_DISPLAY_MAX_LENGTH constant (20 chars) Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for selecting and copying text nodes to enable direct text content interaction.
Summary by cubic
Adds precise text node selection and copy within mixed-content elements. Labels now show "truncated text…" and copy feedback uses exact text bounds.
Written for commit b7c12fb. Summary will update on new commits.