Robin Ward
b2b7afd310
Rename the server side widget hbs compiler
2020-03-27 12:06:14 -04:00
Robin Ward
eaa324ecbd
Revert "Move the widget-hbs compiler to js from es6"
...
This reverts commit 5d66a2c16e
.
2020-03-25 16:13:26 -04:00
Robin Ward
5d66a2c16e
Move the widget-hbs compiler to js from es6
2020-03-25 15:03:21 -04:00
Sam Saffron
30990006a9
DEV: enable frozen string literal on all files
...
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.
Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
David Taylor
9248ad1905
DEV: Enable Style/SingleLineMethods
and Style/Semicolon
in Rubocop ( #6717 )
2018-12-04 11:48:13 +08:00
Robin Ward
77ba265c07
FIX: Linting errors in Ruby
2017-09-01 13:34:45 -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