WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.41k stars 4.16k forks source link

Components: better, modular slider-related controls #40507

Open ciampo opened 2 years ago

ciampo commented 2 years ago

What problem does this address?

The RangeControl component is a slider + (optional) NumberControl and icons. Its monolithic approach has a few limitations — for example, it doesn't allow for a UnitControl component to be used instead of NumberControl.

The new approach aims at isolating the "slider" part to a separate component, so that we can more easily compose it with different components (e.g. NumberControl and UnitControl)

What is your proposed solution?

As initially discussed in https://github.com/WordPress/gutenberg/pull/40462#issuecomment-1104376886, the tentative plan is to:

ciampo commented 2 years ago

cc @aaronrobertshaw and @mirka , let me know if there's anything in the plan outlined above that you'd like to discuss / change.