-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
CHE-4379 Cannot reduce process panel size #4829
Conversation
@@ -41,6 +41,6 @@ | |||
* | |||
* @param state the component state object | |||
*/ | |||
void loadState(@NotNull JsonObject state); | |||
void setState(@NotNull JsonObject state); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What reason for this renaming?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make names more clear for developer.
The StateComponent
interface has
JsonObject getState()
method and now it has setState
instead of loadState
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
according to JavaDoc Called when component should restore his state
. loadSatte more reasonable for me.
@evidolob your opinion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @vparfonov, in common case set
prefix used for setters, mutator method for object but that method doesn't has side effects. In this case we have huge side effects, so set
prefix is confusing, load
is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it changes the state, it sets a new state.
But it's not a problem to me to revert the method name.
Build # 2456 - FAILED Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/2456/ to view the results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vitaliy-guliy have you write tests to your fix?
Build # 2482 - FAILED Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/2482/ to view the results. |
Build # 2498 - FAILED Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/2498/ to view the results. |
* CHE-4379 Cannot reduce process panel size * CHE-4379 Cannot reduce process panel size * CHE-4379 Cannot reduce process panel size
What does this PR do?
Fix a bug with restoring dimensions when refreshing the browser.
The dimensions are set to default when the perspective was maximized before refreshing the browser.
What issues does this PR fix or reference?
#4379
Changelog
Fix a bug with restoring dimensions when refreshing the browser.