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

Use <fieldset> tag for "Form Panel" #4698

Closed
ThomasLandauer opened this issue Sep 25, 2021 · 3 comments
Closed

Use <fieldset> tag for "Form Panel" #4698

ThomasLandauer opened this issue Sep 25, 2021 · 3 comments
Labels
Milestone

Comments

@ThomasLandauer
Copy link
Contributor

Follow-up of #4655

Is there a specific reason why you're introducing the term "Form Panel" at https://symfony.com/bundles/EasyAdminBundle/current/fields.html#form-panels for what is (essentially) a <fieldset>?

Right now, they get rendered as two <div>s:

<div class="field-form_panel">
    <div class="form-panel">

My suggestion would be to replace one of them (or both - don't know what their purpose is) with <fieldset>, and the following one/two with <legend>:

<div class="form-panel-header">
    <div class="form-panel-title">

A positive side effect would be that searching for "EasyAdmin fieldset" (which is what I did before I opened the above issue ;-) would yield a result :-)

@ThomasLandauer
Copy link
Contributor Author

Just another idea regarding Form Panels:
Allow closing them, to allow having fields outside any Panel:

Date
| -- User -- |
| First Name |
| Last Name  |
--------------
Price

@javiereguiluz
Copy link
Collaborator

In my private TODO list I had this "panel -> fieldset" renaming as a possible thing to do. I think this was a mistake ... so your message might be what I needed to finally do this change.

About closing panel, this was a conscious decision. Because of how we define design elements (and future elements that will be included "soon") it's better to not close elements explicitly.

What's the solution then? To open a new empty panel/fieldset:

yield Date
yield Panel('User')
yield FirstName
Yield LastName
yield Panel('')
yield Price

@javiereguiluz javiereguiluz added this to the 3.x milestone Sep 25, 2021
@javiereguiluz
Copy link
Collaborator

Closing as fixed in #5932.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants