tomusborne / generateblocks

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

Add support for numerical cursor input #1145

Closed dgwyer closed 11 months ago

dgwyer commented 11 months ago

Fixes #1135.

Allows the use of up/down cursor keys to nudge values in the UnitControl component. If text is present (e.g. calc()) then it doesn't attempt to alter the input value.

I like how the combination of using tab and the up/down cursor input enables fast iteration of editing values (see video for demo).

If accepted, should this be merged into the release branch, or the pattern library branch?

https://github.com/tomusborne/generateblocks/assets/1482075/fb164f5e-22a7-48aa-a7d6-90a1da6ce358

dgwyer commented 11 months ago

@tomusborne I just changed the base branch to merge into to release/1.9.0. There is quite a lot of extra code to merge now, I just wanted to double check this is OK before competing the merge.

Also, I searched for UnitControl in GB Pro but couldn't find it. Did you mean a different component maybe?

tomusborne commented 11 months ago

@dgwyer Ah, I guess since you based your branch on the other branch it ended up bringing everything else with it.

We definitely don't want to merge all of this as it's the entire pattern library PR.

Not sure if there's an easy fix or if you have to just grab the changes you made in the one file and create a new PR.

My mistake about GB Pro, thought we were using it there as well.

dgwyer commented 11 months ago

Ah, I guess since you based your branch on the other branch it ended up bringing everything else with it.

Yep, that's the issue! Closing in favor of PR #1147.