Skip to content

feat: Remaining formatting toolbar component tests - #3466

Open
matthewlipski wants to merge 1 commit into
link-toolbar-a11y-testfrom
formatting-toolbar-a11y-test-2
Open

matthewlipski wants to merge 1 commit into
link-toolbar-a11y-testfrom
formatting-toolbar-a11y-test-2

Conversation

@matthewlipski

@matthewlipski matthewlipski commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This PR adds tests for formatting toolbar items that weren't present in #3177, as that PR only tested the ones for inline text formatting. This PR adds tests for all items related to:

  • Comments
  • File blocks
  • Table cells

Rationale

This is the next step for implementing our new component/a11y testing setup for all UI components.

Changes

See above.

Impact

N/A

Testing

See above.

Screenshots/Video

N/A

Checklist

  • Code follows the project's coding standards.
  • Unit tests covering the new feature have been added.
  • All existing tests pass.
  • The documentation has been updated to reflect the new feature

Additional Notes

N/A

Summary by CodeRabbit

  • Tests
    • Expanded browser coverage for comment, file, and table-cell toolbar actions, including when controls appear, how they behave in read-only states, and whether edits preserve unrelated content.
    • Added checks for accessibility, keyboard focus and activation, popup behavior, and focus return to the editor.

@vercel

vercel Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
blocknote Error Error Dec 2, 2026 6:21pm UTC
blocknote-website Ready Ready Preview Dec 2, 2026 6:21pm UTC

Request Review

@matthewlipski
matthewlipski added this pull request to stack #3468 December 2, 2026 17:55
@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

This PR adds browser tests for comment, file, and table-cell-merge toolbar buttons. The tests cover visibility, interactions, accessibility, and keyboard behavior. The browser test configuration registers the new tests and prebundles @y/y.

Changes: Formatting toolbar browser coverage

Layer / File(s) Summary
Comment buttons and browser test setup
packages/react/src/components/FormattingToolbar/DefaultButtons/AddCommentButton.browser.test.tsx, packages/react/src/components/FormattingToolbar/DefaultButtons/AddTiptapCommentButton.browser.test.tsx, tests/vite.config.browser.ts
Adds tests for comment-button visibility, pending-comment actions, accessibility, and keyboard use. Registers the tests and adds @y/y to Vite’s prebundle dependencies.
File toolbar actions
packages/react/src/components/FormattingToolbar/DefaultButtons/File*Button.browser.test.tsx
Adds tests for caption, delete, download, rename, and replace actions. Tests cover visibility, document updates, accessibility, and keyboard interactions.
Table-cell merge button
packages/react/src/components/FormattingToolbar/DefaultButtons/TableCellMergeButton.browser.test.tsx
Adds tests for merge-button visibility, cell merging, accessibility, and keyboard interactions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Possibly related issues

Possibly related PRs

Suggested reviewers: nperez0111

Merge Risk: Minimal · up to a21f5

This change only adds component and accessibility tests for formatting toolbar buttons and registers them in the browser test configuration. It does not alter shipped behavior, and no actionable merge-blocking risk was found.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Description check Inconclusive The description states that the PR adds tests for the formatting toolbar items for comments, file blocks, and table cells that were not covered by #3177. It gives a rationale tied to the component and… Complete the template so a reviewer can decide without opening every file. Remove the HTML comment placeholders. Under Summary, state the feature in one or two sentences. Under Rationale, explain why these tests matter, for example to exten…
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title "feat: Remaining formatting toolbar component tests" matches the main change. The PR adds browser tests for formatting toolbar buttons for comments, file blocks, and table cell merge, which …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "feat: Remaining formatting toolbar component tests" matches the main change. The PR adds browser tests for formatting toolbar buttons for comments, file blocks, and table cell merge, which the title describes. It is short and specific, and it names the test scope that follows from #3177.

Full details: Description check

Explanation

The description states that the PR adds tests for the formatting toolbar items for comments, file blocks, and table cells that were not covered by #3177. It gives a rationale tied to the component and accessibility testing setup, and the checklist marks code standards, unit tests, and passing tests. The template placeholders for Summary, Rationale, Changes, Impact, Testing, Screenshots, and Additional Notes remain unfilled or only say 'See above' or 'N/A'. The Changes and Testing sections do not list the nine test files or describe how they were run. The documentation checklist item is unchecked.

Resolution

Complete the template so a reviewer can decide without opening every file. Remove the HTML comment placeholders. Under Summary, state the feature in one or two sentences. Under Rationale, explain why these tests matter, for example to extend the component and accessibility test coverage started in #3177. Under Changes, list the nine added or changed test files and the vite.config.browser.ts update, including the new @y/y entry in optimizeDeps.include. Under Testing, name the command used to run the browser tests and state whether they pass. Under Impact, state whether the change affects runtime code or only tests. Under Additional Notes, explain the skipped tests and the interface augmentation for testComments.addPendingComment, and confirm whether documentation changes are needed. Mark the documentation checklist item or explain why it does not apply.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks each button’s place
Then tests its keys at hopping pace
The file blocks keep their contents true
The table cells merge into view
Comments await a selected line

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9294eb12-31a4-4956-ac09-25dc32228241
Commits

Reviewing files that changed from the base of the PR and between d062855 and a21f5b8.

Files selected for processing: 9

  • packages/react/src/components/FormattingToolbar/DefaultButtons/AddCommentButton.browser.test.tsx
  • packages/react/src/components/FormattingToolbar/DefaultButtons/AddTiptapCommentButton.browser.test.tsx
  • packages/react/src/components/FormattingToolbar/DefaultButtons/FileCaptionButton.browser.test.tsx
  • packages/react/src/components/FormattingToolbar/DefaultButtons/FileDeleteButton.browser.test.tsx
  • packages/react/src/components/FormattingToolbar/DefaultButtons/FileDownloadButton.browser.test.tsx
  • packages/react/src/components/FormattingToolbar/DefaultButtons/FileRenameButton.browser.test.tsx
  • packages/react/src/components/FormattingToolbar/DefaultButtons/FileReplaceButton.browser.test.tsx
  • packages/react/src/components/FormattingToolbar/DefaultButtons/TableCellMergeButton.browser.test.tsx
  • tests/vite.config.browser.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

@pkg-pr-new

pkg-pr-new Bot commented Dec 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/@blocknote/ariakit@3466

@blocknote/code-block

npm i https://pkg.pr.new/@blocknote/code-block@3466

@blocknote/core

npm i https://pkg.pr.new/@blocknote/core@3466

@blocknote/diagram-block

npm i https://pkg.pr.new/@blocknote/diagram-block@3466

@blocknote/mantine

npm i https://pkg.pr.new/@blocknote/mantine@3466

@blocknote/math-block

npm i https://pkg.pr.new/@blocknote/math-block@3466

@blocknote/react

npm i https://pkg.pr.new/@blocknote/react@3466

@blocknote/server-util

npm i https://pkg.pr.new/@blocknote/server-util@3466

@blocknote/shadcn

npm i https://pkg.pr.new/@blocknote/shadcn@3466

@blocknote/xl-ai

npm i https://pkg.pr.new/@blocknote/xl-ai@3466

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/@blocknote/xl-docx-exporter@3466

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/@blocknote/xl-email-exporter@3466

@blocknote/xl-multi-column

npm i https://pkg.pr.new/@blocknote/xl-multi-column@3466

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/@blocknote/xl-odt-exporter@3466

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/@blocknote/xl-pdf-exporter@3466

@blocknote/xl-typst-exporter

npm i https://pkg.pr.new/@blocknote/xl-typst-exporter@3466

commit: a21f5b8

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.2

QR code for preview link

🚀 View preview at
https://TypeCellOS.github.io/BlockNote/pr-preview/pr-3466/

Built to branch gh-pages at 2026-12-02 19:16 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

This branch had an error being deployed

1 failed and 1 active deployments
Preview – blocknote — a21f5b86 Deployed Dec 2, 2026 by vercel[bot]
Preview – blocknote-website — a21f5b86 Deployed Dec 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant