-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Flow for adding in images in the gallery without going through the media library #5166
Flow for adding in images in the gallery without going through the media library #5166
Conversation
d7e01fe
to
3352339
Compare
This is totally totally lovely and works perfectly. Superb work! Can you add the following CSS to the gray button that gets added?
Adding that will remove the transparent border, and make it look like a square image placeholder instead of a button. With that in, 👍 👍 👌 |
3352339
to
533599d
Compare
Thank you @jasmussen for providing the CSS for the improvement and for the feedback, it was applied. I kept a border when the button is focused/with mouse over, to make it look clickable. If you think this border should also be removed, please let me know and I will remove it :) |
Awesome, I think that looks great. The reason for removing the border is that the button has a 1px transparent border, so that it doesn't "jump around" when a visible border is applied. But this is a non-issue with the way you use the button, so this looks good to go to me! |
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
blocks/library/gallery/block.js
Outdated
{ isSelected && | ||
<li className="blocks-gallery-item"> | ||
<FormFileUpload | ||
multiple={ true } |
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.
Minor: you could drop the ={ true }
blocks/library/gallery/editor.scss
Outdated
.button.blocks-gallery-add-item-button { | ||
box-shadow: none; | ||
border: none; | ||
border-radius: 0; |
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.
indentation issue
Let it inherit color of admin theme ? To be different than Inserter button. |
That could be nice, a big splash of color. |
533599d
to
b1e5a00
Compare
… the media library.
b1e5a00
to
9c6cce7
Compare
Thank you for your suggestion @StaggerLeee 👍 . I also think it may be a good idea to explore the use of admin colors. Maybe there are also other similar cases where admin colors could be used it is for sure something to check. |
Closes: #1704
This PR implements a button that appears when the gallery is selected and allows the user to upload new images without going through the media library.
How Has This Been Tested?
Add a gallery block add some images. Select the block to see a plus button is present in the position a new image will appear if it is added.
Try to use the button to upload one or more images.
Unselect the block and see the button disappears.
Screenshots (jpeg or gifs if applicable):