Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forms: dropdown field visually different in editor & frontend #41079

Closed
simison opened this issue Jan 15, 2025 · 5 comments
Closed

Forms: dropdown field visually different in editor & frontend #41079

simison opened this issue Jan 15, 2025 · 5 comments
Labels
[Block] Contact Form Form block (also see Contact Form label) [Feature] Forms Blocks Blocks designed to streamline user input and engagement, such as contact, newsletter sign-ups, etc. [Package] Forms [Pri] Normal [Status] Auto-allocated [Type] Bug When a feature is broken and / or not performing as intended

Comments

@simison
Copy link
Member

simison commented Jan 15, 2025

Dropdown field in Forms shows "native" browser dropdown in the frontend, but in the editor we have custom dropdown:

Image Image

Whichever way we go, we should stay consistent, and this should likely be user option.

@simison simison added [Block] Contact Form Form block (also see Contact Form label) [Feature] Forms Blocks Blocks designed to streamline user input and engagement, such as contact, newsletter sign-ups, etc. [Package] Forms [Pri] Normal [Type] Bug When a feature is broken and / or not performing as intended labels Jan 15, 2025
@Robertght
Copy link

I'm marking this as triaged on the One Board, but let PAs know if there's a need for any input from us.

@Robertght Robertght moved this from Needs Triage to Triaged in Automattic Prioritization: The One Board ™ Jan 15, 2025
@Robertght Robertght changed the title Forms: dropdown field visually different in editor & fontend Forms: dropdown field visually different in editor & frontend Jan 15, 2025
@ntsekouras
Copy link
Member

How would you suggest doing that? Front end using a native select is kind of a recent change and it makes sense to keep, but how could you edit that in the editor?

Another option would be to have a preview toolbar button maybe? 🤔

@edanzer
Copy link
Contributor

edanzer commented Jan 16, 2025

Yep, I think this is intended behavior. The frontend, where the dropdown is expected to work like a dropdown, uses the browser rendering for select drop downs. The backend, where you need to add/edit the options in an interactive way, uses a specific implementation to allow that.

I'm not sure if this entirely needs fixing, but if so, a preview button like @ntsekouras suggests seems like a good idea and is consistent with how the HTML block (which also look different between editor/frontend). Maybe you could also renders frontend-style when the block is not active, and then change to the interactive editable version when the block is active?

@enejb
Copy link
Member

enejb commented Jan 27, 2025

I took a look at this and I think what we currently have make sense. The current UI in the editor is designed so that it is easier to edit. While the current UI on the front end it is designed to be easier to fill out (more accessible ) etc.

Look almost the same when you don't have the field selected.

See
Editor
Image

Frontend
Image

@simison Can you provide a way to processed here.
If we do go with the select option would you exact the field to be editable in the sidebar?

Or do you see us implementing the same drop down on the front-end. That uses to be the case but we went the other way around probably to increase accessibility. cc @monsieur-z for more insights on this.

@simison
Copy link
Member Author

simison commented Jan 27, 2025

Let's leave this as-is now and revisit if we get feedback.

I want us to keep the native select as default experience anyway, and the job would be to add "customizable" dropdowns but that's entirely different task.

This might still come relevant with "write & edit" modes where we might need to decide what to show in the editor for each mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Contact Form Form block (also see Contact Form label) [Feature] Forms Blocks Blocks designed to streamline user input and engagement, such as contact, newsletter sign-ups, etc. [Package] Forms [Pri] Normal [Status] Auto-allocated [Type] Bug When a feature is broken and / or not performing as intended
Projects
Development

No branches or pull requests

6 participants