-
Notifications
You must be signed in to change notification settings - Fork 145
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
Allow only images when uploading to the Services and Food & drink blocks #2294
Conversation
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
Performance Test Results:
|
@@ -221,12 +221,13 @@ const FoodItem = ( props ) => { | |||
return ( | |||
<div className="wp-block-coblocks-food-item__figure"> | |||
<MediaPlaceholder | |||
accept={ 'image/*' } |
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.
This is the first line change
@@ -170,14 +175,15 @@ const Edit = ( props ) => { | |||
const renderPlaceholder = () => { | |||
return ( | |||
<MediaPlaceholder | |||
className="wp-block-coblocks-service__figure" | |||
accept={ 'image/*' } |
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.
This is the second line change
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 good on my end 👍 Tested and working just as expected.
Description
Added a filter to make sure that the user can only select images to upload.
Without linting, it's basically a two lines change (I've commented on them to show them)
Types of changes
Enhancement.
Screenshot
Only the images are allowed to be selected now.