-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Doubtful usage of <fieldset>
in dashboard show page
#2503
Comments
<fieldset>
in dashboard show pages<fieldset>
in dashboard show page
Oh! Yes, I totally agree. I do think a |
@nickcharlton Yep, I will work on it 😃. |
Hey 👋 From my standpoint, the
I'm asking because it breaks the styles of a theme plugin of mine 😅 and I have to introduce weird styles to handle a |
On #2504, we've got some questions around the semantically correct way to handle this on the show page. |
Hi @blocknotes and @nickcharlton, thanks for the follow up on this issue 😃. Unfortunately, it's been a while since I have last used Administrate and because of that I don't think I can consider myself comfortable enough to continue with the original PR that tried to fix this. Perhaps @blocknotes you may want to open a PR for the fix yourself and I'll close mine? |
Description
With Administrate v0.20.0, now it's possible to visually group together fields of the same model (introduced in this PR).
While I like the feature, I think that there is a small conceptual problem.
In both the
app/views/administrate/application/_form.html.erb
andapp/view/administrate/application/show.html.erb
a<fieldset>
element was introduced (indeed, in order to group fields together).However, most documentation (MDN, W3School, W3 says that this element "groups together element in a form"). With that being said, I really don't think this element should be used in the
show
view (while I totally agree with using it on the_form
partial).I am writing this also because I have noticed a strange problem on one of my current projects after this update to the
<fieldset>
in theshow
view, that occurs when one of the fields contain an horizontal scrollbar.Show page before the change:
As you see, everything is properly aligned.
Show page after the change:
Layout is completely broken (I had to zoom out a lot in order to see the actual fields). The layout is fixed if the
<fieldset>
element is replaced with a generic container, like a<div>
or<section>
.I would thus propose to replace the
<fieldset>
element inapp/view/administrate/application/show.html.erb
with a simple container (either<div>
or<section>
) and style it similar to a<fieldset>
.Versions
The text was updated successfully, but these errors were encountered: