thoughtis / cata-blocks

Block Editor components for use with the Cata theme.
GNU General Public License v3.0
1 stars 0 forks source link

Issue#145/add reel block #147

Closed jessica-townsend closed 4 months ago

jessica-townsend commented 4 months ago

Related Issues

What Was Accomplished

How It Was Tested

How To Test

Open Questions

Deploy Steps

douglas-johnson commented 4 months ago

The existing version of this has an inner container which uses fit-content width and auto margin to center align the items when they are smaller than the available width. I think we still want that.

If I try to recreate it with the justification in the editor, it looks right with a small number of items, but the content at the start gets cut off when there are enough items to need scrolling.

Screenshot 2024-04-29 at 10 51 49 AM
jessica-townsend commented 4 months ago

I see what you mean @douglas-johnson , it would have been nice to just use the flex layout for the entire block but I'll rewrite it to include the inner container

jessica-townsend commented 4 months ago

@douglas-johnson I made an update to this which uses a row block as the inner container with the custom class so we can apply the fit-content property, but there are still a couple issues:

  1. Inner blocks are still appearing off-center. Using inline-size instead of flex-basis seems to fix this in dev tools.
  2. The right side padding isn't working properly so there isn't enough space between the content and the right edge of the reel container

Thought Catalog develop is up to date with this latest version. I've been trying to factor away the need to use the Reel Clip block and use sizing & layout options that are already available in core, but if flex-basis isn't working with fit-content I'm thinking we'll have to add the Reel Clip block after all. Let me know what you think!

douglas-johnson commented 4 months ago

Yeah it seems like it has to use reel clip to have the same functionality, sorry for the re-work.

jessica-townsend commented 4 months ago

@douglas-johnson updated on develop with the reel clip block