fix: improve toolbar responsiveness#2761
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f42cfbffe
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
2347225 to
902a38a
Compare
|
@caio-pizzol @harbournick - please review and merge. |
caio-pizzol
left a comment
There was a problem hiding this comment.
@artem-harbour good direction on moving from CSS media queries to JS-driven compaction.
one blocking issue: the toolbar only recomputes on browser resize, not container resize — so side panels / layout changes leave it stale. reproduced: "Editing" button 387px outside the container. ResizeObserver fixes it.
also: the side-group check and the button-hiding check use different width sources, so they disagree under the default config. and the ticket asks for a regression test at the reproduction width — none added yet. left inline comments.
7ed6fdd to
35e1d40
Compare
35e1d40 to
d0d4abb
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
904baad to
74c412b
Compare
|
Note: Not sure why the test fails here, but locally it passes. |
8cb96c8 to
b1e4b6d
Compare
84a3f22 to
ab5227e
Compare
Adds boundary and lifecycle coverage for the responsive toolbar fix: - defaultItems.test.js: XL overflow cutoff (1429 vs 1430) and LG compact-class application (1280 vs 1281). - Toolbar.test.js: positive ResizeObserver branch (constructor, observe, disconnect on unmount). Moves vi.unstubAllGlobals into afterEach so the stub doesn't leak on a thrown assertion. - super-toolbar.test.js: getAvailableWidth branches on responsiveToContainer and falls back to 0 when no container is set. - responsive-container-overflow.spec.ts: fixes a latent selector bug. The original descendant query never matched (class lives on the ButtonGroup root, not a descendant) so the minWidth assertion silently passed on null. Now uses a compound selector and asserts both side groups compact.
caio-pizzol
left a comment
There was a problem hiding this comment.
hey @artem-harbour! thanks for addressing last round.
i pushed a follow-up commit with the missing tests and fixed a selector in the regression spec that was matching nothing.
lgtm once ci is green.
|
🎉 This PR is included in @superdoc-dev/react v1.2.0-next.40 The release is available on GitHub release |
|
🎉 This PR is included in vscode-ext v2.3.0-next.42 |
|
🎉 This PR is included in template-builder v1.6.0-next.5 The release is available on GitHub release |
|
🎉 This PR is included in esign v2.3.0-next.42 The release is available on GitHub release |
|
🎉 This PR is included in superdoc v1.28.0-next.5 The release is available on GitHub release |
|
🎉 This PR is included in superdoc-cli v0.8.0-next.5 The release is available on GitHub release |
|
🎉 This PR is included in superdoc-sdk v1.6.0-next.41 |
Linear: SD-2328
Improved responsiveness behavior relative to the container.