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

CCDM: support @Push annotation #7239

Merged
merged 1 commit into from Jan 3, 2020
Merged

Conversation

platosha
Copy link
Contributor

@platosha platosha commented Dec 30, 2019

Fixes #6972


This change is Reviewable

@platosha platosha added the hilla Issues related to Hilla label Dec 30, 2019
@caalador caalador removed this from External Reviews in OLD Vaadin Flow ongoing work (Vaadin 10+) Jan 2, 2020
@platosha platosha changed the title --wip-- CCDM: support @Push annotation [skip ci] CCDM: support @Push annotation Jan 2, 2020
@platosha platosha marked this pull request as ready for review January 2, 2020 19:58
Copy link
Member

@manolo manolo left a comment

Choose a reason for hiding this comment

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

couple of tests broken and also needs rebasing

Reviewable status: 3 unresolved discussions, 0 of 1 LGTMs obtained (waiting on @platosha)


flow-client/src/main/resources/META-INF/resources/frontend/Flow.ts, line 185 at r1 (raw file):

      if (typeof pushScript === 'string') {
        await this.loadScript(pushScript);

this should be tested with intern


flow-server/src/main/java/com/vaadin/flow/server/AppShellRegistry.java, line 273 at r1 (raw file):

    public void modifyPushConfiguration(PushConfiguration pushConfiguration) {
        List<Push> pushAnnotations = getAnnotations(Push.class);
        if (pushAnnotations.size() > 1) {

This is never happening since the app shell class does not compiles with two @Push


flow-server/src/main/java/com/vaadin/flow/server/AppShellRegistry.java, line 280 at r1 (raw file):

            Push push = pushAnnotations.get(0);
            pushConfiguration.setPushMode(push.value());
            pushConfiguration.setTransport(push.transport());
  • if app-shell does not have any push configuration, it means that we take configuration for the current UI view, right?
  • what happens when navigating to a new view with different push configuration, is that valid?
  • does flow allow different @Push in multiple views with different properties ?

Copy link
Contributor Author

@platosha platosha left a comment

Choose a reason for hiding this comment

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

Reviewable status: 3 unresolved discussions, 0 of 1 LGTMs obtained (waiting on @manolo and @platosha)


flow-server/src/main/java/com/vaadin/flow/server/AppShellRegistry.java, line 273 at r1 (raw file):

Previously, manolo (Manuel Carrasco Moñino) wrote…

This is never happening since the app shell class does not compiles with two @Push

Copied after @BodySize, @Viewport, @PageTitle, they also have same checks and not repeatable.

Not sure, should we not check only for more than one @Push, but still check the other non-repeatable annotations?


flow-server/src/main/java/com/vaadin/flow/server/AppShellRegistry.java, line 280 at r1 (raw file):

Previously, manolo (Manuel Carrasco Moñino) wrote…
  • if app-shell does not have any push configuration, it means that we take configuration for the current UI view, right?
  • what happens when navigating to a new view with different push configuration, is that valid?
  • does flow allow different @Push in multiple views with different properties ?
  • yes
  • AFAIK @Push was not handled during navigation as of v14, so I didn’t introduce that handling either
  • AFAIK this is allowed, but only the one from initial view has effect

Copy link
Member

@manolo manolo left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 unresolved discussion, 0 of 1 LGTMs obtained (waiting on @platosha)


flow-client/src/main/resources/META-INF/resources/frontend/Flow.ts, line 185 at r1 (raw file):

Previously, manolo (Manuel Carrasco Moñino) wrote…

this should be tested with intern

It can be done in separated PR


flow-server/src/main/java/com/vaadin/flow/server/AppShellRegistry.java, line 273 at r1 (raw file):

Previously, platosha (Anton Platonov) wrote…

Copied after @BodySize, @Viewport, @PageTitle, they also have same checks and not repeatable.

Not sure, should we not check only for more than one @Push, but still check the other non-repeatable annotations?

ok, let remove in a separated PR

Copy link
Member

@manolo manolo left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! all discussions resolved, 1 of 1 LGTMs obtained

@@ -263,6 +265,26 @@ public void modifyIndexHtml(Document document, VaadinRequest request) {
document.body()::appendChild));
}

/**
Copy link
Collaborator

Choose a reason for hiding this comment

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

CRITICAL First sentence of Javadoc is incomplete (period is missing) or not present. rule

@vaadin-bot
Copy link
Collaborator

SonarQube analysis reported 1 issue

  • CRITICAL 1 critical

Watch the comments in this conversation to review them.

Copy link

@vlukashov vlukashov left a comment

Choose a reason for hiding this comment

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

Dismissed @vaadin-bot from a discussion.
Reviewable status: :shipit: complete! all discussions resolved, 1 of 1 LGTMs obtained

Copy link
Member

@manolo manolo left a comment

Choose a reason for hiding this comment

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

Dismissed @vaadin-bot from a discussion.
Reviewable status: :shipit: complete! all discussions resolved, 1 of 1 LGTMs obtained

@vlukashov vlukashov merged commit d42acad into ccdm Jan 3, 2020
@vlukashov vlukashov deleted the app/ccdm/feat-appshell-push branch January 3, 2020 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hilla Issues related to Hilla +0.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants