-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[front] - chore(InputBar): url pasting formatting #11425
Merged
Merged
+77
−23
Conversation
This file contains 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
…ource link components for the editor - Added 'DataSourceLinkComponent' to render data source links with icons in the input bar editor - Implemented 'DataSourceLinkExtension' for tiptap editor, enabling inline data source linking within text editor
…urceLinkExtension into custom editor - Added DataSourceLinkExtension to the list of extensions in useCustomEditor to handle data source links - Simplified useUrlHandler hook to directly insert dataSourceLink nodes upon selection of a node
- Simplified the markup of DataSourceLinkComponent for clarity - Adjusted Chip component usage with icon and smaller size "xs"
- Ensure compatibility with the latest features and bug fixes in the @dust-tt/sparkle library - Maintain integrity and stable functionality within the project dependencies
…itor hook - Remove duplicate DataSourceLinkExtension import in useCustomEditor.tsx - Add a missing dependency to useEffect in OAuth finalize page [front/components] - style: add whitespace for better readability in extensions - Insert a blank line for visual separation in DataSourceLinkExtension.ts and useUrlHandler.tsx
…ip text is readable - Added `color="white"` to `Chip` component to improve text visibility against varying backgrounds
…dling in editor - Simplify the logic for inserting dataSourceLink by using a chain of editor commands - Ensure correct spacing around inserted dataSourceLink by checking for leading space requirements and adjusting the insertion accordingly - Clean up the pending URL from the storage once the dataSourceLink is inserted
…: improve URL handling in input editor - Implemented `replaceUrl` callable function to handle editor command execution with deferring and content formatting - Introduced a cleaner approach to checking the necessity for leading spaces before inserting content - Adjusted useEffect dependency array to ensure proper cleanup and avoid potential duplicates in URL handling
philipperolet
approved these changes
Mar 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable 😉
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
This PR fix React state update conflicts in URL paste handling.
Problem:
When pasting URLs, editor commands triggered synchronous state updates during React's render phase. This caused "flushSync" warnings and potential race conditions
Solution:
Risk
Low
Deploy Plan