close
Skip to content

Add new adaptiveSelect DataForm control#74937

Merged
ntsekouras merged 5 commits intotrunkfrom
dataform-add-elements-control
Feb 6, 2026
Merged

Add new adaptiveSelect DataForm control#74937
ntsekouras merged 5 commits intotrunkfrom
dataform-add-elements-control

Conversation

@ntsekouras
Copy link
Copy Markdown
Contributor

@ntsekouras ntsekouras commented Jan 26, 2026

What?

Follow up of: #74891
Extracted some parts from: #73623

We should add into the framework the logic to decide when to load a select and when a combobox in a default scenario (when the field author does not required one via Edit: 'combobox'). This would enable us to recreate the current experience of the post editor sidebar:

This PR adds an adaptiveSelect DataForm control (open to suggestions for a better name) that now is the control that is used when a field has elements. It's a thin wrapper of select and combobox controls and decides which one to render based on the total elements.

This PR still assumes that consumers of getElements return all the available elements and further enhancements on that will be made with the async filtering work.

Testing Instructions

  1. Depending on the authors you have in your test environment the change might be visible in site editor when quick editing a page. The threshold is 10.
  2. In field types stories select the adaptiveSelect in Edit and then toggle the manyElements to see the switching of controls (select/combobox). npm run storybook:dev
Screen.Recording.2026-01-26.at.12.47.41.PM.mov

Screenshots or screencast

Many authors

Screen.Recording.2026-01-26.at.12.45.28.PM.mov

Few authors

Screen.Recording.2026-01-26.at.12.46.38.PM.mov

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Package] DataViews /packages/dataviews [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants