Problem/Motivation

#3578398: Tabledrag styles in claro break expandable elements (Firefox) changed the height of table cells (td) to min-height. However, min-height does nothing for table cells:

In CSS 2.1, the effect of 'min-height' and 'max-height' on table cells, table rows, and row groups is undefined.

https://www.w3.org/Style/css2-updates/CR-CSS2-20090908-errata.html

Th regression was introduced in 10.6.12 / 11.4.0 / main.

Steps to reproduce

See /admin/reports/dblog

Before 10.6.12 / 11.4.0:

After 10.6.12 / 11.4.0:

Proposed resolution

Refactor the min-height css to it applies a minimum height

Remaining tasks

  1. Write a merge request
  2. Review
  3. Commit

User interface changes

Table cells have a minimum height (again)

Introduced terminology

None

API changes

None

Data model changes

None

Release notes snippet

Table cells have a minimum height (again)

Issue fork drupal-3608172

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

idebr created an issue. See original summary.

idebr’s picture

Issue summary: View changes

idebr’s picture

Status: Active » Needs review
Related issues: +#3578398: Tabledrag styles in claro break expandable elements (Firefox)

The merge request reverts the change introduced in #3578398: Tabledrag styles in claro break expandable elements (Firefox) and adds a proper fix for tabledrag content

smustgrave’s picture

Personally don’t think this is a regression and looks better as is

quietone’s picture

Title: [Regression introduced in 10.6.12 / 11.4.0 / main] Table cells have no more (min-)height » [Regression] Table cells have no more (min-)height
Issue summary: View changes

Changing title per Special titles.

smustgrave’s picture

Should this be tagged sub-maintainer for their input?

andy-blum’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new105.16 KB
new68.81 KB

This is a good improvement - I've tested to ensure table rows expand to accomodate long content entered directly into the cells and the expandable elements that were causing the original issue. This fix works in FF/Chrome/Safari. RTBC!

smustgrave’s picture

For the field table I agree probably want to revert

But for the content view and especially the dblog view the current (unintended) change think looks way cleaner

idebr’s picture

Claro has matured as a theme, so I would not expect any substantial changes at this point in time.

Perhaps the new Admin theme can use a more condensed row style?

smustgrave’s picture

That's a fair point. I'll think on it for opening a ticket on default_admin, maybe a "compact" feature.

miguelc303’s picture

I tested MR !16202 on Drupal 11.4.2 after upgrading from 11.3.13. The revert restores consistent row height/spacing on admin table listing pages (e.g. content types, blocks, menus), which matches the fix agreed on here for the table case.

nicxvan’s picture

@smustgrave do you mean support for https://git.drupalcode.org/project/drupal/-/blob/main/core/modules/syste... ?

Thank you for testing this @miguelc303

mherchel’s picture

This is looking perfect.

  • I was able to reproduce the problem on /admin/reports/dblog
  • I verified the fix actually fixed the problem
  • I tested the MR against the problem that the initial flawed fix resolved in #3578398: Tabledrag styles in claro break expandable elements (Firefox), which included testing the manage display tab of the field UI in Chrome, Firefox, and Safari.
  • I also checked against the Admin theme, and that did not have the problem.
  • Code looks good!

That's a fair point. I'll think on it for opening a ticket on default_admin, maybe a "compact" feature.

The Admin theme already has this feature! 🙌

mherchel’s picture

Title: [Regression] Table cells have no more (min-)height » Claro table cells should have minimum height

  • mherchel committed f80f6c21 on main
    fix: #3608172 [Regression] Claro table cells should have min-height
    
    By...
mherchel’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

Committed and pushed f80f6c21fd41becc8a2688a12027f7e96ac8af73 to main. Thanks!

  • mherchel committed 9c5b0092 on 11.x
    fix: #3608172 [Regression] Claro table cells should have min-height
    
    By...

  • mherchel committed 8eacb888 on 11.4.x
    fix: #3608172 [Regression] Claro table cells should have min-height
    
    By...
mherchel’s picture

The patch isn't applying cleanly to 10.6.x.

If someone wants to make a new MR for that (and test it out), I'd be happy to backport it there.

idebr’s picture

The change did not apply cleanly to 10.6.x, because #3332683: Refactor Claro's tabledrag stylesheet was not backported to 10.6.x. I opened https://git.drupalcode.org/project/drupal/-/merge_requests/16634 with only the change to the tables component.

#3332683: Refactor Claro's tabledrag stylesheet changed .tabledrag-cell-content from display: table; to display: flex; that caused #3578398: Tabledrag styles in claro break expandable elements (Firefox). As a result, the tabledrag component does not need to be fixed in 10.6.x.

  • mherchel committed 3070ec93 on 10.6.x
    fix: #3608172 Claro table cells should have minimum height
    
    By: idebr
    By...
mherchel’s picture

Status: Patch (to be ported) » Fixed

Thanks! Ported to 10.6.x

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.