-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: create reusable plugin #3706
feat: create reusable plugin #3706
Conversation
d390aff
to
968e739
Compare
968e739
to
9b0301b
Compare
dc5dd2c
to
db8f33c
Compare
a7cf83e
to
fea7b0f
Compare
@toptal-anvil ping reviewers |
packages/picasso-rich-text-editor/src/RichTextEditor/story/ImageUpload.example.tsx
Outdated
Show resolved
Hide resolved
packages/picasso-rich-text-editor/src/plugins/ImagePlugin/ImagePlugin.tsx
Show resolved
Hide resolved
packages/picasso-rich-text-editor/src/plugins/ImagePlugin/ImagePlugin.tsx
Outdated
Show resolved
Hide resolved
packages/picasso-rich-text-editor/src/plugins/ImagePlugin/ImagePlugin.tsx
Show resolved
Hide resolved
...so-rich-text-editor/src/plugins/ImagePlugin/components/ImagePluginModal/ImagePluginModal.tsx
Outdated
Show resolved
Hide resolved
@toptal-anvil ping reviewers |
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.
Awesome job! There's one more thing that I think is good to change.
We provide two ways of enabling plugins:
- By passing a React Element with the plugin and all the props
- By referencing a text name of the plugin that is baked into the list of "default" plugins
Currently, ImagePlugin can be imported in both ways, but I think the second option should not be available anymore because it is not possible to pass props (in particular, onUpload
).
It can be found here
Line 12 in d8580f8
case 'image': |
(and also a story for
RichText => HTML
has to be adjusted to have image plugin with React element)
@mkrl Thank you for noticing, added! |
FX-4109
Please note that this pull request covers only component API-part of uploading implementation and implements full cycle of image uploading and insertion in Rich Text Editor. Tests (successful and failed uploading, validations) are added in #3717.
Description
This pull request covers component API-part of uploading implementation and implements full cycle of image uploading and insertion in Rich Text Editor.
Design was confirmed in https://toptal-core.slack.com/archives/C04H62YP84F/p1688734127377339.
How to test
Screenshots
Kapture.2023-07-11.at.12.58.33.mp4
Development checks
props
in component with documentationexamples
for componentPR commands
List of available commands:
@toptal-bot run package:alpha-release
- Release alpha version@toptal-anvil ping reviewers
- Ping FX team for reviewPR Review Guidelines
When to approve? ✅
You are OK with merging this PR and
nit:
to your comment. (ex.nit: I'd rename this variable from makeCircle to getCircle
)When to request changes? ❌
You are not OK with merging this PR because
When to comment (neither ✅ nor ❌)
You want your comments to be addressed before merging this PR in cases like:
How to handle the comments?