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
Conversation
f2681a4
to
913de31
Compare
913de31
to
aaa0983
Compare
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.
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 ?
Fixes #6972
aaa0983
to
c761d30
Compare
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.
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
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.
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
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.
Reviewable status: complete! all discussions resolved, 1 of 1 LGTMs obtained
@@ -263,6 +265,26 @@ public void modifyIndexHtml(Document document, VaadinRequest request) { | |||
document.body()::appendChild)); | |||
} | |||
|
|||
/** |
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.
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.
Dismissed @vaadin-bot from a discussion.
Reviewable status: complete! all discussions resolved, 1 of 1 LGTMs obtained
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.
Dismissed @vaadin-bot from a discussion.
Reviewable status: complete! all discussions resolved, 1 of 1 LGTMs obtained
Fixes #6972
This change is