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

Replace ssr with image card edit component #398

Merged
merged 8 commits into from
Aug 10, 2022
Merged

Conversation

PatelUtkarsh
Copy link
Collaborator

@PatelUtkarsh PatelUtkarsh commented Aug 1, 2022

Summary

Fixes #331

Checklist

  • My pull request is addressing an open issue (please create one otherwise).
  • My code is tested and passes existing tests.
  • My code follows the Contributing Guidelines (updates are often made to the guidelines, check it out periodically).

- Requires updating test due to error with ResizeObserver
@coveralls
Copy link

coveralls commented Aug 2, 2022

Pull Request Test Coverage Report for Build 2835022400

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 2 of 13 (15.38%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+1.1%) to 72.987%

Changes Missing Coverage Covered Lines Changed/Added Lines %
plugin/php/template-parts/blocks/image-card-query.php 0 2 0.0%
plugin/assets/src/block-editor/blocks/card-image/edit.js 1 10 10.0%
Files with Coverage Reduction New Missed Lines %
plugin/assets/src/block-editor/blocks/card-image/edit.js 1 5.0%
Totals Coverage Status
Change from base Build 2834683240: 1.1%
Covered Lines: 4690
Relevant Lines: 6302

💛 - Coveralls

emeaguiar
emeaguiar previously approved these changes Aug 4, 2022
Copy link
Collaborator

@emeaguiar emeaguiar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @PatelUtkarsh ! I left a few comments but none of them are blockers, I'll leave this as approved and you can either address them or merge if you think we can go on without them

plugin/assets/src/block-editor/blocks/card-image/edit.js Outdated Show resolved Hide resolved
plugin/php/class-block-types.php Show resolved Hide resolved
@@ -245,6 +245,7 @@ public function enqueue_block_editor_assets() {
'postTypes' => $post_types,
'doesRequireBackCompatList' => version_compare( get_bloginfo( 'version' ), '5.8', '<' ),
'canUseQueryLoop' => version_compare( '5.8', get_bloginfo( 'version' ), '<=' ),
'fallBackImageCard' => $this->plugin->asset_url( 'assets/images/placeholder-image-card.png' ),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥜 Nitpick: I'd prefer if we transform this image to either webp or at the very least jpg. I don't see any reason for this to be png and they are usually much larger than they need to be

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes generally PNG files are large, but this placeholder image is 4kb - which I've compressed down to 2kb.

plugin/php/template-parts/blocks/image-card-query.php Outdated Show resolved Hide resolved
@PatelUtkarsh
Copy link
Collaborator Author

@emeaguiar This requires re-review, Can you check?

@emeaguiar emeaguiar merged commit be8614a into develop Aug 10, 2022
@emeaguiar emeaguiar deleted the image-card-edit branch August 10, 2022 19:14
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.

[M3] Components - Image Card
3 participants