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
{{ message }}
Repository navigation
Keep the Ariakit comment toolbar reachable in narrow sidebars - #3469
In a 360px comments sidebar, the Ariakit reply toolbar is 472px wide. Selecting reply text makes the whole sidebar scroll horizontally. In a right-hand sidebar the last two controls, Align right and Create link, can be clipped.
Position the toolbar against the viewport with Floating UI's fixed strategy. It stays attached to the selection and uses the existing comment editor portal. Refs #3437.
Testing
A browser regression checks that Create link receives pointer hits before a locator can scroll it into view. It failed on main and passed with this change in Chromium, Firefox and WebKit.
In the 360px example layout, all nine controls received pointer hits and the sidebar kept its original scroll width. The toolbar followed the reply offscreen when the sidebar scrolled. A separate new floating comment also kept all nine controls reachable in all three engines.
Ariakit builds and type-checks. The new test was green across all three engines. Across the sidebar, comment action and link button suites, 40 checks passed, 3 were expected failures and 11 failed on local WebKit. I ran the same cases on unmodified main and confirmed each of those 11 failures there.
Create link opened with the keyboard in all three engines and with a pointer in Chromium and Firefox. Local WebKit hit the button but did not show the link form. I reproduced that separately on unmodified main with a 680px sidebar where the button was already reachable.
Summary by CodeRabbit
Bug Fixes
Improved the comments formatting toolbar’s positioning, helping keep formatting controls accessible in narrow sidebars without horizontal overflow.
No actionable comments were generated in the recent review.
Walkthrough
The comments editor now configures its formatting toolbar to use fixed positioning. A browser test checks toolbar access and horizontal overflow in a 360px-wide Ariakit comments sidebar.
Changes: Comment toolbar positioning
Layer / File(s)
Summary
Fixed toolbar positioning and sidebar check packages/ariakit/src/comments/Editor.tsx, packages/react/src/components/Comments/ThreadsSidebar.browser.test.tsx
The editor passes strategy: "fixed" through floatingUIOptions. The browser test checks that the link button is visible and hit-testable without sidebar scrolling, and that the sidebar has no horizontal overflow.
This change keeps the comment formatting toolbar reachable in narrow sidebars by using fixed positioning, and it adds a regression test. No concrete merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: keeping the Ariakit comment toolbar reachable in narrow sidebars. The PR positions the toolbar with Floating UI's fixed strategy so it no longer widens the 360px sideb…
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.
Description check
The description follows the repository template. It has a clear Summary that explains the 360px sidebar clipping problem and the fixed-strategy fix, and it links issue #3437. It also has a Testing sec…
Full details: Title check
Explanation
The title names the main change: keeping the Ariakit comment toolbar reachable in narrow sidebars. The PR positions the toolbar with Floating UI's fixed strategy so it no longer widens the 360px sidebar's horizontal scroll area or clips the Align right and Create link controls. The title is specific and matches the objectives and the changed files.
Full details: Description check
Explanation
The description follows the repository template. It has a clear Summary that explains the 360px sidebar clipping problem and the fixed-strategy fix, and it links issue #3437. It also has a Testing section with concrete browser, layout, and engine results. The Rationale, Changes, Impact, Screenshots/Video, Checklist, and Additional Notes sections are missing or only implied. Those gaps are non-critical, so the description is mostly complete.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Fix failing CI checks
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 the toolbar bright, Fixed in place and clear in sight. The link button waits within reach, No sideways scroll to cross the beach. The sidebar keeps its borders neat.
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: 4f4a1178-94a2-4300-8b1f-43395f021786
Commits
Reviewing files that changed from the base of the PR and between f25b05d and 43d7cb3.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
This branch has not been deployed
No deployments
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
In a 360px comments sidebar, the Ariakit reply toolbar is 472px wide. Selecting reply text makes the whole sidebar scroll horizontally. In a right-hand sidebar the last two controls, Align right and Create link, can be clipped.
Position the toolbar against the viewport with Floating UI's fixed strategy. It stays attached to the selection and uses the existing comment editor portal. Refs #3437.
Testing
Create link opened with the keyboard in all three engines and with a pointer in Chromium and Firefox. Local WebKit hit the button but did not show the link form. I reproduced that separately on unmodified main with a 680px sidebar where the button was already reachable.
Summary by CodeRabbit