Skip to content
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

Merged
merged 4 commits into from Feb 28, 2022

Conversation

olafleur-godaddy
Copy link
Member

@olafleur-godaddy olafleur-godaddy commented Feb 25, 2022

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.

Screen Shot 2022-02-28 at 09 14 22

@cypress
Copy link

cypress bot commented Feb 25, 2022



Test summary

404 0 2 0


Run details

Project CoBlocks
Status Passed
Commit b0deecb
Started Feb 25, 2022 4:51 PM
Ended Feb 25, 2022 4:56 PM
Duration 04:10 💡
OS Linux Ubuntu - 20.04
Browser Multiple

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

@godaddy-wordpress-bot
Copy link
Contributor

Performance Test Results:

index master WPEX-1709-filter-images change %
focus 99.16 164.07 65.46%
inserterHover 34.19 41.49 21.35%
inserterOpen 108.61 131.79 21.34%
inserterSearch 103.78 75.78 -26.98%
load 21993.5 24920.9 13.31%
maxFocus 121.27 258.05 112.79%
maxInserterHover 38.28 54.67 42.82%
maxInserterOpen 456.09 534.25 17.14%
maxInserterSearch 180.66 136.65 -24.36%
maxType 71.5 103.93 45.36%
minFocus 86.75 132.58 52.83%
minInserterHover 30.99 33.94 9.52%
minInserterOpen 67.5 73.78 9.3%
minInserterSearch 50.91 51.06 0.29%
minType 36.15 42.41 17.32%
type 42.97 55.9 30.09%

@@ -221,12 +221,13 @@ const FoodItem = ( props ) => {
return (
<div className="wp-block-coblocks-food-item__figure">
<MediaPlaceholder
accept={ 'image/*' }
Copy link
Member Author

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/*' }
Copy link
Member Author

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

Copy link
Contributor

@EvanHerman EvanHerman left a 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.

@EvanHerman EvanHerman merged commit b7b4518 into master Feb 28, 2022
@EvanHerman EvanHerman deleted the WPEX-1709-filter-images branch February 28, 2022 16:24
@olafleur-godaddy olafleur-godaddy added this to the Next Release milestone Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants