You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR changes how styles are applied to formatting toolbar items. Previously, the styles relied on a .bn-toolbar ancestor. While the items are never really rendered outside the formatting toolbar (aside from in tests), we don't really gain anything from this vs giving the items a toolbar-specific class name instead. So this PR changes that:
Old:
.bn-toolbar > .bn-*
New:
.bn-toolbar-*
Rationale
This is a minor change, but a general rule of UI components is they should be as decoupled as possible from other components, and this change helps with that.
Changes
Added bn-toolbar-* class names to formatting toolbar items.
Updated toolbar item styles to not rely on .bn-toolbar.
Impact
N/A
Testing
Formatting toolbar item component tests have been updated to no longer render the item in a formatting toolbar.
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
Style
Toolbar buttons and dropdowns now use consistent toolbar-specific styling across formatting, link, comment, and file controls.
Toolbar styling is consistently applied across supported UI integrations, including Mantine, Shadcn, and Ariakit. Button actions and dropdown behavior remain unchanged.
Review was skipped as selected files did not have any reviewable changes.
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: 64b68f6d-b75a-4c64-b4fe-899328205d30
Commits
Reviewing files that changed from the base of the PR and between dd8bcfb and dd8bcfb.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
Toolbar controls and related styles now use toolbar-specific button and select classes across toolkit implementations, React components, and examples. Accessibility tests check individual controls. The editor font-family list is reformatted without changing its values or order.
Ariakit, Mantine, and Shadcn toolbar controls add toolbar-specific classes. Related styles target those classes, and select components merge the new classes with supplied classes.
React toolbar, link, and comment controls use toolbar-specific classes. Accessibility tests check controls individually. Example and AI toolbar integrations also use the updated classes.
This change moves toolbar item styling from ancestor selectors to item-specific classes across the Ariakit, Mantine and Shadcn toolkits and the React components. The built-in and documented custom toolbar items keep their styling, and no concrete regression was found. Merge risk is minimal.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "feat: Formatting toolbar styling scope" matches the main change. The PR moves formatting toolbar item styles from the .bn-toolbar ancestor selector to toolbar-specific bn-toolbar-* clas…
Description check
The description explains the change well. It gives the old and new selector patterns and the rationale for decoupling. The Changes and Testing sections are filled in. The Summary section still holds t…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "feat: Formatting toolbar styling scope" matches the main change. The PR moves formatting toolbar item styles from the .bn-toolbar ancestor selector to toolbar-specific bn-toolbar-* classes. The title is short and names the affected area. It does not say the change is a decoupling of styles, but that is a detail the title does not need to carry.
Full details: Description check
Explanation
The description explains the change well. It gives the old and new selector patterns and the rationale for decoupling. The Changes and Testing sections are filled in. The Summary section still holds the template's placeholder comment, and the Rationale section keeps its placeholder comment above the author's text. The Checklist leaves the unit-test and documentation items unchecked. The Impact section says N/A, but the change does alter selectors that other code may depend on. Most required content is present, so the check passes.
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.
A rabbit taps a toolbar key, New button classes hop in place. Selects wear their labels neatly, Tests inspect each control alone. The font list keeps its order, Then I nibble clover by the editor.
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: 2e0d04db-b08d-400c-b087-c8440ae8c9ed
Commits
Reviewing files that changed from the base of the PR and between 66f34b9 and dd8bcfb.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
I wonder whether we should do polymorphism or not & have bn-button & bn-toolbar-button I'm fine with keeping it simple but if for example you wanted a behavior like on hover of any button do some action, then it becomes harder to have to list bn-toolbar-button, bn-menu-button, bn-... etc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR changes how styles are applied to formatting toolbar items. Previously, the styles relied on a
.bn-toolbarancestor. While the items are never really rendered outside the formatting toolbar (aside from in tests), we don't really gain anything from this vs giving the items a toolbar-specific class name instead. So this PR changes that:Old:
New:
Rationale
This is a minor change, but a general rule of UI components is they should be as decoupled as possible from other components, and this change helps with that.
Changes
bn-toolbar-*class names to formatting toolbar items..bn-toolbar.Impact
N/A
Testing
Formatting toolbar item component tests have been updated to no longer render the item in a formatting toolbar.
Screenshots/Video
N/A
Checklist
Additional Notes
N/A
Summary by CodeRabbit