Toolbar: use transform-safe measurements for layout calculations (T1326396)#33236
Merged
EugeniyKiyashko merged 1 commit intoDevExpress:26_1from Apr 14, 2026
Conversation
d97cf8d to
cbef766
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR targets correct toolbar layout calculations when the toolbar’s parent is scaled via CSS transform, and adds a regression test for the reported issue (T1245421).
Changes:
- Added a QUnit regression test validating that toolbar label
max-widthremains stable undertransform: scale(). - Updated toolbar label width measurement helper usage in
ToolbarBase(and adjusted ESLint suppressions). - Removed an ESLint suppression near the timeout handle type declaration.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
packages/devextreme/testing/tests/DevExpress.ui.widgets/toolbar.tests.js |
Adds a regression test to ensure label max-width calculations are not affected by parent transform scaling. |
packages/devextreme/js/__internal/ui/toolbar/toolbar.base.ts |
Adjusts label width measurement helper usage and modifies ESLint suppression/annotations related to setTimeout and unsafe returns. |
Comments suppressed due to low confidence (1)
packages/devextreme/js/__internal/ui/toolbar/toolbar.base.ts:316
getRealLabelWidthstill relies ongetBoundingRect(label).width, butgetBoundingRectis implemented viaelement.getBoundingClientRect()(js/__internal/core/utils/m_position.ts:10-19), which is affected by CSS transforms likescale(). That can make toolbar label max-width calculations depend on transforms (the scenario covered by the new test) and also forces an@typescript-eslint/no-unsafe-returnsuppression becausegetBoundingRectis untyped. Consider switching this measurement to a transform-safe size helper (e.g.,getOuterWidth/getWidthbased onoffsetWidth) and/or tighteninggetBoundingRecttypings to avoid the lint disable.
}
_alignSectionLabels(
dmlvr
approved these changes
Apr 14, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.