Skip to content

fix(apollo-react): var picker bug fixes [PLT-98392][PLT-98392]#269

Open
SreedharAvvari wants to merge 1 commit intomainfrom
fix/PLT-98303
Open

fix(apollo-react): var picker bug fixes [PLT-98392][PLT-98392]#269
SreedharAvvari wants to merge 1 commit intomainfrom
fix/PLT-98303

Conversation

@SreedharAvvari
Copy link
Contributor

@SreedharAvvari SreedharAvvari commented Feb 26, 2026

  • Removed custom getFullMentionQuery that 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)
  • The custom logic caused incorrect search queries when @ was inserted mid-text.
    For example - @sre| in schedule an email to @sre| with the following subject would search for sre with the following subject instead of just sre.

Also fixed line gap in tiptap editor
Before -
 
image
After -
 
image

Copilot AI review requested due to automatic review settings February 26, 2026 13:39
@github-actions
Copy link

github-actions bot commented Feb 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (PT)
apollo-canvas 🟢 Ready Preview, Logs Feb 27, 2026, 02:10:54 AM
apollo-ui-react 🟢 Ready Preview, Logs Feb 27, 2026, 02:09:41 AM
apollo-vertex 🟢 Ready Preview, Logs Feb 27, 2026, 02:09:04 AM
apollo-wind 🟢 Ready Preview, Logs Feb 27, 2026, 02:08:11 AM

@github-actions
Copy link

github-actions bot commented Feb 26, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 getFullMentionQuery workaround 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

@SreedharAvvari SreedharAvvari changed the title fix(apollo-react): var picker bug fixes fix(apollo-react): var picker bug fixes [PLT-98392][PLT-98392] Feb 26, 2026
Copilot AI review requested due to automatic review settings February 27, 2026 10:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

  • marginTop is using a Padding token (token.Padding.PadXs). In this codebase margins/gaps typically use token.Spacing.* while token.Padding.* is reserved for padding (e.g., chat-disclaimers.tsx:9 uses marginTop: token.Spacing.SpacingXl and padding: token.Padding.PadL). Consider switching this to an equivalent token.Spacing.* value (possibly matching the editor line gap) to keep token semantics consistent.
        height: lineHeight,
        lineHeight,
        verticalAlign: 'top',
        marginTop: token.Padding.PadXs,

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