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 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

@kdambekalns kdambekalns self-requested a review October 22, 2019 15:45
@bwaidelich bwaidelich changed the title BUGFIX: Custom Route for node preview FEATURE: Custom Route for node preview Nov 28, 2019
@bwaidelich bwaidelich marked this pull request as ready for review November 28, 2019 14:39
@davidspiola davidspiola self-requested a review December 1, 2019 21:16
Copy link
Contributor

@davidspiola davidspiola left a comment

Choose a reason for hiding this comment

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

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
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
Copy link
Member Author

@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
Copy link
Contributor

@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
Copy link
Contributor

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 markusguenther left a comment

Choose a reason for hiding this comment

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

Works like charm 🎉

@davidspiola davidspiola self-requested a review December 2, 2019 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't use Frontend Routing for the backend preview
3 participants