fix: Image resize, Link selector in Modals, Delete/ sync images and so much more #1896
Merged
sriramveeraghanta merged 10 commits intodevelopfrom Aug 19, 2023
Merged
fix: Image resize, Link selector in Modals, Delete/ sync images and so much more #1896sriramveeraghanta merged 10 commits intodevelopfrom
sriramveeraghanta merged 10 commits intodevelopfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Ignored Deployments
|
aaryan610
reviewed
Aug 18, 2023
| workspaceSlug={workspaceSlug as string} | ||
| ref={editorRef} | ||
| value={ | ||
| value && value !== "" && Object.keys(value).length > 0 |
Member
There was a problem hiding this comment.
Here, value and watch("description_html") hold the same value, double check is redundant. Can we remove watch("description_html")?
Member
Author
There was a problem hiding this comment.
Ohh yeah sure! I've done it!
aaryan610
reviewed
Aug 18, 2023
sriramveeraghanta
approved these changes
Aug 19, 2023
sriramveeraghanta
approved these changes
Aug 19, 2023
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.
Currently uses
react-moveable, but I'll soon add a custom tiptap plugin to remove the dependancy. User can resize the editor by first selecting it followed by dragging the nodes on the right and left and shown in this demo. It'sstateis saved with the "Save" state of the editor.image-resize-tiptap.mov
Previously the link form on submit used to trigger the parent form (in case of Modals) on submit, now I've handled
Enterkey down events and form submit events via a onClick/onKeyDown functions.Currently only
httpandhttpsprotocols are allowed and validated against.Images are now uploaded and saved at 35% of the width, and then can be resized as per user's convenience
Added alerts behaviour if the user tries to reload while the editor's state isn't saved and synced with Image Uploading as well
alerts.on.reload.mov
Removed shadow to maintain consistency across design in light mode
Added custom delete plugin that checks for various cases and deletes images ONLY if the image node is deleted!