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

FEATURE: Custom Route for node preview #2654

Merged
merged 7 commits into from Dec 2, 2019

Conversation

@bwaidelich
Copy link
Member

bwaidelich commented Aug 23, 2019

Introduces a new Route /neos/preview that will be used for previewing/editing purposes in the content iFrame and to preview content that is not live or visible (yet).

Advantages

Greatly reduced amount of routing cache entries

Previously, URLs for nodes in the backend had the format <the/node/url/path>@<workspace-name>;<dimensions>
Thus leading to two routing cache entries (match & resolve) for each user, node & dimension combination.
With this change, there is only one route for those cases usinq query parameters to specify the node & context: /neos/preview?node=<the/node/url/path>@<workspace-name>;<dimensions>

Explicit preview action

With a custom action just for the preview scenario, we can remove a lot of special magic (like displaying hidden nodes, shortcut handling, ...) from the regular frontend rendering path

Faster backend navigation

Previously all links in the Backend triggered a redirect route, effectively resulting in two requests.

Basis for further improvements and simplifications

With a different route (and action) we could greatly simplify the code of the FrontendRoutePartHandler and make way for new features like partial matching (#780), multi-format-support (#870) dedicated workspace previews, ...

Note: This requires neos/neos-ui#2604 to work as expected

Resolves: #2653

Resolves: #2653
@kdambekalns kdambekalns self-requested a review Oct 22, 2019
@davidspiola davidspiola added this to In progress in Neos 5.1 & Flow 6.1 Release Board via automation Nov 7, 2019
@bwaidelich bwaidelich changed the title BUGFIX: Custom Route for node preview FEATURE: Custom Route for node preview Nov 28, 2019
bwaidelich added 3 commits Nov 28, 2019
..so that request patterns looking at the URL match it!
@bwaidelich bwaidelich marked this pull request as ready for review Nov 28, 2019
bwaidelich added 2 commits Nov 29, 2019
@bwaidelich bwaidelich moved this from In progress to Review in progress in Neos 5.1 & Flow 6.1 Release Board Nov 29, 2019
@bwaidelich bwaidelich removed this from Reviews needed in Neos 5.1 & Flow 6.1 Release Board Nov 30, 2019
@davidspiola davidspiola self-requested a review Dec 1, 2019
Copy link
Contributor

davidspiola left a comment

Could you pls rebase this PR to the lastest master. The page tree does not work with it in the current state. FYI: the page tree works in the current master

@bwaidelich

This comment has been minimized.

Copy link
Member Author

bwaidelich commented Dec 2, 2019

@davidspiola I merged the current master branch into my fork. But for me the backend currently doesn't load with latest master Update: I had frontendDevelopmentMode enabled - can reproduce this now and will take care!

If you test this, make sure to flush caches (also browser caches to remove session cookie) and to apply neos/neos-ui#2545

@bwaidelich

This comment has been minimized.

Copy link
Member Author

bwaidelich commented Dec 2, 2019

@davidspiola (and all) can you please test again now? It was the Neos.UI change that needed rebasing. I got confused so I created a new PR against master: neos/neos-ui#2604

@davidspiola

This comment has been minimized.

Copy link
Contributor

davidspiola commented Dec 2, 2019

@davidspiola (and all) can you please test again now? It was the Neos.UI change that needed rebasing. I got confused so I created a new PR against master: neos/neos-ui#2604

will do

@davidspiola

This comment has been minimized.

Copy link
Contributor

davidspiola commented Dec 2, 2019

Strange behavior, but might be totaly unrelated to you PR. If I navigate in the page tree I get 404 errors. Links within the website are working correctly. If I test with current master it work as expected.

Screenshot 2019-12-02 at 17 44 21

Copy link
Member

markusguenther left a comment

Works like charm 🎉

@davidspiola davidspiola self-requested a review Dec 2, 2019
@bwaidelich bwaidelich merged commit eccf0d3 into neos:master Dec 2, 2019
2 checks passed
2 checks passed
continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
bwaidelich added a commit to neos/neos-ui that referenced this pull request Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.