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

CHE-4379 Cannot reduce process panel size #4829

Merged
merged 9 commits into from
Apr 24, 2017
Merged

CHE-4379 Cannot reduce process panel size #4829

merged 9 commits into from
Apr 24, 2017

Conversation

vitaliy-guliy
Copy link
Contributor

@vitaliy-guliy vitaliy-guliy commented Apr 18, 2017

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.

@@ -41,6 +41,6 @@
*
* @param state the component state object
*/
void loadState(@NotNull JsonObject state);
void setState(@NotNull JsonObject state);
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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.

@codenvy-ci
Copy link

Build # 2456 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/2456/ to view the results.

Copy link
Contributor

@evidolob evidolob left a 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?

@codenvy-ci
Copy link

Build # 2482 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/2482/ to view the results.

@vitaliy-guliy vitaliy-guliy merged commit 261cb40 into master Apr 24, 2017
@vitaliy-guliy vitaliy-guliy deleted the CHE-4379 branch April 24, 2017 14:58
@riuvshin riuvshin added this to the 5.9.0 milestone Apr 24, 2017
@riuvshin riuvshin added the kind/bug Outline of a bug - must adhere to the bug report template. label Apr 24, 2017
@codenvy-ci
Copy link

Build # 2498 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/2498/ to view the results.

JPinkney pushed a commit to JPinkney/che that referenced this pull request Aug 17, 2017
* CHE-4379 Cannot reduce process panel size

* CHE-4379 Cannot reduce process panel size

* CHE-4379 Cannot reduce process panel size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants