-
Notifications
You must be signed in to change notification settings - Fork 31
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
Issues/618 htl server #624
Conversation
…h common-lang dependency. Also frontend-maven-plugin (node) was failing, but not sure what it does for server/ui.apps. Commenting out for now, also the module to build, install and deploy to Sling
Fix NPE due to incorrect the init method local variable 'resource' overriding instance property
…mple vue site can have new page without errors. Added TODO comments about nav and footer for these sites
…nderserver/components. Adjusted PageRenderServerConstants.java and /content/pagerenderserver/ paths accordingly
…tion (AdaptTo) for per:Page and per:Asset types; and their ability to get the correct per:Site resource as implemented in PerBaseImpl.java
…. Refactored Helper.java to allow siteCSS to exist under per:Site/jcr:content
…e pagerenderer/server module, it may be useful to continue support the npm build processes. this commit updates a few deps to keep updated with the other modules. may be necessary to mvn clean -PcleanNodeModules or reinstall via npm i.
…rning a list of resources coming either from the template or the page content.
…g merged resources as htl
…elpers alike. Refactored PageHelper Use class to extend BaseHelper
…ed PageHelper to use getters instead of direct access
Please merge this part to develop-sling12. I plan to move attention to the authoring side tickets for SSR. This PR adds solutions to the bullet points listed in the description. I don't like building for weeks & months on one branch only to face nasty merge conflicts in the end. |
@cmrockwell since you are changing the page merger here - does this have any impact on the overall vue js renderer? Can you explain what is changing in the data.json output due to the change of the merger? |
There's no impact to Vue JS (data.json) rendering. The changes I'm making to PageMerge.java are to support a new method |
…riptHelper is null, then it will try to get the modelFactory from the bindings, which is added by the Adaption Jtest adds it. Use classes have bindings such as resource. Getting the resource from the request was problematic for testing, it is easier to test if PageMaerg.java uses the resource reference from the bindings, and not the reference attached to the request
…d to use resource from the bindings and not a reference through the request
…st whether getMergedResources properly merges template content with page content for HTL rendering
…the serverSide property. if it exists and is true, then load the page. Otherwise proceed with clientside rendering.
Based on the discussion in the water cooler meeting, I reviewed and tested the changes again. |
@cmrockwell I think this is a very valuable addition to peregrine and should be merged and in my opinion it should not be kept on a fork. |
…ingjunit.core pom.xml files
@cmrockwell was testing peregrine a bit with the server side rendered PR in it - looks nice :-) got a couple of questions:
I also took the liberty to
|
Here's a refresher about the /apps/nt/unstructured addition. It helps render the container that came from template, to which an editor added components. This page is an example It uses template This template has the container but no other content When an editor creates and edits a page using this template (like a text component) Then the intermediate paths for the container become nt:unstructured within the page's content And since there is currently no html rendering for nt:unstructured, we decided to implement that instead of adding resourceTypes for the intermediate containers. |
….apps rider Helper.java (replaced with models), added image logo, updated base.html
…ine-cms into issues/618-htl-server
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.
approving this - we can deal with issues that may come up because of this PR later
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.
Some small changes requested 🚀
pagerenderer/server/core/src/main/java/com/peregrine/pagerender/server/models/NavModel.java
Show resolved
Hide resolved
pagerenderer/server/ui.apps/src/main/content/jcr_root/content/pagerenderserver/.content.xml
Show resolved
Hide resolved
samples/example-vue-site/core/src/main/java/com/example/site/models/NavModel.java
Outdated
Show resolved
Hide resolved
samples/example-vue-site/core/src/main/java/com/example/site/models/NavModel.java
Outdated
Show resolved
Hide resolved
...gjunit.parent/core.remote/src/main/java/com/peregrine/slingjunit/author/PermissionJTest.java
Outdated
Show resolved
Hide resolved
…data property in peregrineApp.js, remove commented and unused lines from NavModel.java, use the common pattern for public static final String" "
// } else { | ||
processLoadedContent(response.data, path, firstTime, fromPopState) | ||
// } | ||
if (response.hasOwnProperty('data') && response.data.serverSide === true) { |
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.
👍
could have just used response.data && ...
but doesn't really matter
Notable changes presented by this PR
pagerender/server
to parent pom.xml. This will allow the server side HTL module to compile as a reactor module. Without a theme installed, users cannot create new sites. It allows the work to be safely merged to develop-sling12 without impacting rendering stylesIntroduces a concept of components allowed by templates(this change is coming in a separate pr)This PR relates to issues #618 #624 #621 #620