fix: GraphQL Int -> BigInt ID migration - allow strings as mentioned user IDs in the Rich Text editor#3737
Open
fix: GraphQL Int -> BigInt ID migration - allow strings as mentioned user IDs in the Rich Text editor#3737
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Rich Text editor’s mention ID typing to support GraphQL BigInt ID migration by treating mentioned user IDs as strings (while still allowing mention inputs to provide numeric IDs).
Changes:
- Update RichTextEditor
onChangeresult to returnmentionIds?: string[]and extract mention IDs as strings. - Allow
MentionedUser.idto bestring | numberwhile normalizing inserted mention nodeidattributes to strings. - Align F0Form richtext field types, Zod schemas, and Storybook examples/tests with
mentionIdsasstring[].
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/experimental/RichText/RichTextEditor/utils/types.tsx | Changes resultType.mentionIds to string[] for RichTextEditor output. |
| packages/react/src/experimental/RichText/RichTextEditor/utils/helpers.tsx | Extracts mention IDs as strings during editor updates. |
| packages/react/src/experimental/RichText/RichTextEditor/index.stories.tsx | Updates Storybook docs + example users to use string IDs. |
| packages/react/src/experimental/RichText/CoreEditor/Extensions/Mention/types.tsx | Expands MentionedUser.id to `string |
| packages/react/src/components/F0FormField/stories/F0FormField.stories.tsx | Updates local RichText value typing to mentionIds?: string[]. |
| packages/react/src/components/F0Form/fields/richtext/types.ts | Updates RichTextValue.mentionIds to string[]. |
| packages/react/src/components/F0Form/tests/F0FormValidation.test.tsx | Updates Zod schemas in tests to accept mentionIds as strings. |
| packages/react/src/components/F0Form/tests/F0Form.test.tsx | Updates required-field tests to treat mentionIds as strings. |
| packages/react/src/components/F0Form/stories/ValidationIssues.test.stories.tsx | Updates Storybook validation schema for mentionIds as strings. |
| packages/react/src/components/F0Form/stories/F0Form.stories.tsx | Updates Storybook examples’ Zod schemas for mentionIds as strings. |
packages/react/src/experimental/RichText/RichTextEditor/utils/helpers.tsx
Show resolved
Hide resolved
Contributor
✅ No New Circular DependenciesNo new circular dependencies detected. Current count: 0 |
Contributor
📦 Alpha Package Version PublishedUse Use |
Contributor
🔍 Visual review for your branch is published 🔍Here are the links to: |
Contributor
Coverage Report for packages/react
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
eliseo-juan
approved these changes
Mar 24, 2026
02f246c to
3531bb7
Compare
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.
Description
MentionedUser.idis typed asnumber, forcing to cast IDs withNumber()to satisfy TSAfter the BigInt migration, IDs are strings, so it's wrong
Screenshots (if applicable)
Implementation details
MentionedUser.id(trying to match the f0's code)Normalize the hooks' output as strings