mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
2231dd84c2
no issue
Ember is migrating to `<AngleBracketSyntax />` for component invocation, see https://github.com/emberjs/rfcs/blob/master/text/0311-angle-bracket-invocation.md
We were in a half-way situation where some templates used angle bracket syntax in some places, this PR updates templates to use the syntax everywhere.
This simplifies the rules for what template code is referring to...
`<Component>` = a component
`{{helper}}` = a helper (or locally assigned handlebars variable)
`{{this.foo}}` = data on the template backing context (a component/controller)
`{{@foo}}` = a named argument passed into the component that the component backing class has not modified (note: this commit does not introduce any named arguments)
- ran codemod https://github.com/ember-codemods/ember-angle-brackets-codemod on the following directories:
- `app/templates`
- `lib/koenig-editor/addon/templates`
- removed positional params from components as angle bracket syntax does not support them
- `gh-feature-flag`
- `gh-tour-item`
- `gh-cm-editor`
- `gh-fullscreen-modal`
- `gh-task-button`
- updates some code that was missed in 3c851293c1
to use explicit this
14 lines
810 B
Handlebars
14 lines
810 B
Handlebars
{{#if this.showButton}}
|
|
<button class="koenig-plus-menu-button flex justify-center items-center relative w9 h9 ba b--midlightgrey-l2 bg-white br-100 anim-normal" onclick={{action "openMenu"}}>{{svg-jar "plus" class="w4 h4 stroke-middarkgrey i-strokew--2"}}</button>
|
|
{{/if}}
|
|
|
|
{{#if this.showMenu}}
|
|
{{!-- TODO: restructure HTML and update kg-style helper to avoid negative margins on divider/title elements --}}
|
|
<div class="{{kg-style "cardmenu"}} pa0">
|
|
{{!-- <div class="koenig-cardmenu-search">
|
|
{{svg-jar "koenig/search"}}
|
|
<input type="text" placeholder="Search for a card..." class="gh-input koenig-cardmenu-search-input">
|
|
</div> --}}
|
|
<KoenigMenuContent @itemSections={{this.itemSections}} @itemClicked={{action "itemClicked"}} />
|
|
</div>
|
|
{{/if}} |