Problem/Motivation

Olivero table styles are awkward when the table has a row header element. Also the last row border looks broken.

Steps to reproduce

Create an article node with this HTML:

<table>
    <thead>
        <tr>
            <th>
                Header
            </th>
            <th>
                Header
            </th>
            <th>
                Header
            </th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <th>
                Also header
            </th>
            <td>
                Content
            </td>
            <td>
                And more
            </td>
        </tr>
        <tr>
            <th>
                Also header
            </th>
            <td>
                Also content
            </td>
            <td>
                As well here
            </td>
        </tr>
        <tr>
            <th>
                Final header
            </th>
            <td>
                Final row
            </td>
            <td>
                And last cell
            </td>
        </tr>
    </tbody>
</table>

Proposed resolution

  1. Header cells in not the first row should not have the padding-bottom --sp set IMHO, this landing on the same line as the rest of the cells.
  2. Header cells in the last row of the table should not have the bottom border.

Remaining tasks

- Fix
- Review
- Commit

User interface changes

Before

before

After

after

API changes

None

Data model changes

None

Release notes snippet

None

Issue fork drupal-3420865

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

Gábor Hojtsy created an issue. See original summary.

gábor hojtsy’s picture

Issue summary: View changes

Gauravvvv made their first commit to this issue’s fork.

gauravvvv’s picture

Status: Active » Needs review
Rangaswini’s picture

Assigned: Unassigned » Rangaswini
nitin shrivastava’s picture

Status: Needs review » Needs work
Issue tags: +Needs issue summary update

Please mention steps to reproduce, currently, it is not clear where we can find them.

shweta__sharma’s picture

shweta__sharma’s picture

Issue summary: View changes
Issue tags: -Needs issue summary update
StatusFileSize
new1.4 MB

I have updated the IS and added STR but not sure how to make the first row and first column both headers. So I am not removing the STR tag.

shweta__sharma’s picture

Issue summary: View changes
shweta__sharma’s picture

Pushed the code for the alignment issue in table.

Thanks

gábor hojtsy’s picture

Issue summary: View changes
Issue tags: -Needs steps to reproduce

Creating a view to reproduce this is super complicated. I merely created a table in ckeditor. Added the resulting markup for easier testing into the issue summary.

gábor hojtsy’s picture

Issue summary: View changes
gábor hojtsy’s picture

Issue summary: View changes
shweta__sharma’s picture

Status: Needs work » Needs review

Updating the status needs review as nothing is left to do in this.

shweta__sharma’s picture

Assigned: Rangaswini » Unassigned
Rangaswini’s picture

Assigned: Unassigned » Rangaswini
Rangaswini’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new48.87 KB
new45.61 KB

Applied the patch and last row border is removed now but row alignment is still there, adding screenshots below

Rangaswini’s picture

Assigned: Rangaswini » Unassigned
shweta__sharma’s picture

Status: Reviewed & tested by the community » Needs work
shweta__sharma’s picture

Status: Needs work » Needs review
Rangaswini’s picture

Assigned: Unassigned » Rangaswini
Rangaswini’s picture

Assigned: Rangaswini » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new51.95 KB
new47.81 KB

LGTM, applied patch for removing padding which is causing issue for alignment and it is resolved now. Please refer screenshots

kanchan bhogade’s picture

StatusFileSize
new19.34 KB
new18.82 KB

Hi
Verified and tested MR !6566 on Drupal 11 for the Olivero theme
Applied patch successfully...

Testing Steps

  1. Install drupal version
  2. Install the Olivero theme and set it as the default
  3. Add table and check for last row border and row alignment
  4. Apply the patch and check for the same

Test Result:
The last row border is removed and the row alignment issue is fixed

Attaching screenshot for reference
RTBC+1

shweta__sharma’s picture

Issue summary: View changes
gábor hojtsy’s picture

The changes visually look good, thanks! I have no idea if this is the best way to implement them in Olivero's CSS :)

nod_’s picture

nod_’s picture

Status: Reviewed & tested by the community » Needs work

karanpagare made their first commit to this issue’s fork.

karanpagare’s picture

Status: Needs work » Needs review

Updated MR to use logical properties, can review.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs screenshots

As a UI change the proposed solution should have before/after screenshots in the issue summary (where its says TBD)

gauravvvv’s picture

Issue summary: View changes
Status: Needs work » Reviewed & tested by the community
Issue tags: -Needs screenshots
StatusFileSize
new348.17 KB

Added before and after patch screenshots. Changes looks good to me. Border bottom is removed, also alignment is fixed. Moving to RTBC.

nod_’s picture

Status: Reviewed & tested by the community » Needs work

Have a question about the vertical align change. It's pretty overkill. I think we should adjust the fontsize/padding of th in the table body instead. Like this we'll mess up layout for tables with cells that are not the same length and it could make them very hard to read.

gauravvvv’s picture

Status: Needs work » Needs review

Addressed feedback of #33, updated MR for same.

kanchan bhogade’s picture

StatusFileSize
new73.11 KB
new74.11 KB

Hi
I've tested the Updated MR- MR !6566 on Drupal version 11.x
The patch applied successfully...

Test Result:
Font size and padding of the table heading are updated and visually also looks good

attaching screenshots for reference

RTBC+1

Keeping in "Needs review" for code verification and more reviews

nod_’s picture

Status: Needs review » Needs work
Issue tags: +Needs subsystem maintainer review, +Needs issue summary update

need some validation from olivero maintainers for the size change.

Need to update the screenshots in the issue summary as well.

karanpagare’s picture

Updated as per @nod_ to use px instead of rem. Rest can be reviewed by Olivero maintainers as well.

karanpagare’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work

Before pinging the sub-maintainer moving to NW for the issue summary update

shweta__sharma’s picture

Issue summary: View changes
Status: Needs work » Needs review
Issue tags: -Needs issue summary update

Updated the screenshots in the IS

Thanks

pemanamgay’s picture

StatusFileSize
new37.24 KB
new45.3 KB

Here, I have checked MR !6566 and applied it successfully. It has cleanly removed the last row border from the table and the font size remains in pixels after applying the MR from @karanpagare. I'm attaching the screenshot for review

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new90 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

gauravvvv’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work

@Gauravvvv there was already a 11.x branch can you update that one please.

Binoli Lalani made their first commit to this issue’s fork.

binoli lalani’s picture

Status: Needs work » Needs review

Hello,

I resolved the conflicts of 6566 MR and hide 7718 MR.

Please review.

Thank you!

Binoli Lalani changed the visibility of the branch 3420865-Olivero-table-head to hidden.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new1.26 KB

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

ahsannazir made their first commit to this issue’s fork.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.