tomusborne / generateblocks

GenerateBlocks is a small collection of lightweight WordPress blocks that can accomplish nearly anything.
https://generateblocks.com
188 stars 18 forks source link

Tweak: Use ColorPicker component #1231

Closed tomusborne closed 1 month ago

tomusborne commented 2 months ago

This PR makes use of our @edge22/components package for the ColorPicker component.

tomusborne commented 2 months ago

I already did that in the latest components package.

As for the enqueue, how does this work if we use the same handle in both places? I have a feeling it will only load once since the handle is the same. Which one it loads is a different question, though..

iansvo commented 2 months ago

I already did that in the latest components package.

I was looking at the repo and I'm not seeing a commit:

image

Did you perhaps publish and not commit the changes?

As for the enqueue, how does this work if we use the same handle in both places? I have a feeling it will only load once since the handle is the same. Which one it loads is a different question, though..

I feel like if the handle is the same it won't do it twice, but I suppose we'll just need to double check. I believe if the script is registered already then re-registering it will overwrite the previous registration though. It might mean that we need to lock the version to be the latest so it always pulls the same version, but we can solve for that easily enough I think.

tomusborne commented 2 months ago

This is it here: https://github.com/EDGE22-Studios/components/commit/ec5f9ea52436391d3541a59e51e038d46246f60e

It might mean that we need to lock the version to be the latest so it always pulls the same version, but we can solve for that easily enough I think.

This would be smart.

tomusborne commented 1 month ago

@iansvo We good to go on this for now?