greenpeace / planet4

Built on top of Wordpress tech, Greenpeace Planet 4 powers digital platforms to engage with millions and win campaigns around the world.
https://planet4.greenpeace.org
Creative Commons Attribution Share Alike 4.0 International
66 stars 27 forks source link

PLANET-5466 Implement new Accordion block #81

Closed comzeradd closed 3 years ago

comzeradd commented 4 years ago

Brief summary of task:

As a follow-up of the idea a new P4 block, codename "Accordion" has been designed.

The idea is to have a block that allows collapsible menus, behaving exactly like the "Column" blocks > Tasks Style on mobile.

Objectives of task:

Screenshots & Mockups

Cheveron

elncetoo commented 4 years ago

So far I have a created a one block that is added for post, pages and campaigns, re-registered as beta to match the dscr. It has Title & description, and accordion block style that looks according the voted style guide, the content expands on hover. Problem is the fronendIndex is not visible on the frontend but on the editors frontend only.. and props are not being passed okay.. also I am not sure where this read more button should redirect to(in our nordic use case we use the accordion to provide simple information like FAQ.., (also I see that the two working examples are also without button), so I am not sure if it should expand more of this hidden content or to redirect to another page?

comzeradd commented 4 years ago

Thanks @elncetoo :green_heart:

I suggest you push your branch, so we can kick off the discussion on implementation. Regarding the button, this is intended to be optional and it's just something editors can choose to add (pick up text and link). Similar to what we have for the Columns block on the Tasks style (although not WYSIWYG yet).

elncetoo commented 4 years ago

I see got'cha ;) I reaalyyy want to fiddle a bit more with it now on my own tbh and i`ll push the latest thing i have today so we can see whats wrong with my code ;)

oekeur commented 3 years ago

This can be closed right? :)

elncetoo commented 3 years ago

yup :)

comzeradd commented 3 years ago

Fixed at greenpeace/planet4-plugin-gutenberg-blocks#440