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: consider @PWA annotation when clientSideMode #7063

Merged
merged 4 commits into from Dec 2, 2019

Conversation

manolo
Copy link
Member

@manolo manolo commented Nov 29, 2019

Fixes #6533

This should not be merged until the target branch PR #7050 has been merged. Then this needs to be re-targeted to cdm


This change is Reviewable

@manolo manolo added the hilla Issues related to Hilla label Nov 29, 2019
@manolo manolo self-assigned this Nov 29, 2019
@manolo manolo force-pushed the mcm/ccdm/pwa-annotation branch 3 times, most recently from 6b22d10 to f4b2fa9 Compare November 29, 2019 08:32
@manolo manolo closed this Nov 29, 2019
OLD Vaadin Flow ongoing work (Vaadin 10+) automation moved this from External Reviews to Done - pending release Nov 29, 2019
@manolo manolo reopened this Nov 29, 2019
@manolo manolo changed the base branch from mcm/ccdm/app-shell to ccdm November 29, 2019 12:12
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.

Reviewed 6 of 6 files at r1, 1 of 1 files at r2.
Reviewable status: 1 unresolved discussion, 0 of 1 LGTMs obtained (waiting on @manolo and @platosha)

a discussion (no related file):
I am concerned about the dependency graph that we are creating here.
Ideally, I'd like to move towards separating stateful Flow parts, and stateless Connect parts apart. This implementation encourages re-using parts of the stateful BootstrapHandler class in the stateless IndexHtmlRequestHandler class (see the discussion in Slack: https://vaadin.slack.com/archives/CFP1FJHDH/p1575027106067800?thread_ts=1573646642.024900&cid=CFP1FJHDH)

I am also concerned about having two separate 'registry' classes: VaadinAppShellRegistry for @Meta, @Inline, @BodySize, Viewport etc, and PwaRegistry for @PWA. I would prefer to have a single registry class, with a single modifyIndexHtmlResponse() method that applies modifications from all annotations (including the PWA-related features). Sure, the class itself may (and should) have modular structure with separate handlers for each annotation type.

However, I do not see obvious steps to change this PR to address these concerns. That's why this comment is only for information (non-blocking).

@manolo, do you see any ways how this PR can feasibly be changed to better fit the LT vision?


OLD Vaadin Flow ongoing work (Vaadin 10+) automation moved this from Done - pending release to Reviewer approved Nov 29, 2019
Copy link
Member Author

@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 @manolo and @platosha)

a discussion (no related file):

Previously, vlukashov (Viktor Lukashov) wrote…

I am concerned about the dependency graph that we are creating here.
Ideally, I'd like to move towards separating stateful Flow parts, and stateless Connect parts apart. This implementation encourages re-using parts of the stateful BootstrapHandler class in the stateless IndexHtmlRequestHandler class (see the discussion in Slack: https://vaadin.slack.com/archives/CFP1FJHDH/p1575027106067800?thread_ts=1573646642.024900&cid=CFP1FJHDH)

I am also concerned about having two separate 'registry' classes: VaadinAppShellRegistry for @Meta, @Inline, @BodySize, Viewport etc, and PwaRegistry for @PWA. I would prefer to have a single registry class, with a single modifyIndexHtmlResponse() method that applies modifications from all annotations (including the PWA-related features). Sure, the class itself may (and should) have modular structure with separate handlers for each annotation type.

However, I do not see obvious steps to change this PR to address these concerns. That's why this comment is only for information (non-blocking).

@manolo, do you see any ways how this PR can feasibly be changed to better fit the LT vision?

well, actually IndexHtmlRequestHandler is coupled to BootstrapHandler because one extends another but index handler does not do any call to the instance of regular bootstrap, just share code.

At some point we should simplify bootstrap and extract all share stuff to a utility class, but I think it should be done when removing bower.

PwaRegistry is needed because it's used by servlets in order to dispatch manifest, icons and serviceworker requests.

When we have our own implementation of PWA where everything is is static in frontend or webapp folders I would think on not depending on this.


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.

:lgtm:

Reviewed 1 of 1 files at r3.
Reviewable status: 1 unresolved discussion, 1 of 1 LGTMs obtained (waiting on @manolo and @platosha)

- Added IT for PWA in regular java web project
- Added IT for PWA and Meta in spring project
- Adjust IT spring project dependencies
- Added log line informing which app-shell is used in the app
@vaadin-bot
Copy link
Collaborator

SonarQube analysis reported 4 issues

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. MAJOR VaadinAppShellInitializer.java#L84: Refactor this method to reduce its Cognitive Complexity from 17 to the 15 allowed. rule
  2. MINOR BootstrapHandler.java#L552: Remove this use of "BootstrapPageResponse"; it is deprecated. rule
  3. MINOR BootstrapHandler.java#L552: Remove this use of "BootstrapPageResponse"; it is deprecated. rule
  4. MINOR BootstrapHandler.java#L556: Remove this use of "modifyBootstrapPage"; it is deprecated. rule

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.

Reviewed 6 of 6 files at r4.
Reviewable status: all discussions resolved, 0 of 1 LGTMs obtained, and 1 stale (waiting on @platosha)

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.

:lgtm:

Reviewable status: :shipit: complete! all discussions resolved, 1 of 1 LGTMs obtained (waiting on @platosha)

@manolo manolo merged commit 5728879 into ccdm Dec 2, 2019
OLD Vaadin Flow ongoing work (Vaadin 10+) automation moved this from Reviewer approved to Done - pending release Dec 2, 2019
@manolo manolo deleted the mcm/ccdm/pwa-annotation branch December 2, 2019 09:41
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
OLD Vaadin Flow ongoing work (Vaadin ...
  
Done - pending release
Development

Successfully merging this pull request may close these issues.

None yet

3 participants