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

[4.x]: Entry Type field layout "Heading" border-top is unnecessary when it is first element in the layout #13308

Closed
chadcrowell opened this issue Jun 13, 2023 · 4 comments

Comments

@chadcrowell
Copy link

chadcrowell commented Jun 13, 2023

What happened?

Description

When a Heading UI element is added to a field layout, it has a top border. When the Heading is the first element in a field layout, the border and extra spacing around it becomes rather unnecessary. Shown here.

Steps to reproduce

  1. Create a field layout for an entry type
  2. Add a Heading UI element as the first element in the layout

Fix

Can you detect that the Heading UI element is the first element in the field layout, and if so, skip the border-top as well as extra spacing around it? It will condense the field layout a bit, and remove an unnecessary separator.

Craft CMS version

4.x

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@i-just
Copy link
Contributor

i-just commented Jun 13, 2023

Hi, thanks for reaching out. We already have that in place. The top border for the heading UI element won’t show if the heading is the first element in the tab. That said, if you have a conditional field above the heading and that conditional field is hidden, the heading is technically not the first element in the tab, so the border shows, like on the screenshot you shared.

We’ll discuss this internally.

@chadcrowell
Copy link
Author

Thank you. I found the issue - this is a field layout with the Title of the entry hidden, so the Title field is above the Heading UI element, but even though it is hidden, the border shows. I was able to fix by moving the hidden Title field elsewhere.

@i-just
Copy link
Contributor

i-just commented Jun 21, 2023

I just raised a PR which should also make the top border and extra padding not apply if the heading UI element is visually not the first element in the tab.

@brandonkelly
Copy link
Member

Craft 4.4.15 is out with a fix for this. Thanks for reporting!

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

No branches or pull requests

3 participants