cagov / ca-design-system-gutenberg-blocks

DEPRECATED: CA Design System Gutenberg blocks for WordPress.
MIT License
4 stars 5 forks source link

Move media component to allow for late image addition #83

Closed claytoncollie closed 3 months ago

claytoncollie commented 7 months ago

@zakiya @chachasikes This pull request adjusted the scrollable card block to be a little less restrictive. The current UX is that an image must be added when the block is inserted into the editor. If you insert the block without an image, select publish, and then refresh the screen, you will not see the "Upload image" button in the UI. This change allows for a late addition of an image if one is not added right away when the block is inserted. The main use case we are seeing is that we created a block pattern with this scrollable card block, and, when inserted, the editor needs to be able to add an image at any point of the editorial process, not just on the initial insertion of the single block.

This change does not require a build process to run.

xjensen commented 5 months ago

Hello! Apologies for the delay here.

Thus far, I've been unable to get this branch to work in my test environment. I noticed that your fork is a few commits behind our main branch. Would you be willing to bring your fork and branch up to date? That might help us troubleshoot the issue from our side.

Thanks!

claytoncollie commented 4 months ago

Hi @xjensen I updated my fork and merged main into this branch. I am almost positive this JS does not need a build process to work properly but I could be wrong. I went into the cagov-design-system directory, installed the dependencies, and ran the build script. I checked the changed files in my repo and nothing was affected by the process. I am pretty sure the build.js file is enqueued individually and doesn't require a build step.

zakiya commented 3 months ago

Since the scrollable-card block is not used on any of ODI's active sites and the changes here are not destructive, I'm going to go ahead and merge.

Note: This project will no longer be supported after this.