updated Claro theme renders badly for some content type edit forms

Created on 3 July 2023, over 1 year ago
Updated 6 April 2024, 7 months ago

Problem/Motivation

I just upgraded my site from Drupal 9.5.9 to 10.1.0. The migration broke one Claro-related issue on my site. Specifically, when users edit certain content types, the columnar layout that's supposed to appear doesn't work, which leads the input form to show up about 700px to the right, with a big whitespace along the left gutter. Oddly, it only happens for some content types, while many others are fine. I can't find any systematic difference between working and broken content types.

Steps to reproduce

Upgrade from 9.5.9 to 10.1 and edit an Article page.

Proposed resolution

I was able to compare the faulty portion of the code to code that was working in my 9.5.9 install, and from that generated the attached patch. That *seems* to fix things. But I have not tested the patch at all. In fact, I'm not even sure if patching Claro is an option--this is way outside my area of expertise. I'm including the patch only to show which region of the codebase seems to be where the issue lives.

🐛 Bug report
Status

Closed: duplicate

Version

10.1

Component
Claro 

Last updated 1 day ago

Created by

🇺🇸United States mefron

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @mefron
  • 🇫🇮Finland lauriii Finland

    Do you have any screenshots that would make it easier to visualize the reported bug?

  • 🇮🇳India hamid.ali

    I reproduced the issue on Drupal 10 and added one article and kept claro as a default theme. As mentioned when users edit certain content types, the columnar layout that's supposed to appear doesn't work. I edited the article content type and couldn't see any of the issues mentioned. I am attaching screenshots for the test and visualization I have made. It would be helpful if you can share some of the screenshots about the issue.

  • Status changed to Needs review over 1 year ago
  • Status changed to Postponed: needs info over 1 year ago
  • 🇺🇸United States smustgrave

    I'm not seeing this issue. But if it's a render issue I don't think solving it with CSS is the track we want to take.

  • 🇺🇸United States mefron

    I'm attaching a screenshot that shows an example of how the Article edit form looks in my D10 install, before applying any correction to the styling.

  • 🇯🇵Japan ulmeyda

    I had the same phenomenon and investigated it, and it collapses when the field size, such as TITLE, exceeds 111. In my case, I had set it at 255, so it collapsed significantly.
    I am attaching an image.

  • 🇺🇸United States amanire

    I'm experiencing this bug as well. If tracked this down to plain text fields with a Textfield size > 100. I was able to clearly reproduce this on a 1920 × 980px viewport size by:

    1. Creating a new content type with only a Title and Body field
    2. Going to "Manage form display" for the content type and changing the Title field Textfield widget "Textfield size" to "200"

    In fact, this can be achieved directly in the browser with developer tools by simply changing the size attribute directly to "200".

    It appears that the size attribute on the <input> element somehow overrides the max-width: 100% for .form-element causing the grid column width to expand accordingly. The text field itself does not expand.

    I've confirmed that this occurs in MacOS Brave, Safari and Firefox, so it is not browser-specific.

    In the attached screenshot, I've set the size attribute to "130" to show the impact on the layout of the secondary region on a viewport size of 1352 × 768px.

    I have a couple of workarounds, neither of which is satisfactory or generalizable:

    1. Add this CSS style rule, which sets all text fields to the maximum width of the content region:
      .form-element--type-text { width: 100% }
    2. Configure the Textfield size display to always be 100 or less.
  • Status changed to Active about 1 year ago
  • 🇺🇸United States amanire

    I'm experiencing this bug as well. If tracked this down to plain text fields with a Textfield size > 100.

    Noting that for text fields within collapsible form groups, this bug is perceptible for Textfield size > 87. I am pretty sure that this depends on the browser viewport size though. I am using 1352 × 768px in this case.

  • 🇳🇿New Zealand klidifia

    Please check issue 3381219 - it may be related and could solve this.

  • Status changed to Closed: duplicate about 1 year ago
  • 🇺🇸United States amanire

    Yes, thank you @klidifia! The patch in https://www.drupal.org/project/drupal/issues/3381219 🐛 Layout Issues with Claro theme Needs work resolved the issue that I described above and I'm pretty sure is what the original reporter identified. I'm going to mark this as a duplicate to drive others to that issue since it has more followers and is patched, even though I think the title for this issue might be more appropriate.

  • 🇨🇦Canada paintingguy

    Hi everyone, I'm having a similar issue after upgrading D9 to D10 with Claro. I cannot see messages background text. Please see image example

  • 🇨🇦Canada paintingguy

    Resolved. Like a dummy I had /admin/config/development/bootstrap_library All themes except those listed "checked" . Changed: Only the listed themes I wanted selected and the issue was resolved.

Production build 0.71.5 2024