Skip to content

[lexical-playground] Bug Fix: apply correct column headers when column contains vertically merged cells - #7273

Merged
etrepum merged 2 commits into
meta:mainfrom
rilrom:fix/7266
Mar 3, 2025
Merged

etrepum merged 2 commits into
meta:mainfrom
rilrom:fix/7266

Conversation

@rilrom

@rilrom rilrom commented Mar 2, 2025

Copy link
Copy Markdown
Contributor

Description

This PR:

  • updates toggleTableColumnIsHeader to ensure column headers are applied correctly.
  • creates assertTableHTML to allow legacy tables to be tested in regression tests.
  • updates a tables test to handle the new column header logic (we are now using recommended best practices for column headers with merged cells).

There is opportunity here to update toggleTableRowIsHeader to use similar logic to toggleTableColumnIsHeader for consistency if we deem it within the scope of this PR.

Closes #7266

Test plan

  1. Merge some cells vertically in a column.
  2. Toggle column header for that column.

Before

merged-column-header-issue.mp4

After

merged-column-header-fixed.mp4

@vercel

vercel Bot commented Mar 2, 2025 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 3, 2025 6:18am
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 3, 2025 6:18am

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 2, 2025
@etrepum etrepum added the extended-tests Run extended e2e tests on a PR label Mar 3, 2025
etrepum
etrepum previously approved these changes Mar 3, 2025

@etrepum etrepum left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to also fix the issue with toggleTableRowIsHeader in this PR please go ahead I will make sure it gets re-reviewed promptly, probably a bit more efficient than doing a separate PR. Otherwise I think this looks good and will merge tomorrow assuming tests are passing.

@etrepum etrepum left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, also confirmed it manually in the playground. Nice job!

@etrepum
etrepum added this pull request to the merge queue Mar 3, 2025
Merged via the queue into meta:main with commit 3ff6c0f Mar 3, 2025
@etrepum etrepum mentioned this pull request Mar 3, 2025

This branch was successfully deployed

2 active deployments
Preview – lexical-playground — 5946e982 Deployed Mar 3, 2025 by vercel[bot]
Preview – lexical — 5946e982 Deployed Mar 3, 2025 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: incorrect column headers being applied when selection contains merged cells

3 participants