xwp / material-design-wp-plugin

Material Design plugin for WordPress
13 stars 6 forks source link

Block: Hand-picked Posts #15

Closed jwold closed 3 years ago

jwold commented 4 years ago

Feature description

Display a number of hand-picked posts as a content block. Similar to Recent Posts, this will display the posts as individual cards.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Adding the block

Editing the block

Previewing the block

Block settings

Prototype:

Screen Shot 2020-02-24 at 1 04 24 PM

Figma link

Implementation brief

QA testing instructions

Note 1: With most of these changes you'll also want to see if the frontend is working, and not just the Gutenberg preview. It's possible there are discrepancies.

Note 2: For now we're just testing with the theme set in the staging env,

Adding the block

Previewing the block

Demo

Changelog entry

jwold commented 4 years ago

@davidlonjon do you have availability to pick this up for Sprint 2? If so, can you write the implementation brief and move it to Review?

davidlonjon commented 4 years ago

@ravichdev,

I have added the implementation brief for it. I ran out of time a little bit today so did not go into details. I am not sure if sufficient.

cc @jwold

davidlonjon commented 4 years ago

@jwold , I don't think we will be able to achieve the requirement: "Hovering over a Post title in the edit window will display a tooltip for the Post ID" for MVP as the posts list in the edit mode is provided by an external component from WooCommerce which we cannot modify without embedding into our repo but this will take a long time. I don't think this is a critical feature, so I'll rather have it out for MVP. Is it ok? cc @ravichdev

jwold commented 4 years ago

@davidlonjon I agree this doesn't need to be MVP. Thank you! :)

jwold commented 4 years ago

@davidlonjon we discussed the benefit of having hand-picked pages or custom post types. Is this something that would need to be a new issue? It feels like that, but wanted to get your feedback first.

davidlonjon commented 4 years ago

Hi @jwold, It should be a new issue. Also, we might want to consider to make them different blocks (one for pages and one for CPT) too (?) as it would make the blocks simpler as well as clearer from the user's perspective. cc @ravichdev

jwold commented 4 years ago

Found an issue with QA on staging:

  1. New posts appear to not show up: https://v.usetapes.com/hGbVaSukZU

cc @davidlonjon

davidlonjon commented 4 years ago

@jwold ,

Today I did some investigation and I think what you've reported with "New posts appear to not show up", is due to the following issue #128 which is quite a big one. I have submitted a PR for it #129 which should hopefully fix this.

cc @ravichdev

davidlonjon commented 4 years ago

@jwold: This issue "New posts appear to not show up:" should now been fixed as it was due to the bug that I mentioned above and the fix has now been merged

jwold commented 4 years ago

Awesome. Thanks so much!

jwold commented 4 years ago

@csossi this issue is ready for QA as well. Thanks!

A few quick notes:

davidlonjon commented 4 years ago

Hi @jwold, @csossi ,

I think our Material theme might impact the look of the edit mode of the block as on my local it looks like

Screen Shot 2020-04-09 at 10 39 47 PM

but on the test environment it looks like

hand-picked-posts-block

I think there is an alignment issue.

Also here is a video showing how the our material theme is affecting the alignment control (though I cannot replicate what we are seeing on the test environment as shown on the screenshot above):

https://cloudup.com/cnBu4jtRiIJ

Maybe it would be worth trying to switch the theme to Tweenty Tweenty on the test environment to check if the issue still remains as it could be something with the plugin too.

cc @emeaguiar , @ravichdev

Finally, Joshua the tooltip for post ID will not work for MVP as this block is making use (as a module dependency) of a component from WooCommerce which we cannot change. We would have to embed the specific import completely inside our repo and then we could modify for our purpose, but it will be a lot of work because of the way they build the styles with Sass. I am not sure it would be worth the effort for showing the Post ID tooltlip. In any case this cannot be done for MVP.

jwold commented 4 years ago

Thanks for the update David!

I am not sure it would be worth the effort for showing the Post ID tooltlip. In any case this cannot be done for MVP.

Agreed. Let's pass on this.

emeaguiar commented 4 years ago

@davidlonjon I'll take a look to see what's happening

emeaguiar commented 4 years ago

@davidlonjon ~is that alignment button not available in develop yet? It's not appearing in my local install, do I need to activate an option?~ Realized that is the issue.

Also, I've confirmed that the test site alignment of the edit screen looks the same even with the Material Theme deactivated, so something else is going on in there:

https://share.getcloudapp.com/p9u7g6ld

emeaguiar commented 4 years ago

After some research it seems the theme needs to enable support for these widths. So this is not exactly a bug. I'll work on adding support.

emeaguiar commented 4 years ago

I have a PR in the repo to add alignment support: xwp/material-theme-wp#41 it'll be visible in the testing site once it's merged.

csossi commented 4 years ago

@jwold

When I use the Search tool to search for posts, there's some cutoff along the bottom edge of design panel - unable to scroll (was using Win10/Chrome): image

csossi commented 4 years ago

@jwold

When I use the "clear all" under Posts in the design panel, the posts clear, but hangs on the "loading"/"working" animation: image

jwold commented 4 years ago

When I use the Search tool to search for posts, there's some cutoff along the bottom edge of design panel - unable to scroll (was using Win10/Chrome):

It appears that two-line post titles are being cutoff: https://d.pr/i/6oaS2x. Can we increase line height of the item, or something like that?

When I use the "clear all" under Posts in the design panel, the posts clear, but hangs on the "loading"/"working" animation:

I wonder if we should set the hand-picked posts back to the edit mode, so that users can then pick again?

cc @emeaguiar

jwold commented 4 years ago

Going to move this to complete. We can always open a new ticket if that QA issue appears.