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

Enabled state change should fire on attach and detach. #3867

Merged
merged 5 commits into from
Apr 12, 2018

Conversation

caalador
Copy link
Contributor

@caalador caalador commented Apr 12, 2018

method should also check if the enabled state has actually
changed so we don't fire events when things stay the same.


This change is Reviewable

method should also check if the enabled state has actually
changed so we don't fire events when things stay the same.
@gilberto-torrezan
Copy link
Contributor

:lgtm:


Reviewed 4 of 4 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


a discussion (no related file):
This is super important for Grid, since it resets the DataCommunicator every time the method is called.


Comments from Reviewable

@Legioth
Copy link
Member

Legioth commented Apr 12, 2018

Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


flow-server/src/main/java/com/vaadin/flow/component/ComponentUtil.java, line 268 at r1 (raw file):

            boolean enabled) {
        component.onEnabledStateChanged(enabled);
        component.getChildren().forEach(child -> child.onEnabledStateChanged(

What about grandchildren?


flow-server/src/test/java/com/vaadin/flow/component/ComponentTest.java, line 1111 at r1 (raw file):

    @Test // 3818
    public void enabledStateChangeOnAttachCalledForParentState() {

Also test that the `disabled


Comments from Reviewable

@Legioth
Copy link
Member

Legioth commented Apr 12, 2018

flow-server/src/test/java/com/vaadin/flow/component/ComponentTest.java, line 1111 at r1 (raw file):

Previously, Legioth (Leif Åstrand) wrote…

Also test that the `disabled

I was trying to say that the attribute value should also be tested


Comments from Reviewable

@caalador
Copy link
Contributor Author

Review status: 0 of 4 files reviewed at latest revision, 2 unresolved discussions.


flow-server/src/main/java/com/vaadin/flow/component/ComponentUtil.java, line 268 at r1 (raw file):

Previously, Legioth (Leif Åstrand) wrote…

What about grandchildren?

Tested and work as they should.


flow-server/src/test/java/com/vaadin/flow/component/ComponentTest.java, line 1111 at r1 (raw file):

Previously, Legioth (Leif Åstrand) wrote…

I was trying to say that the attribute value should also be tested

Done.


Comments from Reviewable

@vaadin-bot
Copy link
Collaborator

SonarQube analysis reported 1 issue

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. INFO Element.java#L116: Do not forget to remove this deprecated code someday. rule

@gilberto-torrezan
Copy link
Contributor

:lgtm:


Reviewed 3 of 4 files at r2, 1 of 1 files at r3.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@gilberto-torrezan gilberto-torrezan merged commit 7e0838f into master Apr 12, 2018
@gilberto-torrezan gilberto-torrezan deleted the issues/3818_on_enabled_state_changed branch April 12, 2018 11:32
@pekam pekam added this to the 1.0.0.beta7 milestone Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants