Skip to content

Commit be4bbc3

Browse files
committed
Portal.view.*: use text over html for vdom props where appropriate #6878
1 parent 64716f9 commit be4bbc3

13 files changed

Lines changed: 55 additions & 55 deletions

apps/portal/view/HeaderToolbar.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,23 +58,23 @@ class HeaderToolbar extends Base {
5858
iconCls: 'fa-brands fa-github',
5959
url : 'https://github.com/neomjs/neo',
6060
tooltip: {
61-
html : 'GitHub',
61+
text : 'GitHub',
6262
showDelay: 0,
6363
hideDelay: 0
6464
}
6565
}, {
6666
iconCls: 'fa-brands fa-slack',
6767
url : 'https://join.slack.com/t/neomjs/shared_invite/zt-6c50ueeu-3E1~M4T9xkNnb~M_prEEOA',
6868
tooltip: {
69-
html : 'Join Slack',
69+
text : 'Join Slack',
7070
showDelay: 0,
7171
hideDelay: 0
7272
}
7373
}, {
7474
iconCls: 'fa-brands fa-discord',
7575
url : 'https://discord.gg/6p8paPq',
7676
tooltip: {
77-
html : 'Join Discord',
77+
text : 'Join Discord',
7878
showDelay: 0,
7979
hideDelay: 0
8080
}

apps/portal/view/about/Container.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class Container extends Base {
2020
* @member {Object[]} items
2121
*/
2222
items: [{
23-
html: 'Meet the Team',
24-
tag : 'h1'
23+
tag : 'h1',
24+
text: 'Meet the Team'
2525
}, {
2626
module : MemberContainer,
2727
location : 'Germany',

apps/portal/view/about/MemberContainer.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class MemberContainer extends Container {
8080
if (value) {
8181
let item = this.items[1];
8282

83-
item.vdom.cn[1].cn[2].cn[1].html = value;
83+
item.vdom.cn[1].cn[2].cn[1].text = value;
8484
item.update?.()
8585
}
8686
}
@@ -95,7 +95,7 @@ class MemberContainer extends Container {
9595
if (value) {
9696
let item = this.items[1];
9797

98-
item.vdom.cn[1].cn[0].html = value;
98+
item.vdom.cn[1].cn[0].text = value;
9999
item.update?.()
100100
}
101101
}
@@ -145,7 +145,7 @@ class MemberContainer extends Container {
145145
if (value) {
146146
let item = this.items[1];
147147

148-
item.vdom.cn[1].cn[1].html = value;
148+
item.vdom.cn[1].cn[1].text = value;
149149
item.update?.()
150150
}
151151
}

apps/portal/view/examples/List.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ class List extends BaseList {
117117
{cls: ['neo-top-20'], cn: [
118118
{...me.createSourceLink(record)},
119119
{cls: ['neo-inner-content'], cn: [
120-
{cls: ['neo-inner-details'], html: record.browsers.join(', ')},
121-
{cls: ['neo-inner-details'], html: record.environments.join(', ')}
120+
{cls: ['neo-inner-details'], text: record.browsers.join(', ')},
121+
{cls: ['neo-inner-details'], text: record.environments.join(', ')}
122122
]}
123123
]}
124124
]}
@@ -137,8 +137,8 @@ class List extends BaseList {
137137
vdom = {
138138
tag : 'a',
139139
cls : ['neo-title'],
140-
cn : [{html: record.name.replace(List.nameRegEx, "$1")}],
141-
href: record.url
140+
href: record.url,
141+
text: record.name.replace(List.nameRegEx, '$1')
142142
};
143143

144144
// We can use a shorter syntax for pointing examples to neomjs.com, but not all examples have to be there.

apps/portal/view/home/ContentBox.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class ContentBox extends Base {
4646
*/
4747
afterSetContent(value, oldValue) {
4848
value?.forEach(item => {
49-
this.vdom.cn[1].cn.push({tag: 'li', html: item})
49+
this.vdom.cn[1].cn.push({tag: 'li', text: item})
5050
})
5151

5252
this.update()
@@ -59,7 +59,7 @@ class ContentBox extends Base {
5959
* @protected
6060
*/
6161
afterSetHeader(value, oldValue) {
62-
this.vdom.cn[0].html = value;
62+
this.vdom.cn[0].text = value;
6363
this.update()
6464
}
6565

apps/portal/view/home/FeatureSection.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class FeatureSection extends Container {
148148
* @protected
149149
*/
150150
afterSetHeadline(value, oldValue) {
151-
this.getItem('headline').html = value
151+
this.getItem('headline').text = value
152152
}
153153

154154
/**
@@ -171,7 +171,7 @@ class FeatureSection extends Container {
171171
* @protected
172172
*/
173173
afterSetParagraph(value, oldValue) {
174-
this.getItem('paragraph').html = value
174+
this.getItem('paragraph').text = value
175175
}
176176

177177
/**
@@ -181,7 +181,7 @@ class FeatureSection extends Container {
181181
* @protected
182182
*/
183183
afterSetSubHeadline(value, oldValue) {
184-
this.getItem('sub-headline').html = value
184+
this.getItem('sub-headline').text = value
185185
}
186186

187187
/**

apps/portal/view/home/FooterContainer.mjs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class FooterContainer extends Container {
3737
items: [{
3838
module: Component,
3939
cls : ['neo-h2'],
40-
html : 'Content',
41-
tag : 'h2'
40+
tag : 'h2',
41+
text : 'Content'
4242
}, {
4343
iconCls: 'fas fa-people-group',
4444
route : '/about-us',
@@ -64,8 +64,8 @@ class FooterContainer extends Container {
6464
items: [{
6565
module: Component,
6666
cls : ['neo-h2'],
67-
html : 'Community',
68-
tag : 'h2'
67+
tag : 'h2',
68+
text : 'Community'
6969
}, {
7070
iconCls: 'fa-brands fa-github',
7171
text : 'Contribute',
@@ -91,8 +91,8 @@ class FooterContainer extends Container {
9191
items: [{
9292
module: Component,
9393
cls : ['neo-h2'],
94-
html : 'Social Media',
95-
tag : 'h2'
94+
tag : 'h2',
95+
text : 'Social Media'
9696
}, {
9797
iconCls: 'fa-brands fa-linkedin',
9898
text : 'LinkedIn',
@@ -107,7 +107,7 @@ class FooterContainer extends Container {
107107
}, {
108108
module: Component,
109109
cls : ['neo-version'],
110-
html : 'v10.0.0-beta.1'
110+
text : 'v10.0.0-beta.1'
111111
}]
112112
}],
113113
/**

apps/portal/view/home/parts/AfterMath.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ class AfterMath extends BaseContainer {
2828
}, {
2929
cls : ['neo-h1'],
3030
flex: 'none',
31-
html: 'Next Steps',
32-
tag : 'h1'
31+
tag : 'h1',
32+
text: 'Next Steps'
3333
}, {
3434
cls : ['neo-content'],
3535
flex: 'none',
3636
tag : 'ul',
3737

3838
html: `
3939
<li>To learn more about Neo.mjs please dive into the <a href="#/learn">Learning Section</a> or browse the <a href="#/blog">Blog</a></li>
40-
<li>To arrange a demo or to talk to an engineer email <a href="mailto:info@neomjs.com">info@neomjs.com</a></li>
40+
<li>To arrange a demo or to talk to an engineer, email <a href="mailto:info@neomjs.com">info@neomjs.com</a></li>
4141
<li>For help starting a project email <a href="mailto:services@neomjs.com">services@neomjs.com</a></li>
4242
<li>For questions about private training email <a href="mailto:training@neomjs.com">training@neomjs.com</a></li>
4343
`

apps/portal/view/home/parts/MainNeo.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ class MainNeo extends BaseContainer {
3030
cls : ['vector']
3131
}, {
3232
cls : ['neo-h1'],
33-
html: 'Neo.mjs',
34-
tag : 'h1'
33+
tag : 'h1',
34+
text: 'Neo.mjs'
3535
}]
3636
}, {
3737
module : MagicMoveText,
@@ -59,7 +59,7 @@ class MainNeo extends BaseContainer {
5959
flex: 'none',
6060
tag : 'h3',
6161

62-
html: [
62+
text: [
6363
'Neo.mjs provides a new approach for building feature-rich web applications. Increase productivity by leveraging ',
6464
'a vast component library and harness the power of multi-threading for extreme real-time performance.'
6565
].join('')

apps/portal/view/home/parts/References.mjs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ class References extends BaseContainer {
2929
}, {
3030
cls : 'neo-h1',
3131
flex: 'none',
32-
html: 'References',
33-
tag : 'h1'
32+
tag : 'h1',
33+
text: 'References'
3434
}, {
3535
cls : 'neo-h2',
3636
flex: 'none',
37-
html: 'What people think about Neo',
38-
tag : 'h2'
37+
tag : 'h2',
38+
text: 'What people think about Neo'
3939
}, {
4040
module: Carousel,
4141
// will automatically change to the next extry every 5500 ms
@@ -74,10 +74,10 @@ class References extends BaseContainer {
7474
// each item will be created like the itemTpl structure
7575
itemTpl: data => [{
7676
cls : 'neo-quote',
77-
html: data.quote
77+
text: data.quote
7878
}, {
7979
cls : 'neo-details',
80-
html: `${data.publisher} - ${data.date}`
80+
text: `${data.publisher} - ${data.date}`
8181
}]
8282
}]
8383
}

0 commit comments

Comments
 (0)