Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DropDownBox height auto resizing (T685238) #6317

Closed

Conversation

alexander-kotov-dx
Copy link
Contributor

No description provided.

Copy link
Contributor

@mrjohn0011 mrjohn0011 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some questions without an answer in this PR

js/ui/popup.js Outdated
},

_renderAutoResizableGeometry: function() {
this._toggleContentAutoResizableClass();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need this method? Can you insert this._toggleContentAutoResizableClass in the top of the renderGeometry method?

js/ui/popup.js Outdated
@@ -404,6 +407,7 @@ var Popup = Overlay.inherit({
var isFullscreen = this.option("fullScreen");

this._toggleFullScreenClass(isFullscreen);
this._toggleContentAutoResizableClass();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Render calls the _renderGeometry method. This call can be in the top of the renderGeometry

js/ui/popup.js Show resolved Hide resolved
@@ -413,6 +416,18 @@ var Popup = Overlay.inherit({
.toggleClass(POPUP_NORMAL_CLASS, !value);
},

_shouldUseContentAutoResizableClass() {
if(this.option("height") !== "auto" || this.option("shading") || this.option("fullScreen") || this.option("showTitle") || this._getToolbarItems("bottom").length) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the popup should not be auto-resized if shading/showTitle/bottom toolbar is enabled? I think it is good when the dxPopup will be resized in all cases when the user sets the auto height

return false;
}

return this.option("useAutoHeightWithLimits");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should write a test for each case that could be broken if we will remove this option. Maybe this will not be a breaking change and all cases are expected.

flex-direction: row;
}

.dx-overlay-content {
Copy link
Contributor

@mrjohn0011 mrjohn0011 Dec 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the fix work without .dx-overlay-content css?
The possibility to move this css to the Overlay level should also be checked

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the ".flex-container" mixin instead of this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsdmitry Why?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

display: flex;
flex-direction: row;

Everything this has inside the flex-container mixin which supports flex styles with other prefixes (browsers compatibility)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsdmitry We already have autoprefixer for browsers compatibility

@@ -413,6 +416,18 @@ var Popup = Overlay.inherit({
.toggleClass(POPUP_NORMAL_CLASS, !value);
},

_shouldUseContentAutoResizableClass() {
if(this.option("height") !== "auto" || this.option("shading") || this.option("fullScreen") || this.option("showTitle") || this._getToolbarItems("bottom").length) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(this.option("height") !== "auto" || this.option("shading") || this.option("fullScreen") || this.option("showTitle") || this._getToolbarItems("bottom").length) {
return this.option("height") === "auto" && !this.option("fullScreen");


.dx-overlay-content {
display: flex;
position: relative;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
position: relative;
flex-direction: column;

flex: 1 1 auto;
min-height: 0;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
.dx-popup-title, .dx-popup-bottom {
flex-shrink: 0;
}
}

@alexander-kotov-dx
Copy link
Contributor Author

The solution with flex styles has a lot of problems (especially in IE11). I try to use another way to solve the issue

@alexander-kotov-dx alexander-kotov-dx deleted the T685238_18_2 branch November 8, 2019 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants