Repository navigation
Grammar input capture - #34
Merged
Merged
Conversation
Enable AXManualAccessibility for Electron apps so their input boxes are visible, check the paragraph above a caret on a blank line, and read text through AXStringForRange when an editor omits AXValue.
Draw Grammarly-style squiggles over each suggestion in a click-through overlay, positioned from Accessibility bounds per visual line and clipped to the visible editor. Clicking an underline opens the review at that suggestion without taking focus; hovering a row highlights its text. Underlines follow scrolling, dismissal, and applied edits, and can be turned off in Grammar settings.
Write the replacement with AXSelectedText so applying no longer depends on keyboard focus or the clipboard, and fall back to paste only when the source is still untouched. Release the review panel's keyboard focus by ordering it out, since calling resignKey() leaves keystrokes routed to it.
Find the focused element through the frontmost app first, since Electron apps can fail the system-wide query. Open the review beside the caret's line, falling back to the pointer when an editor exposes no text geometry. Move Dismiss and Accept into the footer, acting on the selected suggestion, and show explanations as a tooltip.
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.
No description provided.