fix(apollo-react): var picker bug fixes [PLT-98392][PLT-98392]#269
Open
SreedharAvvari wants to merge 1 commit intomainfrom
Open
fix(apollo-react): var picker bug fixes [PLT-98392][PLT-98392]#269SreedharAvvari wants to merge 1 commit intomainfrom
SreedharAvvari wants to merge 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
This PR fixes visual bugs in the variable picker component (resource mention) of the ApChat input editor. The changes simplify the mention query handling logic and correct spacing/alignment issues with resource chips.
Changes:
- Removed custom
getFullMentionQueryworkaround function and rely on TipTap's built-in mention query handling - Added line gap spacing (
SpacingMicro= 4px) to improve visual appearance of multi-line text in the editor - Fixed resource chip vertical alignment by adding explicit lineHeight and marginTop properties
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tiptap.utils.ts |
Removed getFullMentionQuery function that was a workaround for cursor position issues |
tiptap.utils.test.ts |
Removed tests for deleted getFullMentionQuery function; tests for textToDocument remain |
tiptap-resource-suggestion.tsx |
Simplified to use TipTap's built-in props.query and props.range instead of custom query logic |
tiptap-editor.styles.ts |
Added LINE_GAP constant and incorporated it into row height calculations for better spacing |
resource-chip-node-view.tsx |
Added lineHeight and marginTop styling to fix chip vertical alignment |
da6399e to
06b493e
Compare
06b493e to
6b2f53f
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
packages/apollo-react/src/material/components/ap-chat/components/input/tiptap/resource-chip-node-view.tsx:156
marginTopis using a Padding token (token.Padding.PadXs). In this codebase margins/gaps typically usetoken.Spacing.*whiletoken.Padding.*is reserved for padding (e.g.,chat-disclaimers.tsx:9usesmarginTop: token.Spacing.SpacingXlandpadding: token.Padding.PadL). Consider switching this to an equivalenttoken.Spacing.*value (possibly matching the editor line gap) to keep token semantics consistent.
height: lineHeight,
lineHeight,
verticalAlign: 'top',
marginTop: token.Padding.PadXs,
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.
getFullMentionQuerythat read forward past the cursor to the next double-space/line break, and reverted to TipTap's built-in mention query (text between@and cursor)@was inserted mid-text.For example -
@sre|inschedule an email to @sre| with the following subjectwould search forsre with the following subjectinstead of justsre.Also fixed line gap in tiptap editor


Before -
After -