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

Template events system - replace topbar with newly introduced events #10991

Merged
merged 3 commits into from
Jan 9, 2020

Conversation

pamil
Copy link
Contributor

@pamil pamil commented Dec 27, 2019

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Related tickets related to #10924
License MIT

@pamil pamil added the Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.). label Dec 27, 2019
@pamil pamil requested a review from a team as a code owner December 27, 2019 19:54
@pamil pamil changed the title [WIP] Template events system - replace topbar with newly introduced events Template events system - replace topbar with newly introduced events Dec 27, 2019
@@ -0,0 +1 @@
{{ sonata_block_render_event('sylius.shop.layout.after_security_widget') }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm thinking about the way to generalise these calls, creating a template for every legacy function call seems like an overkill.

@pamil pamil changed the title Template events system - replace topbar with newly introduced events [WIP] Template events system - replace topbar with newly introduced events Dec 27, 2019
currency_switcher:
template: "@SyliusShop/Block/Layout/_currencySwitcher.html.twig"
locale_switcher:
template: "@SyliusShop/Block/Layout/_localeSwitcher.html.twig"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need to figure out priorities for those blocks. Any ideas?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used the following conventions:

  • last meaningful block starts at priority: 10
  • other meaningful blocks are having a bigger priority than the last one by +10
  • legacy Sonata events are +5 / -5 (before / after) from the related meaningful block

@pamil pamil changed the title [WIP] Template events system - replace topbar with newly introduced events Template events system - replace topbar with newly introduced events Dec 31, 2019
@pamil pamil mentioned this pull request Jan 2, 2020
12 tasks
@pamil pamil merged commit 569e869 into Sylius:master Jan 9, 2020
@pamil pamil deleted the template-events/topbar branch January 9, 2020 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants