-
Notifications
You must be signed in to change notification settings - Fork 56
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
improve Embed image button UX #2567
improve Embed image button UX #2567
Conversation
Hey @vibros68, thanks for the PR. Code looking clean. But I think the UX should be oriented to use image addresses, in case you want to add an image by reference, not by uploading the file to the server. If you want to attach an image, you can use the 📎 button. For example, adding an image like this |
@victorgcramos I just work as the comment of @lukebp in the issue. Can you confirm it @lukebp ? |
This is not the direction we want to go and is what this issue is attempting to fix. The attachment button attaches images to the proposal. The button in this PR inserts images inline. Those are two different use cases. We don't need a button for referencing external images because:
@vibros68 the behavior you have in this PR is correct. Is this PR ready to be reviewed? If so, please request a review on it. |
@lukebp Yes it is ready to be reviewed |
@lukebp makes sense. Thanks! |
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.
Nice job. I've tested this and everything is working as expected. I have two minor suggestions.
This is the modal for attaching an image.
Can you update the modal to read:
Attach a file
Select the file that you would like to attach to your proposal.
This is the modal for inserting an image into the proposal file.
Can you update the modal to read:
Insert an image
Select the image that you would like to insert into the proposal text.
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.
Looking good to me! Good job. UX is great and code is clean and readable!
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.
tACK
Needs code approval from @tiagoalvesdulce.
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.
LGTM
3. External images is a security risk (malicious content) and a privacy risk (tracking via referrer etc). I think we should not embed them for same reasons we warn about navigating external links (and for same reasons modern email services have an option to not load images by default). |
External images are not loaded inline. You can include them in markdown text, but they'll show up as a link and politeia will warn you about leaving politeia if you click the link. Example external image link: decred logo The issues you brought up with them are the reason for this behavior. |
This is great, thanks! |
close #2477
This pull request improve Embed image button in Mardown Editor.
upload_image.mp4