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

EZP-27501: use pjax as a pagelayout #21

Merged
merged 1 commit into from Jun 30, 2017

Conversation

bdunogier
Copy link
Member

@bdunogier bdunogier commented Jun 16, 2017

Implements EZP-27501
Status: ready for review

Configures src/bundle/Resources/views/pagelayout.html.twig as the global pagelayout for the admin_group siteaccess group. Core templates that use it, `such as content_edit.html.twig, will be rendered within the PJAX DOM and integrated in the Hybrid UI.

capture d ecran 2017-06-17 a 02 11 09

In addition, adds a PjaxResponseMatcher, used to detect PJAX responses by looking for <div data-name="html"> in the content. It allows to match requests that don't identify by the URI or by the PJAX header.

capture d ecran 2017-06-17 a 02 11 59

TODO

  • Find a better name for the pagelayout template
  • Add specs
  • Bonus: set the login pagelayout to pjax

@bdunogier bdunogier force-pushed the ezp27501-use_pjax_as_pagelayout branch from 7a64779 to 827c026 Compare June 17, 2017 12:48
@bdunogier bdunogier mentioned this pull request Jun 23, 2017
2 tasks
@bdunogier bdunogier force-pushed the ezp27501-use_pjax_as_pagelayout branch from 827c026 to e9d847b Compare June 26, 2017 08:23
@ezsystems ezsystems deleted a comment from ezrobot Jun 26, 2017
@bdunogier bdunogier force-pushed the ezp27501-use_pjax_as_pagelayout branch from d750253 to 31c333e Compare June 26, 2017 13:44
@ezsystems ezsystems deleted a comment from ezrobot Jun 26, 2017
@bdunogier bdunogier force-pushed the ezp27501-use_pjax_as_pagelayout branch from 31c333e to 486c2af Compare June 27, 2017 15:11
@ezsystems ezsystems deleted a comment from ezrobot Jun 28, 2017
@bdunogier bdunogier force-pushed the ezp27501-use_pjax_as_pagelayout branch from ebdb6a7 to a4d3280 Compare June 28, 2017 14:12
@ezsystems ezsystems deleted a comment from ezrobot Jun 28, 2017
@bdunogier bdunogier requested review from dpobel and glye June 28, 2017 14:16
Copy link
Member

@glye glye left a comment

Choose a reason for hiding this comment

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

FWIW

/**
* Matches a Pjax Http Response.
*/
interface PjaxResponseMatcher extends ResponseMatcherInterface
Copy link
Member

Choose a reason for hiding this comment

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

Why is one named -Interface and the other not?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah... 'cause I wanted ResponseMatcherInterface to be consistent with Symfony's RequestMatcherInterface. Do you see my dilemma ?

Copy link
Member

Choose a reason for hiding this comment

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

Let's follow the trend, and go for Facey McInterface-face.

Copy link
Contributor

@dpobel dpobel left a comment

Choose a reason for hiding this comment

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

+1 besides the default title comment.
not strictly part of this story, we should check why we have a blank page after login or when providing wrong credentials.

@@ -0,0 +1,15 @@
<div data-name="title">{% block title %}{{ title|default('hybrid pagelayout title') }}{% endblock %}</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

the default title should probably be an empty string

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed.

@bdunogier bdunogier force-pushed the ezp27501-use_pjax_as_pagelayout branch from a4d3280 to 0050219 Compare June 29, 2017 09:29
@bdunogier bdunogier merged commit 900b42c into master Jun 30, 2017
@bdunogier bdunogier deleted the ezp27501-use_pjax_as_pagelayout branch June 30, 2017 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants