Robin Ward
|
3cb0d27d38
|
DEV: Upgrade our widget handlebars compiler
Now supports subexpressions such as i18n and concat, plus automatic
attaching of widgets similar to ember.
|
2019-05-02 15:47:57 -04:00 |
|
Robin Ward
|
dd29af4475
|
REFACTOR: {{avatar}} and {{date}} helpers in vdom templates
This is a step towards a nicer flag display under posts.
|
2019-04-30 15:22:38 -04:00 |
|
Bianca Nenciu
|
5407036ef9
|
DEV: Run prettier. (#6420)
|
2018-09-21 11:02:23 +00:00 |
|
Robin Ward
|
0c84352386
|
Add support for transformations
|
2017-10-05 16:24:58 -04:00 |
|
Robin Ward
|
07d04aba1d
|
Support {{unless}} in virtual dom templates
|
2017-10-05 14:35:07 -04:00 |
|
Robin Ward
|
051b49efdb
|
FIX: Properly encode string literals in hbs compiler
|
2017-10-04 15:53:06 -04:00 |
|
Robin Ward
|
0caf6a0f7d
|
Support for HTML values in widget hbs templates
|
2017-09-29 09:56:14 -04:00 |
|
Robin Ward
|
df81d109e5
|
The ability to attach attrs when embedding widgets
|
2017-09-28 16:08:43 -04:00 |
|
Robin Ward
|
e980322ed6
|
Allow hbs widgets to access their parent state
|
2017-09-28 15:19:44 -04:00 |
|
Robin Ward
|
8c2d6118ff
|
Remove some of the last few fa-icon helpers
|
2017-09-14 11:20:36 -04:00 |
|
Robin Ward
|
cb56dcdf2e
|
FIX: Use proper iconNode when compiling virtual dom templates
|
2017-09-01 11:20:33 -04:00 |
|
Robin Ward
|
dffb1fc4ee
|
FEATURE: Use Glimmer compiler for widget templates
Widgets can now specify a template which is precompiled using Glimmer's
AST and then converted into our virtual dom code.
Example:
```javascript
createWidget('post-link-arrow', {
template: hbs`
{{#if attrs.above}}
<a class="post-info arrow" title={{i18n "topic.jump_reply_up"}}>
{{fa-icon "arrow-up"}}
</a>
{{else}}
<a class="post-info arrow" title={{i18n "topic.jump_reply_down"}}>
{{fa-icon "arrow-down"}}
</a>
{{/if}}
`,
click() {
DiscourseURL.routeTo(this.attrs.shareUrl);
}
});
```
|
2017-09-01 09:28:16 -04:00 |
|