Ember.js: [Pls send halp!] The Ultimate Glimmer 2 Test Porting Guide

์— ๋งŒ๋“  2016๋…„ 03์›” 19์ผ  ยท  44์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: emberjs/ember.js

: recycle : : recycle : : recycle : ์ด Github ๋ฌธ์ œ๋ฅผ ์ธ์‡„ํ•˜๊ธฐ ์ „์— ํ™˜๊ฒฝ์„ ๊ณ ๋ คํ•˜์‹ญ์‹œ์˜ค. : recycle : : recycle : : recycle :

๋ฐฐ๊ฒฝ ์ด์•ผ๊ธฐ

@wycats ์™€ I (๊ทธ๋ฆฌ๊ณ  ๊ทธ ๊ณผ์ •์—์„œ ๋„์›€์„ ์ค€ ๋งŽ์€ ์‚ฌ๋žŒ๋“ค)์€ ์ง€๋‚œ 6 ๊ฐœ์›” ๋™์•ˆ ์ฝ”๋“œ ๋ช… "Glimmer 2"๋ผ๋Š” ๋ Œ๋”๋ง ์—”์ง„์˜ ์žฌ ๊ตฌ์ถ• ์ž‘์—…์„ ํ•ด์™”์Šต๋‹ˆ๋‹ค.

๊ทธ๊ฒƒ์€ htmlbar ์˜ ํฌํฌ๋กœ ์‹œ์ž‘๋˜์—ˆ์ง€๋งŒ ๊ฑฐ์˜ ๋ชจ๋“  ์ฝ”๋“œ ์ค„์ด ์ง€๊ธˆ๊นŒ์ง€ (๋•Œ๋กœ๋Š” ์—ฌ๋Ÿฌ ๋ฒˆ) ๋‹ค์‹œ ์ž‘์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์šฐ๋ฆฌ๋Š” ์ด์ „ ์„ธ๋Œ€์˜ ๋ Œ๋”๋ง ํŒŒ์ดํ”„ ๋ผ์ธ (ํ•ธ๋“ค ๋ฐ”, htmlbars, ์›๋ž˜์˜ glimmer

https://github.com/tildeio/glimmer์—์„œ codez๋ฅผ ์ฐพ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. TypeScript๋กœ (์žฌ) ์ž‘์„ฑ๋˜์—ˆ์œผ๋ฉฐ ๊ฝค ๋ฉ‹์ง€๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค. ์–ด์จŒ๋“  EmberConf ์—์„œ ๋” ์ž์„ธํžˆ

ํ†ตํ•ฉ

์—”์ง„์—์„œํ•˜๊ณ  ์‹ถ์€ ๋งŽ์€ ์ž‘์—… (๋Œ€๋ถ€๋ถ„ ์ตœ์ ํ™”)์ด ์•„์ง ๋งŽ์ด ๋‚จ์•„ ์žˆ์ง€๋งŒ ๋ชจ๋“  ๊ธฐ๋ณธ Ember ์‚ฌ์šฉ ์‚ฌ๋ก€๋ฅผ ํฌํ•จ ํ•  ์ˆ˜์žˆ์„๋งŒํผ ์ถฉ๋ถ„ํžˆ ๊ตฌํ˜„ํ–ˆ๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋ž˜์„œ ์•ฝ ๋‘ ๋‹ฌ ์ „์— ์šฐ๋ฆฌ๋Š” ์ƒˆ๋กœ์šด ์—”์ง„์„ Ember๋กœ ํ†ตํ•ฉํ•˜๊ธฐ ์‹œ์ž‘ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ง€๊ธˆ๊นŒ์ง€์˜ ์ง„ํ–‰ ์ƒํ™ฉ์„ ์œ„ํ•ด์ด ๋ฉ”ํƒ€ ๋ฌธ์ œ ๋ฅผ ๋”ฐ๋ฅผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์•„์ง ์‹ค์ œ ์•ฑ์—์„œ ์ƒˆ ์—”์ง„์„ ์‚ฌ์šฉํ•  ์ˆ˜๋Š” ์—†์ง€๋งŒ ์ž‘์—…์ด ๋น„๊ต์  ๋นจ๋ฆฌ ์™„๋ฃŒ ๋  ๊ฒƒ์œผ๋กœ ์˜ˆ์ƒ๋ฉ๋‹ˆ๋‹ค. ๊ตฌํ˜„์ด ์™„๋ฃŒ๋˜๋ฉด ์›๋ž˜ Handlebars์—์„œ HTMLBars๋กœ ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ํ•˜๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ์ƒ๋Œ€์ ์œผ๋กœ ์‰ฝ๊ฒŒ ์•ฑ์„์œ„ํ•œ ๋“œ๋กญ ์ธ ์—…๊ทธ๋ ˆ์ด๋“œ๊ฐ€ ๋  ๊ฒƒ์ž…๋‹ˆ๋‹ค.

(๊ธฐ๋Šฅ ํ”Œ๋ž˜๊ทธ๋ฅผ ์ „ํ™˜ํ•˜๋Š” ๊ธฐ๋Šฅ์€ ๊ธฐ์กด ๊ธฐ๋Šฅ์ด ๋ชจ๋‘ ๊ตฌํ˜„๋˜๊ธฐ _ ์ „์— _ ์‹œ์ž‘๋  ๊ฒƒ์ด๋ฏ€๋กœ, ์ฒ˜์Œ๋ถ€ํ„ฐ ์•ฑ์—์„œ ์›ํ™œํ•˜๊ฒŒ ์ž‘๋™ํ•˜์ง€ _ ์•Š์„ _ ๊ฒƒ์ž…๋‹ˆ๋‹ค.)

Pls๋Š” ์ค‘๋‹จ์„ ๋ณด๋ƒ…๋‹ˆ๋‹ค

๋”ฐ๋ผ์„œ "์–ด๋–ป๊ฒŒ ๋„์™€ ๋“œ๋ฆด๊นŒ์š”?"๋ผ๊ณ  ๊ถ๊ธˆํ•ดํ•˜์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋ฌผ์–ด๋ด์„œ ๊ธฐ๋ป์š”! : ๋ถ : : ์ŠคํŒŒํด ์Šค : : ๋ถˆ๊ฝƒ ๋†€์ด : : ํƒ€๋‹ค :

์ด ์‹œ์ ์—์„œ ๋„์›€์ด ๋  ์ˆ˜์žˆ๋Š” ๊ฐ€์žฅ ํฐ ๊ฐ€์น˜๋Š” ๊ธฐ์กด ํ…Œ์ŠคํŠธ๋ฅผ ์ด์‹ํ•˜๊ณ  ์ด๋Ÿฌํ•œ PR์„ ๊ฒ€ํ† ํ•˜๋Š” ๋ฐ ๋„์›€์ด๋˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. Ember์—๋Š” "๋ทฐ ๋ ˆ์ด์–ด"๋™์ž‘์„ ํ…Œ์ŠคํŠธํ•˜๋Š” ๋งค์šฐ ๊ด‘๋ฒ”์œ„ํ•œ ํ…Œ์ŠคํŠธ ์Šค์œ„ํŠธ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฌธ์ œ๋Š” ์ด๋Ÿฌํ•œ ํ…Œ์ŠคํŠธ์˜ ๋Œ€๋ถ€๋ถ„์ด ๊ธฐ์กด ๊ตฌํ˜„๊ณผ ์ƒ๋‹นํžˆ ๊ฒฐํ•ฉ ๋œ ๋ฐฉ์‹์œผ๋กœ ์ž‘์„ฑ๋˜๊ฑฐ๋‚˜ ๋” ์ด์ƒ ์ง€์›๋˜์ง€ ์•Š๋Š” ๋ ˆ๊ฑฐ์‹œ ์˜๋ฏธ ์ฒด๊ณ„ (์˜ˆ : {{view.foo}} )๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.

ํšŒ๊ท€๊ฐ€ ๋ฐœ์ƒํ•˜์ง€ ์•Š์•˜๋Š”์ง€ ํ™•์ธํ•˜๊ธฐ ์œ„ํ•ด ํ˜„์žฌ ๋ Œ๋”๋ง ์—”์ง„ ( "htmlbars")๊ณผ Glimmer 2 ๋ชจ๋‘์— ๋Œ€ํ•ด ์ „์ฒด ํ…Œ์ŠคํŠธ ์Šค์œ„ํŠธ๋ฅผ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๊ธฐ๋ฅผ ์›ํ•ฉ๋‹ˆ๋‹ค.

์šฐ๋ฆฌ๋Š” ๊ทธ๋ ‡๊ฒŒ ํ•  ์ˆ˜์žˆ๋Š” ์ƒˆ๋กœ์šด ํ…Œ์ŠคํŠธ ๋„๊ตฌ๋ฅผ ์ž‘์„ฑํ–ˆ์Šต๋‹ˆ๋‹ค. ์•„๋ž˜์—์„œ ๊ธฐ์ˆ ์  ์ธ ์„ธ๋ถ€ ์‚ฌํ•ญ์„ ์‚ดํŽด ๋ณด ๊ฒ ์ง€๋งŒ ๊ธฐ๋ณธ ์•„์ด๋””์–ด๋Š” ๋‘ ์—”์ง„ ๊ฐ„์˜ ์ฐจ์ด์ ์„ ์บก์Šํ™”ํ•˜๋Š” ์ถ”์ƒํ™” ๊ณ„์ธต์— ๋Œ€ํ•ด ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค๋ฅผ ์ž‘์„ฑํ•˜์—ฌ ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค์˜ ๋™์ผํ•œ ์ฝ”๋“œ๊ฐ€ ๋‘ ๊ตฌํ˜„ ๋ชจ๋‘์— ๋Œ€ํ•ด ์‹คํ–‰๋  ์ˆ˜ ์žˆ๋„๋กํ•œ๋‹ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.

๊ทธ ๊ณผ์ •์—์„œ ๋ ˆ๊ฑฐ์‹œ ์‹œ๋งจํ‹ฑ์— ์˜์กดํ•˜์ง€ ์•Š๋„๋ก ํ”„๋กœ์„ธ์Šค์˜ ๊ธฐ์กด ํ…Œ์ŠคํŠธ๋ฅผ "ํ˜„๋Œ€ํ™”"ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค (์ด ์‹œ๋งจํ‹ฑ์„ ๋ช…์‹œ ์ ์œผ๋กœ ํ…Œ์ŠคํŠธํ•˜๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ๋ณด์ด์ง€ ์•Š๋Š” ํ•œ,์ด ๊ฒฝ์šฐ์—๋Š” ๊ทธ๋Œ€๋กœ ๋‘ก๋‹ˆ๋‹ค). ์šฐ๋ฆฌ์˜ ์ƒˆ๋กœ์šด ํ…Œ์ŠคํŠธ ์žฅ์น˜๋Š” ๋˜ํ•œ "๋งคํŠธ๋ฆญ์Šค ์Šคํƒ€์ผ"ํ…Œ์ŠคํŠธ๋ฅผ ํ›จ์”ฌ ๋” ์‰ฝ๊ณ  ์ฆ๊ฒ๊ฒŒ ๋งŒ๋“ค์–ด์ค๋‹ˆ๋‹ค. ์•„๋ž˜์—์„œ ๋” ์ž์„ธํžˆ ์„ค๋ช…ํ•˜์ง€๋งŒ ์—ฌ๊ธฐ์— ์ƒ์œ„ ์ˆ˜์ค€ ์•„ํ‚คํ…์ฒ˜ ๋‹ค์ด์–ด๊ทธ๋žจ์ด ์žˆ์Šต๋‹ˆ๋‹ค.

matrix

๊ฒฐ๊ณผ์ ์œผ๋กœ ํ…Œ์ŠคํŠธ๋ฅผ ํ›จ์”ฌ ์‰ฝ๊ฒŒ ์ฝ๊ณ  ์ถ”๋ก  ํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ ์ ์šฉ ๋ฒ”์œ„๋„ ํฌ๊ฒŒ ์ฆ๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ด๊ฒƒ์€ ๋ชจ๋‘์—๊ฒŒ ํ›Œ๋ฅญํ•œ ๊ฒฐ๊ณผ์ด์ง€๋งŒ ์•„์ง ๋” ๋งŽ์€ ํ…Œ์ŠคํŠธ๊ฐ€ ๋‚จ์•„ ์žˆ์œผ๋ฉฐ ๋ชจ๋“  ํ…Œ์ŠคํŠธ๊ฐ€ ํฌํŒ…๋˜์ง€ ์•Š์€ ์ƒํƒœ์—์„œ ์—”์ง„ ์ถœํ•˜์— ๋Œ€ํ•œ ํ™•์‹ ์„ ๊ฐ€์งˆ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ์—ฌ๋Ÿฌ๋ถ„ ์ค‘ ๋ช‡ ๋ถ„์ด ๊ฐ๊ฐ ํ…Œ์ŠคํŠธ ํŒŒ์ผ์„ ์ด์‹ํ•˜๋Š” ๋ฐ ๋„์›€์„ ์ฃผ์‹œ๋ฉด ๋‹ค์Œ ์ฃผ ์ด๋ง˜๋•Œ๊นŒ์ง€ ์ข‹์€ ์ƒํƒœ๊ฐ€ ๋  ๊ฒƒ์ž…๋‹ˆ๋‹ค!

ํ•˜๋„ค์Šค ์ž‘๋™ ์›๋ฆฌ

์šฐ๋ฆฌ๊ฐ€ ์‚ฌ์šฉํ•œ ์‹ค์ œ ๋ฉ”์ปค๋‹ˆ์ฆ˜์€ ๋งค์šฐ ๋‚ฎ์€ ๊ธฐ์ˆ ์ž…๋‹ˆ๋‹ค. ๋“ค์–ด ๋ณด์…จ์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค.์ด๋ฅผ ์‹ฌ๋ณผ๋ฆญ ๋งํฌ ๋ผ๊ณ 

ember-glimmer ํŒจํ‚ค์ง€์˜ ํ…Œ์ŠคํŠธ ํด๋” ์•ˆ์— abstract-test-case.js ๋ผ๋Š” ํŒŒ์ผ์ด ์žˆ์Šต๋‹ˆ๋‹ค.์ด ํŒŒ์ผ์€ ember-htmlbars ํŒจํ‚ค์ง€ ๋‚ด์˜ ๋™์ผํ•œ ์œ„์น˜์— ์‹ฌ๋ณผ๋ฆญ ๋งํฌ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ํŒŒ์ผ์€ ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค ์ž‘์„ฑ์— ์‚ฌ์šฉ๋˜๋Š” API๋ฅผ ์ •์˜ํ•ฉ๋‹ˆ๋‹ค. ์ด ํŒŒ์ผ์€ ๋‘ ํŒจํ‚ค์ง€๊ฐ„์— ๊ณต์œ  (symlinked)๋˜๊ธฐ ๋•Œ๋ฌธ์— ๋‘ ๊ตฌํ˜„์— ๋Œ€ํ•œ ๊ตฌ์ฒด์ ์ธ ๋‚ด์šฉ์€ ํฌํ•จํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

๋Œ€์‹  ๊ฐ ํŒจํ‚ค์ง€์—์„œ ์ œ๊ณตํ•˜๋Š” ํŒŒ์ผ (์˜ˆ : import ... from './helpers' )์„ ๊ฐ€์ ธ ์™€์„œ ๋ชจ๋“  ์ฐจ์ด์ ์„ ์ถ”์ƒํ™”ํ•ฉ๋‹ˆ๋‹ค. ๋˜๋Š” ๊ฐ ํŒจํ‚ค์ง€๋Š” test-case.js ์˜ "์ถ”์ƒ"ํด๋ž˜์Šค์—์„œ ํŠน์ • ๋ฉ”์„œ๋“œ๋ฅผ ์žฌ์ •์˜ ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค ( ember-glimmer ๋Œ€ ember-htmlbars ๋ฒ„์ „ ์ฐธ์กฐ).

(๋Œ€๋ถ€๋ถ„์˜ ๊ฒฝ์šฐ ์ด๋Ÿฌํ•œ ํŒŒ์ผ์„ ์ „ํ˜€ ์ˆ˜์ •ํ•  ํ•„์š”๊ฐ€ ์—†์„ ์ˆ˜๋„ ์žˆ์ง€๋งŒ ์ด๊ฒƒ์ด ์ž‘๋™ ๋ฐฉ์‹ / ์ž‘์—…์ด ๋‚ด๋ถ€์—์„œ ๋ฐœ์ƒํ•˜๋Š” ์œ„์น˜๋ฅผ ์•„๋Š” ๊ฒƒ์ด ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•˜๋Š” ๊ฒฝ์šฐ ์—ฌ์ „ํžˆ ๋„์›€์ด ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.)

ํ…Œ์ŠคํŠธ ์ž‘๋™ ๋ฐฉ์‹

์—”์ง„์€ ์‹ค์ œ ์•ฑ์— ๋Œ€ํ•œ ๋“œ๋กญ ์ธ ์—…๊ทธ๋ ˆ์ด๋“œ๋ฅผ์œ„ํ•œ ๊ฒƒ์ด๊ธฐ ๋•Œ๋ฌธ์— ํ…Œ์ŠคํŠธ๊ฐ€ ์‹ค์ œ๋กœ ์ด๋Ÿฌํ•œ ๊ธฐ๋Šฅ์ด ์‹ค์ œ ์„ธ๊ณ„์—์„œ ์‚ฌ์šฉ๋˜๋Š” ๋ฐฉ์‹์„ ํ…Œ์ŠคํŠธํ•˜๋Š” ํ•œ ํ…Œ์ŠคํŠธ๊ฐ€ ์‹คํ–‰๋˜์ง€ ์•Š์„ ์ด์œ ๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค. ๋‘ ์—”์ง„.

๊ทธ๊ฒƒ์ด ์ง€๊ธˆ๊นŒ์ง€ ์šฐ๋ฆฌ์˜ ์ดˆ์ ์ด์—ˆ์Šต๋‹ˆ๋‹ค. ์—ฌ๊ธฐ์—์„œ ์˜ˆ ๋ฅผ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ด ํ…Œ์ŠคํŠธ๋Š” ๋ฌผ๋ฆฌ์ ์œผ๋กœ ember-glimmer ๋””๋ ‰ํ„ฐ๋ฆฌ์— ์žˆ์ง€๋งŒ ember-htmlbars ๋””๋ ‰ํ„ฐ๋ฆฌ ์˜ ๋™์ผํ•œ ์œ„์น˜ ์—

๋ณด์‹œ๋‹ค์‹œํ”ผ ํ…Œ์ŠคํŠธ๋Š”์ด ํŒจํ‚ค์ง€ ๋ณ„ test-case.js ๋ฅผ ๊ฐ€์ ธ ์˜ค์ง€๋งŒ, ๊ทธ๋ ‡์ง€ ์•Š์œผ๋ฉด ๋ Œ๋”๋ง ์—”์ง„ ๊ตฌํ˜„์— ๋Œ€ํ•ด ๋ถˆ๊ฐ€์ง€๋ก  ์ ์ž…๋‹ˆ๋‹ค.

๊ณผ์ •

์ผ๋ฐ˜์ ์œผ๋กœ ์ƒ์œ„ ์ˆ˜์ค€์—์„œ ํ”„๋กœ์„ธ์Šค๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

  1. ์ด์‹ ํ•  ํ…Œ์ŠคํŠธ ํŒŒ์ผ์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค (์ผ๋ฐ˜์ ์œผ๋กœ ember-htmlbars ์–ด๋”˜๊ฐ€์—์žˆ๋Š” ๊ธฐ์กด ํ…Œ์ŠคํŠธ ํŒŒ์ผ).
  2. ember-glimmer/tests/integration/... ์–ด๋”˜๊ฐ€์— ์ƒˆ ํŒŒ์ผ์„ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
  3. ๊ฐ ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค / ๋ชจ๋“ˆ์„ ์ƒˆ ํŒŒ์ผ๋กœ ํฌํŒ…ํ•˜๋Š” ๋™์•ˆ ...

    • ์ƒˆ๋กœ์šด moduleFor ๋ฐ ES6 ํด๋ž˜์Šค ํ˜•์‹ ์‚ฌ์šฉ

    • ๊ฐ ํ…Œ์ŠคํŠธ๊ฐ€ "INUR"์ฃผ๊ธฐ๋ฅผ ๊ฑฐ์น˜๋„๋กํ•ฉ๋‹ˆ๋‹ค ( "์ดˆ๊ธฐ ๋ Œ๋”๋ง-> ์ž‘๋™ํ•˜์ง€ ์•Š๋Š” ๋‹ค์‹œ ๋ Œ๋”๋ง-> ๋Œ์—ฐ๋ณ€์ด๋ฅผ ํ†ตํ•œ ์—…๋ฐ์ดํŠธ-> ๊ต์ฒด๋ฅผ ํ†ตํ•œ ์žฌ์„ค์ •"์ฃผ๊ธฐ, ์ž์„ธํ•œ ๋‚ด์šฉ์€ ์•„๋ž˜ ์ฐธ์กฐ)

    • ์ค‘๋ณต ๋œ ํ…Œ์ŠคํŠธ (๋˜๋Š” ์œ„์—์„œ ์–ธ๊ธ‰ ํ•œ ์—…๋ฐ์ดํŠธ์ฃผ๊ธฐ์—์„œ ์•”์‹œ ์ ์œผ๋กœ ๋‹ค๋ฃจ๋Š” ํ…Œ์ŠคํŠธ) ์ œ๊ฑฐ (๋ฌด์‹œ)

  4. ์ƒ์œ„ ํด๋”๊ฐ€ ์ด๋ฏธ ember-htmlbars ์˜ ์‹ฌ๋ณผ๋ฆญ ๋งํฌ ์ธ ๊ฒฝ์šฐ๊ฐ€ ์•„๋‹ˆ๋ฉด ํ…Œ์ŠคํŠธ๋ฅผ ember-htmlbars ํŒจํ‚ค์ง€๋กœ ๋‹ค์‹œ ์‹ฌ๋ณผ๋ฆญํ•ฉ๋‹ˆ๋‹ค (์œ„์—์„œ ๋ณด์—ฌ์ค€ concat ํ…Œ์ŠคํŠธ์™€ ์œ ์‚ฌ ํ•จ).
  5. ์ด์ „ ํŒŒ์ผ์„ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค (์ด์ „ ํ•  ์ˆ˜์—†๋Š” ์ผ๋ถ€ ํ…Œ์ŠคํŠธ๊ฐ€ ์—ฌ์ „ํžˆ ํฌํ•จ๋˜์–ด ์žˆ์ง€ ์•Š์€ ๊ฒฝ์šฐ).
  6. ํ’€ ๋ฆฌํ€˜์ŠคํŠธ ์—ด๊ธฐ
  7. ์‰ฝ๊ฒŒ ๊ฒ€ํ†  ํ•  ์ˆ˜ ์žˆ๋„๋ก ์ œ๊ฑฐํ•œ ๊ฐ ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค์— ๋Œ€ํ•œ ์„ค๋ช…์„ ์ถ”๊ฐ€ํ•˜์—ฌ ๊ทผ๊ฑฐ๋ฅผ ์„ค๋ช…ํ•ฉ๋‹ˆ๋‹ค (์˜ˆ :/ ์ด์ œ ๋‹ค์Œ์„ ํ†ตํ•ด ๋‹ค๋ฃน๋‹ˆ๋‹ค./ ์ค‘๋ณต/ ...). ํ™•์‹คํ•˜์ง€ ์•Š์€ ํ…Œ์ŠคํŠธ์— ๋Œ€ํ•œ ์˜๊ฒฌ / ์งˆ๋ฌธ์„ ์ž์œ ๋กญ๊ฒŒ ์ถ”๊ฐ€ ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

์ข‹์€ ํ…Œ์ŠคํŠธ๋ฅผ ์ž‘์„ฑํ•˜๋Š” ๋ฐฉ๋ฒ•

๋‹ค์Œ์€ ํ…Œ์ŠคํŠธ ์‚ฌ๋ก€๋ฅผ ๊ฐœ์„ ํ•˜๊ธฐ ์œ„ํ•ด ๋”ฐ๋ฅผ ์ˆ˜์žˆ๋Š” ๋ช‡ ๊ฐ€์ง€ ์ผ๋ฐ˜์ ์ธ ํŒ / ๊ทœ์น™์ž…๋‹ˆ๋‹ค.

"INUR"์ฃผ๊ธฐ

๊ฐ ํ…Œ์ŠคํŠธ๊ฐ€ "INUR"์ฃผ๊ธฐ๋ฅผ ๊ฑฐ์น˜๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.

  1. ์ดˆ๊ธฐ ๋ Œ๋”๋ง

์„ ํƒํ•œ ์ดˆ๊ธฐ ๊ฐ’ ( this.render(..., { ... }) )์œผ๋กœ ํ…Œ์ŠคํŠธ ํ•  ํ…œํ”Œ๋ฆฟ์„ ๋ Œ๋”๋งํ•˜๊ณ  ๊ฒฐ๊ณผ๊ฐ€ ์˜ˆ์ƒ ํ•œ๋Œ€๋กœ์ž„์„ ์ฃผ์žฅํ•ฉ๋‹ˆ๋‹ค. ( ์˜ˆ )

  1. ์ž‘๋™ํ•˜์ง€ ์•Š๋Š” ๋‹ค์‹œ ๋ Œ๋”๋ง

๊ฐ’์„ ๋ณ€๊ฒฝํ•˜์ง€ ์•Š๊ณ  this.runTask(() => this.rerender()); ๋ฅผ ํ˜ธ์ถœ ํ•œ ๋‹ค์Œ ๊ฒฐ๊ณผ๊ฐ€ ๋™์ผํ•˜๋‹ค๊ณ  ์ฃผ์žฅํ•ฉ๋‹ˆ๋‹ค. ( ์˜ˆ )

  1. ๋Œ์—ฐ๋ณ€์ด๋ฅผ ํ†ตํ•œ ์—…๋ฐ์ดํŠธ

ํ…œํ”Œ๋ฆฟ์—์„œ ์‚ฌ์šฉํ•˜๋Š” ๊ฐ’์„ ์—…๋ฐ์ดํŠธํ•ฉ๋‹ˆ๋‹ค. ( ์˜ˆ )

๋‹ค์Œ์„ ์‹œ๋„ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.

  • ์˜๋ฏธ๊ฐ€์žˆ๋Š” ๊ฒฝ์šฐ ์—…๋ฐ์ดํŠธ๋ฅผ ์—ฌ๋Ÿฌ ์ฒญํฌ๋กœ ๋ถ„ํ• ํ•ฉ๋‹ˆ๋‹ค (์ฆ‰, ์—ฌ๋Ÿฌ this.runTask + ์–ด์„ค ์…˜). ์ด๋ ‡๊ฒŒํ•˜๋ฉด _some_ ๊ฐ’์„ ์—…๋ฐ์ดํŠธํ•˜๋ฉด ํ…œํ”Œ๋ฆฟ์˜ ๋‹ค๋ฅธ ๊ด€๋ จ๋˜์ง€ ์•Š์€ ๋ถ€๋ถ„์ด "๋‚ ์•„๊ฐ€๊ฑฐ๋‚˜"๋‹ค๋ฅธ ๋ฐ”๋žŒ์งํ•˜์ง€ ์•Š์€ ํšจ๊ณผ๊ฐ€ ๋ฐœ์ƒํ•˜๋Š” "ํด๋กœ๋ฒ„ ๋ง"๋ฒ„๊ทธ๋ฅผ ์žก์„ ๊ฐ€๋Šฅ์„ฑ์ด ๋†’์•„์ง‘๋‹ˆ๋‹ค.
  • ๋ง์ด๋˜๋Š” ๊ฒฝ์šฐ "๋‚ด๋ถ€ ๋Œ์—ฐ๋ณ€์ด"๋ฅผ ์‚ฌ์šฉํ•˜์‹ญ์‹œ์˜ค. ๊ฐ’์ด ๋ฌธ์ž์—ด์ด๋‚˜ ๊ธฐํƒ€ ๊ธฐ๋ณธ ๊ฐ’์ผ ๋•Œ๋Š” ์ค‘์š”ํ•˜์ง€ ์•Š์ง€๋งŒ ๊ฐ์ฒด ๋‚˜ ๋ฐฐ์—ด์„ ๋‹ค๋ฃฐ ๋•Œ๋Š” ๊ฐ์ฒด / ๋ฐฐ์—ด์„ ์œ ์ง€ํ•˜๋ฉด์„œ ๊ฐ์ฒด / ๋ฐฐ์—ด์˜ "๋‚ด๋ถ€"๊ฐ’์„ ์—…๋ฐ์ดํŠธํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค. ๊ฐ™์€. ( ๋ฐฐ์—ด ์˜ˆ , ๊ฐ์ฒด ์˜ˆ )
  • ์˜๋ฏธ๊ฐ€ ์žˆ๋‹ค๋ฉด ๋‹ค๋ฅธ ํ˜•ํƒœ์˜ "๋‚ด๋ถ€ ๋Œ์—ฐ๋ณ€์ด"๋ฅผ ์‹œ๋„ํ•ด๋ณด์‹ญ์‹œ์˜ค. ์ด ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๋Š” ๋ฐฉ๋ฒ•์ด ์—ฌ๋Ÿฌ ๊ฐ€์ง€ (์˜ˆ : pushObject vs ํ•ญ๋ชฉ ์ œ๊ฑฐ ๋“ฑ)๊ฐ€์žˆ๋Š” ๊ฒฝ์šฐ ์ผ๋ฐ˜์ ์œผ๋กœ ๋‘˜ ์ด์ƒ์˜ ๋ฐฉ๋ฒ•์„ ์‹œ๋„ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค. ( ์˜ˆ )

    1. ๊ต์ฒด๋ฅผ ํ†ตํ•ด ์žฌ์„ค์ •

๋ชจ๋“  ๋ณ€์ˆ˜๋ฅผ ๊ต์ฒดํ•˜์—ฌ ์›๋ž˜ ์‹œ์ž‘ ์กฐ๊ฑด์œผ๋กœ ์žฌ์„ค์ •ํ•˜์‹ญ์‹œ์˜ค.

  • ์žฌ์„ค์ • : ์ด๊ฒƒ์€ ์šฐ๋ฆฌ๊ฐ€ ํ…์ŠคํŠธ ๋…ธ๋“œ์˜ ์›๋ž˜ ๊ฐ’์„ ์บ์‹œํ•˜๊ณ  ๋„์ค‘์— ์บ์‹œ๋ฅผ ์—…๋ฐ์ดํŠธํ•˜๋Š” ๊ฒƒ์„ ์žŠ์€ ๋ฒ„๊ทธ๋ฅผ ์žก๋Š” ๋ฐ ๋„์›€์ด๋ฉ๋‹ˆ๋‹ค. ์ด ๊ฒฝ์šฐ ์›๋ž˜ ๊ฐ’์ด ์•„๋‹Œ ๋‹ค๋ฅธ ๊ฐ’์œผ๋กœ ๋ณ€๊ฒฝํ•˜๋ฉด ์ œ๋Œ€๋กœ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ์›๋ž˜ ๊ฐ’์œผ๋กœ ๋‹ค์‹œ ๋ณ€๊ฒฝํ•˜๋ฉด DOM ์ฝ”๋“œ๊ฐ€ ๋‹จ๋ฝ๋˜๊ณ  ์•„๋ฌด๊ฒƒ๋„ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
  • ๋Œ€์ฒด : ๋‹ค์‹œ ๋งํ•˜์ง€๋งŒ, ๊ฐ’์ด ๋ฌธ์ž์—ด๊ณผ ๊ฐ™์€ ๋‹จ์ˆœํ•œ ์›์‹œ ๊ฐ’์ด๋ฉด ์ฐจ์ด๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ๊ฐ’์ด ๊ฐ์ฒด / ๋ฐฐ์—ด ๋“ฑ์ธ ๊ฒฝ์šฐ ์ด๋Š” ํ•ด๋‹น ๊ฐ์ฒด / ๋ฐฐ์—ด์„ ๋‹ค๋ฅธ ์ƒˆ ๊ฐ์ฒด๋กœ ๊ต์ฒดํ•˜๋Š” ๊ฒƒ์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค (๋‚ด๋ถ€ ๊ฐ’์„ ๋ณ€๊ฒฝํ•˜๋Š” ๊ฒƒ๊ณผ ๋ฐ˜๋Œ€ ๋จ). ( ๋ฐฐ์—ด ์˜ˆ , ๊ฐ์ฒด ์˜ˆ )

์ค‘๋ณต ํ…Œ์ŠคํŠธ ๋ฐฉ์ง€

๋™์ผํ•œ ๊ฒƒ์˜ ์•ฝ๊ฐ„ ๋‹ค๋ฅธ ๋ณ€ํ˜•์„ ํ…Œ์ŠคํŠธํ•˜๊ธฐ ์œ„ํ•ด ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค๋ฅผ ๋ช‡ ๋ฒˆ ๋ณต์‚ฌํ•˜๋Š” ๊ฒƒ์€ ์‰ฝ์Šต๋‹ˆ๋‹ค (์˜ˆ : {{#if foo}} ๋Š” true์™€ false๋กœ ์‹œ์ž‘ํ•˜๊ฑฐ๋‚˜ "POJO"์™€ Ember.Object ), ์šฐ๋ฆฌ๋Š” ๊ธฐ์กด ํ…Œ์ŠคํŠธ์—์„œ ๋งŽ์ด ์ˆ˜ํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค.

๋•Œ๋กœ๋Š” ์ด๊ฒƒ์ด ์ตœ์„ ์˜ ๋ฐฉ๋ฒ•์ด์ง€๋งŒ ์—ฌ๊ธฐ์—๋Š” ๋งŽ์€ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ๋จผ์ € ํŒŒ์ผ์—์„œ ๋ฌผ๋ฆฌ์ ์œผ๋กœ ๋งŽ์€ ์–‘์˜ ํ…Œ์ŠคํŠธ๋ฅผ ์ƒ์„ฑํ•˜์—ฌ ํ•ญ๋ชฉ์„ ์ฐพ๊ธฐ ์–ด๋ ต๊ฒŒ ๋งŒ๋“ญ๋‹ˆ๋‹ค. ๋˜ํ•œ ๋ˆ„๊ตฐ๊ฐ€๊ฐ€ ์ƒˆ ํ…Œ์ŠคํŠธ๋ฅผ ์ถ”๊ฐ€ํ•ด์•ผ ํ•  ๋•Œ ์ผ๋ฐ˜์ ์œผ๋กœ ๋ช‡ ๊ฐ€์ง€ ๋ณ€ํ˜• ์ค‘ ํ•˜๋‚˜๋ฅผ ๋ฌด์ž‘์œ„๋กœ ์„ ํƒํ•˜์—ฌ ์ƒˆ ์‹œ๋‚˜๋ฆฌ์˜ค์— ์ ํ•ฉํ•˜์ง€ ์•Š์€ ์„ธ๋ถ€ ์ •๋ณด / ์‹ค์ˆ˜๋ฅผ ์ „๋‹ฌํ•ฉ๋‹ˆ๋‹ค. ๋ณต์‚ฌ๋ณธ ์ค‘ ํ•˜๋‚˜์—์„œ ๋ฒ„๊ทธ๋ฅผ ์ˆ˜์ •ํ•˜๋ฉด ๋‚˜๋จธ์ง€๋Š” ์žŠ์–ด ๋ฒ„๋ฆด ๊ฒƒ์ž…๋‹ˆ๋‹ค.

์ผ๋ฐ˜์ ์œผ๋กœ ์ค‘๋ณต์„ ํ”ผํ•˜๋Š” ๋ฐฉ๋ฒ•์ด ์žˆ์Šต๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, ๋‹ค๋ฅธ ์‹œ์ž‘ ์กฐ๊ฑด์„ ํ…Œ์ŠคํŠธํ•˜๋Š” ๊ฒฝ์šฐ ( {{#if foo}} true ๋ฐ false ) ๋™์ผํ•œ ํ…Œ์ŠคํŠธ์—์„œ ๋‘ ์‹œ์ž‘ ์กฐ๊ฑด์„ ๋ชจ๋‘ ํ…Œ์ŠคํŠธ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

["<strong i="5">@test</strong> if"]() {
  this.render(`{{#if cond1}}T{{else}}F{{/if}}{{#if cond2}}T{{else}}F{{/if}}`, { cond1: true, cond2: false });`

  ... // follow the usual I-N-U-R cycle
}

๋‹ค๋ฅธ ๊ฒฝ์šฐ์—๋Š” ์ผ๋ถ€ ๊ณต์œ  ์ˆ˜ํผ ํด๋ž˜์Šค๋ฅผ ์ถ”์ถœํ•˜์—ฌ (์‹ค์ œ ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค๋ฅผ ์ˆ˜ํผ ํด๋ž˜์Šค์— ๋„ฃ์Œ) ๊ณต์œ  ๋™์ž‘์„ ์ •์˜ํ•˜๊ณ  ํ•˜์œ„ ํด๋ž˜์Šค์—์„œ ๋‹ค๋ฅธ ๋ถ€๋ถ„์„ ๊ตฌ์„ฑ ํ•  ์ˆ˜์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ์ด๋ฅผ ํ†ตํ•ด ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค๋ฅผ ํ•œ ๋ฒˆ๋งŒ ์ž‘์„ฑํ•˜๋ฉด ์ž๋™์œผ๋กœ ๋‹ค์–‘ํ•œ ์‹œ๋‚˜๋ฆฌ์˜ค ( "๋งคํŠธ๋ฆญ์Šค ์Šคํƒ€์ผ"ํ…Œ์ŠคํŠธ)๋ฅผ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๊ฐ€์žฅ ์ข‹์€ ์˜ˆ๋Š” ์กฐ๊ฑด๋ถ€ ํ…Œ์ŠคํŠธ ( if , unless ๋“ฑ) ์ผ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์‹ค์ œ ํ…Œ์ŠคํŠธ ํŒŒ์ผ ์€ ํ…œํ”Œ๋ฆฟ ํ˜ธ์ถœ ์Šคํƒ€์ผ๊ณผ ํ•˜์œ„ ํด๋ž˜์Šค TogglingSyntaxConditionalsTest ( shared-conditional-tests.js )๋ฅผ ์ •์˜ํ•˜๊ณ  ์ž๋™์œผ๋กœ ๋งŽ์€ ๊ณต์œ  ํ…Œ์ŠคํŠธ๋ฅผ ๊ฐ€์ ธ์˜ต๋‹ˆ๋‹ค.

"์ธ๋ผ์ธ if / unless"ํ…Œ์ŠคํŠธ ๋Š” 11 (!) ๊ฐœ์˜ ์„œ๋กœ ๋‹ค๋ฅธ ํ˜ธ์ถœ ์‹œ๋‚˜๋ฆฌ์˜ค์— ๋Œ€ํ•ด ๋™์ผํ•œ ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค ์„ธํŠธ๋ฅผ ์‹คํ–‰ํ•˜์—ฌ์ด ์ž‘์—…์„ ๋”์šฑ ํ™•์žฅํ•ฉ๋‹ˆ๋‹ค.

๊ณต์œ ์˜ ์‹ค์ œ ๊ตฌ์กฐ๋Š” ๋„๋‹ฌํ•˜๊ธฐ๊ฐ€ ๋‹ค์†Œ ์–ด๋ ค์› ๊ณ  ์„ฑ์ˆ™ํ•˜๊ณ  ์ œ๋Œ€๋กœ๋˜๋Š” ๋ฐ ์‹œ๊ฐ„์ด ์ข€ ๊ฑธ๋ ธ์ง€ ๋งŒ ๊ทธ์— ๋”ฐ๋ฅธ ๊ฒฐ๊ณผ๋Š” ์—„์ฒญ๋‚ฌ์Šต๋‹ˆ๋‹ค (๊ธฐ๋ณธ ์‹œ๋‚˜๋ฆฌ์˜ค๋Š” ์ด์ œ {{#with}} ์™€ {{#each}} ์‚ฌ์ด์—์„œ ๊ณต์œ ๋ฉ๋‹ˆ๋‹ค. ๊ฒŒ๋‹ค๊ฐ€).

๋ ˆ๊ฑฐ์‹œ ์˜๋ฏธ๋ก 

๊ธฐ์กด์˜ ๋งŽ์€ ํ…Œ์ŠคํŠธ๋Š” ๋ทฐ, {{view.foo}} , {{#view}} , context , ์ปจํŠธ๋กค๋Ÿฌ ๋“ฑ๊ณผ ๊ฐ™์€ ๋ ˆ๊ฑฐ์‹œ ์˜๋ฏธ ์ฒด๊ณ„๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ๋Œ€๋ถ€๋ถ„์˜ ๊ฒฝ์šฐ ์ด๊ฒƒ์€ ์ˆœ์ „ํžˆ ๋ถ€์ˆ˜์ ์ด๋ฉฐ ๊ทธ ์›์‹œ์  ์š”์†Œ๊ฐ€ ์ผ์„ ์ˆ˜ํ–‰ํ•˜๋Š” ์ฃผ์š” ๋ฐฉ๋ฒ•์ด์—ˆ๋˜ ์‹œ๋Œ€์— ์ž‘์„ฑ๋œ ํ…Œ์ŠคํŠธ์˜ ๊ฒฐ๊ณผ. ์ด๋Ÿฌํ•œ ๊ฒฝ์šฐ ์ผ๋ฐ˜์ ์œผ๋กœ ๋ฌธ์ œ์—†์ด ์ƒˆ ํ•˜๋„ค์Šค (๋Œ€์‹  ๊ตฌ์„ฑ ์š”์†Œ๋ฅผ ์‚ฌ์šฉ)๋กœ ์ด์‹ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์˜์‹ฌ์Šค๋Ÿฌ์šด ๊ฒฝ์šฐ PR์˜ ์ฒซ ๋ฒˆ์งธ ๋ฐ˜๋ณต์—์„œ ์ด์‹๋˜์ง€ ์•Š์€ ํ…Œ์ŠคํŠธ๋ฅผ ์ˆ˜ํ–‰ํ•˜๊ณ  ์ค„ ์ฃผ์„์œผ๋กœ ์งˆ๋ฌธ ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

attrs ๋˜๋Š” attrs

์šฐ๋ฆฌ๋Š” ๋‘ฅ๊ทผ ๊ตฌ์„ฑ ์š”์†Œ (๊ฑฐ์˜ ๋ชจ๋“  ๊ตฌ์„ฑ ์š”์†Œ)๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ํ…Œ์ŠคํŠธ์—์„œ {{attrs.foo}} ๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ  ๋™์ผํ•œ ์ด๋ฆ„ (์ฆ‰, {{foo}} ๊ฐ€์ง„ ์†์„ฑ์— ๋ฐ˜์˜๋˜๋Š” ์†์„ฑ์—๋งŒ ์˜์กดํ•˜๊ธฐ๋กœ ๊ฒฐ์ •ํ–ˆ์Šต๋‹ˆ๋‹ค. attrs.* (๋ชจ๋‘ ๊ฐ™์€ ํŒŒ์ผ์— ์žˆ์–ด์•ผ ํ•จ)๊ฐ€ ์•„๋‹ˆ๋ฉด ์ผ๋ฐ˜์ ์œผ๋กœ ์ผ๊ด€์„ฑ์„ ์œ„ํ•ด {{attrs.foo}} ๋ณด๋‹ค๋Š” {{foo}} ์„ ํ˜ธํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค. ๋ช…ํ™•ํ™” ํ•  ํ•„์š”๊ฐ€ ์žˆ๋‹ค๊ณ  ์ƒ๊ฐ๋˜๋ฉด innerFoo ๋Œ€ outerFoo ์™€ ๊ฐ™์€ ์ด๋ฆ„์„ ์–ธ์ œ๋“ ์ง€ ์ง€์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

@locks์˜ https://locks.svbtle.com/to-attrs-or-not-to-attrs๋„ ์ฐธ์กฐํ•˜์‹ญ์‹œ์˜ค.

์ฃผ์˜ ์‚ฌํ•ญ

ํฌํŒ… ํ•œ ํ…Œ์ŠคํŠธ๊ฐ€ Glimmer 2 ๋˜๋Š” HTMLBar์—์„œ ์ž‘๋™ํ•˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. (๋‘ ์—”์ง„ ๋ชจ๋‘์—์„œ ์ž‘๋™ํ•˜์ง€ ์•Š์œผ๋ฉด ๋ญ”๊ฐ€ ์ž˜๋ชปํ•œ ๊ฒƒ์ž…๋‹ˆ๋‹ค.)

Glimmer 2์—์„œ ์ž‘๋™ํ•˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ ํ•ด๋‹น ๊ธฐ๋Šฅ์„ ์•„์ง ์™„์ „ํžˆ ๊ตฌํ˜„ํ•˜์ง€ ์•Š์•˜๊ธฐ ๋•Œ๋ฌธ์ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. (์˜ˆ๋ฅผ ๋“ค์–ด ๊ธฐ๋ณธ ๊ตฌ์„ฑ ์š”์†Œ ์ง€์›์„ ๊ตฌํ˜„ํ–ˆ์ง€๋งŒ ํ˜„์žฌ attributeBindings ๋Š” ๊ตฌํ˜„ํ•˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.)

์ด ๊ฒฝ์šฐ์—๋„ ํ…Œ์ŠคํŠธ๋ฅผ ์ƒˆ๋กœ์šด ์Šคํƒ€์ผ๋กœ ์ด์‹ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค. ๊ทธ๋ž˜์•ผ ๊ธฐ๋Šฅ์ด ๊ตฌํ˜„ ๋  ๋•Œ ๊ฐ„๋‹จํžˆ ํ™œ์„ฑํ™” ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. Glimmer 2์— ๋Œ€ํ•œ ํ…Œ์ŠคํŠธ๋ฅผ ์ผ์‹œ์ ์œผ๋กœ ๋น„ํ™œ์„ฑํ™”ํ•˜๋ ค๋ฉด ๋ฉ”์„œ๋“œ ์ด๋ฆ„์˜ @test ์ ‘๋‘์‚ฌ๋ฅผ @htmlbars ๋กœ ๋ฐ”๊พธ๋ฉด๋ฉ๋‹ˆ๋‹ค ( "HTMLBars์—์„œ๋งŒ ์‹คํ–‰"์„ ์˜๋ฏธ ํ•จ). ๋‹น์‹ ์€ ๋˜ํ•œ ์ ‘๋‘์‚ฌ์— ์˜ํ•ด ์ „์ฒด ๋ชจ๋“ˆ์„ ํ•ด์ œ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค moduleFor ์— ์ด๋ฆ„์„ @htmlbars .

๋“œ๋ฌธ ๊ฒฝ์šฐ์ง€๋งŒ ํ…Œ์ŠคํŠธ๋Š” Glimmer 2์—์„œ ์ œ๋Œ€๋กœ ์ž‘๋™ํ•˜์ง€๋งŒ HTMLBar์—์„œ๋Š” ํ†ต๊ณผํ•˜์ง€ ๋ชปํ•ฉ๋‹ˆ๋‹ค. ํ…Œ์ŠคํŠธ์ค‘์ธ ์˜๋ฏธ๊ฐ€ ์˜ฌ๋ฐ”๋ฅธ์ง€ ๋‹ค์‹œ ํ™•์ธํ•ด์•ผํ•˜์ง€๋งŒ ํ˜„์žฌ HTMLBars ๊ตฌํ˜„์— ๋‹จ์ˆœํžˆ ๋ฒ„๊ทธ๊ฐ€์žˆ์„ ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. (์ด๊ฒƒ์€ ์ผ๋ฐ˜์ ์œผ๋กœ ์ƒˆ๋กœ์šด "๋งคํŠธ๋ฆญ์Šค ์Šคํƒ€์ผ"์„ ์‚ฌ์šฉํ•˜์—ฌ ์ผ๋ถ€ HTMLBars ๊ธฐ๋Šฅ์„ ํ…Œ์ŠคํŠธ ํ•  ๋•Œ ๋ฐœ์ƒํ•˜๋ฉฐ, ์ผ๋ถ€ ๊ฒฝ์šฐ์—๋Š” ๊ฐ’์ด ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์—…๋ฐ์ดํŠธ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.)

์ด ๊ฒฝ์šฐ ์œ ์‚ฌํ•˜๊ฒŒ ๊ฐœ๋ณ„ ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค ๋˜๋Š” ์ „์ฒด ๋ชจ๋“ˆ์„ @glimmer ๋กœ ํ”Œ๋ž˜๊ทธ ์ง€์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๊ฒƒ์€ ๋งค์šฐ ๋“œ๋ฌผ๊ฒŒ ์˜ˆ์ƒ๋˜๊ธฐ ๋•Œ๋ฌธ์— (๋ฒ„๊ทธ ์ˆ˜์ •์ด ํ•„์š”ํ•  ์ˆ˜ ์žˆ์Œ), ์ค„ ์ฃผ์„์— ๋ฐœ์ƒํ•œ ๋ฌธ์ œ์— ๋Œ€ํ•œ ๊ฐ„๋žตํ•œ ์„ค๋ช…์„ ํฌํ•จ ํ•  ์ˆ˜ ์žˆ์œผ๋ฉด ๋„์›€์ด ๋  ๊ฒƒ์ž…๋‹ˆ๋‹ค.

์˜ˆ

๋‹ค์Œ์€ ์ปค๋ฎค๋‹ˆํ‹ฐ ๊ตฌ์„ฑ์›์ด ๊ธฐ์กด ํ…Œ์ŠคํŠธ๋ฅผ ์ด์‹ํ•˜๋Š” ๋ฐ ๋„์›€์„ ์ค€ ํ›Œ๋ฅญํ•œ ์˜ˆ์ž…๋‹ˆ๋‹ค.

  • # 12920 ์ธ๋ผ์ธ {{if}} ๋„์šฐ๋ฏธ
  • # 12927 {{#with}}
  • # 13019 ์ธ๋ผ์ธ {{unless}}
  • # 13093 (hash) ๋„์šฐ๋ฏธ

๋ณด์‹œ๋‹ค์‹œํ”ผ ์ดˆ๊ธฐ ๋ฐ˜๋ณต์€ ๋” ์–ด๋ ค์› ์ง€๋งŒ (์šฐ๋ฆฌ๋Š” ์—ฌ์ „ํžˆ ๊ณต์œ  ๋œ ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค ์Šคํ† ๋ฆฌ๋ฅผ ํŒŒ์•…ํ•˜๊ณ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค) ํ›„์ž์˜ ์‹œ๋„๋Š” ๋น„๊ต์  ๊ฐ„๋‹จํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ธธ์„ ์—ด์–ด ์ค€ @GavinJoyce ์™€ @chadhietala ์—๊ฒŒ ๊ฐ์‚ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค!

๊ทธ๋ž˜์„œ .. ์–ด๋””์„œ๋ถ€ํ„ฐ ์‹œ์ž‘ํ•ด์•ผํ•˜๋‚˜์š”?

๋‹ค์Œ์€ ์ข‹์€ ์ถœ๋ฐœ์  ๋ชฉ๋ก์ž…๋‹ˆ๋‹ค. ์ด ์ค‘ ํ•˜๋‚˜์— ๋Œ€ํ•ด ์ง„์ง€ํ•˜๊ฒŒ ์ž‘์—…ํ•˜๋Š” ๊ฒฝ์šฐ ๋‹ค๋ฅธ ์‚ฌ๋žŒ๋“ค์ด ์ž‘์—…ํ•˜์ง€ ์•Š๋Š” ๊ฒƒ์„ ์•Œ ์ˆ˜ ์žˆ๋„๋ก ์•„๋ž˜์— ์˜๊ฒฌ์„ ๋‚จ๊ธฐ๊ณ  ์‹ถ์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค. (์‹œ๊ฐ„์ด ๋ถ€์กฑํ•˜๊ฑฐ๋‚˜ ํฐ ์–ด๋ ค์›€์„ ๊ฒช์€ ๊ฒฝ์šฐ "์ž ๊ธˆ ํ•ด์ œ"๋กœ ๋Œ์•„ ์˜ค๊ฑฐ๋‚˜ WIP ์ž‘์—…์„ ๋ฐ€์–ด ๋‹ค๋ฅธ ์‚ฌ๋žŒ์ด ์„ ํƒํ•  ์ˆ˜ ์žˆ๋„๋กํ•˜์‹ญ์‹œ์˜ค!)

  • [x] @chancancode์˜ ๊ธฐ๋ณธ ์ฝ˜ํ…์ธ  ๋ Œ๋”๋ง ํ…Œ์ŠคํŠธ

์ด๊ฒƒ์ด ์ด๋ฏธ ์กด์žฌํ•˜๋Š”์ง€ ๋ชจ๋ฅด๊ฒ ์Šต๋‹ˆ๋‹ค. ๊ทธ๊ฒƒ์ด ์žˆ๋‹ค๋ฉด ๊ทธ๊ฒƒ์„ ์ฐพ์•„์„œ ํฌํŠธํ•˜์‹ญ์‹œ์˜ค. ๊ทธ๋Ÿฌ๋‚˜ ๊ทธ๋ ‡์ง€ ์•Š์œผ๋ฉด ์ƒˆ ํŒŒ์ผ์„ ๋งŒ๋“œ์‹ญ์‹œ์˜ค (์ด๋ฏธ https://github.com/emberjs/ember.js/blob/master/packages/ember-glimmer/tests/integration/content-test.js์—์„œ ์‹œ์ž‘ํ–ˆ์Šต๋‹ˆ๋‹ค) . ์•„์ด๋””์–ด๋Š” "DOM์— ์ด์ƒํ•œ ๊ฒƒ์„ ๋„ฃ์œผ๋ฉด ์–ด๋–ป๊ฒŒ๋˜๋Š”์ง€"ํ…Œ์ŠคํŠธํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์˜ˆ : {{foo}} , ์—ฌ๊ธฐ์„œ foo ๋Š” undefined , null , ๋ฐ ๊ฐ์ฒด ๋“ฑ. ์ด๊ฒƒ์€ "๋งคํŠธ๋ฆญ์Šค ์Šคํƒ€์ผ"ํ…Œ์ŠคํŠธ์˜ ์ฃผ์š” ๋Œ€์ƒ์ด๋ฏ€๋กœ ํ…Œ์ŠคํŠธ ๋„๊ตฌ๊ฐ€ ์ž‘๋™ํ•˜๋Š” ๋ฐฉ์‹์„ ์—ฐ๊ตฌํ•˜๊ณ  ์กฐ๊ฑด๋ถ€ ํ…Œ์ŠคํŠธ์—์„œ ์•„์ด๋””์–ด๋ฅผ ๋„์ถœํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.

๋˜ํ•œ https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/hooks/text_node_test.js๋„ ํก์ˆ˜ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.

  • [x] [ attr_nodes ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/tree/master/packages/ember-htmlbars/tests/attr_nodes) (: lock : @chancancode ๋ฐ @ wycats)

์ด๋Ÿฌํ•œ ํ…Œ์ŠคํŠธ๋ฅผ ์ž์„ธํžˆ ์‚ดํŽด๋ณด๊ณ  ์š”๊ตฌ ์‚ฌํ•ญ์„ ์ดํ•ดํ•˜๊ณ  ์‹ถ์Šต๋‹ˆ๋‹ค. ์ง€๊ธˆ์€ ์ž ๊ธ‰๋‹ˆ๋‹ค.

  • [] [ compat ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/tree/master/packages/ember-htmlbars/tests/compat) : ๊ฐ€์œ„ :

2.6๊นŒ์ง€ ๋ ˆ๊ฑฐ์‹œ ์• ๋“œ์˜จ์— ๋Œ€ํ•œ ์ง€์›์„ ์ข…๋ฃŒํ•œ๋‹ค๊ณ  ๋ฐœํ‘œ ํ–ˆ์œผ๋ฏ€๋กœ Glimmer 2์—์„œ ์ด๋Ÿฌํ•œ ๊ธฐ๋Šฅ์„ ์ง€์›ํ•  ํ•„์š”๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค. PR์„ ์—ด์–ด ๋งˆ์Šคํ„ฐ์˜ ํ…Œ์ŠคํŠธ ๋ฐ ๊ธฐ๋Šฅ์„ ์ œ๊ฑฐํ•˜์‹ญ์‹œ์˜ค. (์ด๊ฒƒ์€ ์•„๋งˆ๋„ ์ฝ”๋“œ๋ฒ ์ด์Šค์— ๋Œ€ํ•œ ์ƒ๋Œ€์ ์œผ๋กœ ๊นŠ์€ ์ง€์‹์ด ํ•„์š”ํ•  ๊ฒƒ์ž…๋‹ˆ๋‹ค.)

  • [x] [ glimmer-component ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/tree/master/packages/ember-htmlbars/tests/glimmer-component) : scissors : # 13139 by @ Lorcan

์ด ํด๋”๋Š” ์‚ฌ์šฉ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์ œ๊ฑฐํ•˜๋ ค๋ฉด PR์„ ๋ณด๋‚ด์‹ญ์‹œ์˜ค.

  • ๋„์šฐ๋ฏธ ( tests/integration/helpers ๋กœ ์˜ฎ๊ฒจ์•ผํ•œ๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค)

    • [] [ -html-safe ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/-html-safe-test.js) : lock :

I'm not sure if this is needed for Glimmer 2. Locking for now.

  • [x] [ closure component ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/closure_component_test.js) (: lock : by @ ์„ธ๋ผ ๋ฒ )
I am pretty sure this will have to be `@htmlbars` for now.

  • [x] [ collection ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/collection_test.js) : ๊ฐ€์œ„ : # 13161 ์ž‘์„ฑ์ž @HeroicEric
This is legacy. Please open a PR to remove the test and any code you could find that implements the feature.

  • [x] [ #component helper] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/component_test.js) # 13140 by @GavinJoyce
Basic support for the feature has landed in #13057 and we already wrote some basic tests. Please port the rest of the tests into the new file (keep an eye for things that are already tested in the new file). I expect most of them to pass except position params which is not yet implemented in Glimmer 2 (you can make them `@htmlbars` for now).

  • [x] [custom helper tests] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/custom_helper_test.js) # 13138 by @zackthehuman
Basic support for the feature has landed in #12910/#13087 and we already wrote some basic tests. Please port the rest of the tests into the new file (keep an eye for things that are already tested in the new file). I expect most of them to pass with the exception of the lifecycle stuff (destroy, etc) for class-based helpers (you can make them `@htmlbars` for now).

  • [x] [ debug ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/debug_test.js) : scissors : # 13129 ์ž‘์„ฑ์ž @ code0100fun
This is a duplicate of `log` as far as I can tell. See notes on `log` tests below.

  • [x] [ #each-in ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/each_in_test.js) # 13136 by @mmun
This should be ported to `test/intergration/syntax/...`. (In general, what was previously known as "block helpers" are now implemented as "syntax" in Glimmer 2.) 

This helper is not implemented in Glimmer 2 and will be pretty difficult for a new contributor to implement it. However, it is still important to port the tests asap (and make the module `@htmlbars`).

For bonus points, you might want to think about how to share the basic tests with the rest of the conditional matrix (i.e. testing when we need to go into the "default" branch and when we need to go into the "inverse"/`{{else}}` branch). See #13048 for some inspiration.

  • [x] [ #each ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/each_test.js) ๐Ÿ”’ @Joelkang ์ œ๊ณต
This should be ported to `test/intergration/syntax/...`. (In general, what was previously known as "block helpers" are now implemented as "syntax" in Glimmer 2.) 

Basic support for the feature has landed in #13048 and we already wrote some basic tests. Please port the rest of the tests into the new file (keep an eye for things that are already tested in the new file). I expect most of them to pass with the exception of the lifecycle stuff (destroy, etc) for class-based helpers (you can make them `@htmlbars` for now).

For bonus points, you might want to think about how to share the basic tests with the rest of the conditional matrix (i.e. testing when we need to go into the "default" branch and when we need to go into the "inverse"/`{{else}}` branch). I _think_ we already did that part in #13048, but if you see other ways to improve it or do more sharing please feel free to suggest them.

  • [x] [ get ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/get_test.js) # 13173 , # 13264 ์ž‘์„ฑ์ž @ ro0gr
This helper is not implemented in Glimmer 2 and will be pretty difficult for a new contributor to implement it. However, it is still important to port the tests asap (and make the module `@htmlbars`). 

(Actually, it's not _that_ hard โ€“ the implementation will likely not take more than 10-20 lines, but you would need to be quite familiar with how Glimmer 2 works to do it. Once #13103 is completed it might give you some ideas.)

  • [x] [if / unless tests] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/if_unless_test.js)
I believe this is already ported by @GavinJoyce. The rest are probably just legacy stuff that we can remove. <strong i="23">@GavinJoyce</strong> can you confirm?

  • [] [ {{input}} ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/input_test.js) (: lock : by @ ๊ฐœ๋นˆ ์กฐ์ด์Šค)
This helper is a not implemented in Glimmer 2 and will be pretty difficult for a new contributor to implement it. However, it is still important to port the tests asap (and make the module `@htmlbars`). 

(More precisely, the helper uses component features that are not yet implemented, such as attribute bindings. Once they are implemented the tests will probably Just Passโ„ข.)

  • [x] [ loc ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/loc_test.js) # 13129 by @ code0100fun
The helper is not implemented in Glimmer 2, but should be trivial if you want to do it. (See #12910 or #13093) Otherwise you can always mark the module as `@htmlbars`.

  • [x] [ log ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/log_test.js) # 13131 by @green -ํ™”์‚ด
The helper is not implemented in Glimmer 2, but should be trivial if you want to do it. (See #12910 or #13093) Otherwise you can always mark the module as `@htmlbars`. As mentioned above, I think `debug_test.js` is just a duplicate of this, please verify and delete that file. **As an exception**, we only want to test initial render here, not the usual "I-N-U-R" cycle.

  • [x] [ partial ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/partial_test.js) # 13199 , # 13306 ์ž‘์„ฑ์ž @jheth ๋ฐ @chadhietala
This functionality is not implemented in Glimmer 2 and will be pretty difficult for a new contributor to implement it. However, it is still important to port the tests asap (and make the module `@htmlbars`). Please consider adding some abstractions like `this.registerPartial`.

This helper is a not implemented in Glimmer 2 and will be pretty difficult for a new contributor to implement it. However, it is still important to port the tests asap (and make the module `@htmlbars`). 

(More precisely, the helper uses component features that are not yet implemented, such as attribute bindings. Once they are implemented the tests will probably Just Passโ„ข.)

  • [x] [ unbound ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/unbound_test.js) # 13137 by @chadhietala
This helper is not implemented in Glimmer 2 and will be pretty difficult for a new contributor to implement it. However, it is still important to port the tests asap (and make the module `@htmlbars`). 

(Actually, it's not _that_ hard โ€“ the implementation will likely not take more than 10-20 lines, but you would need to be quite familiar with how Glimmer 2 works to do it. Once #13103 is completed it might give you some ideas.)

  • [x] [ view ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/view_test.js) (: lock : by @chadhietala)
We announced we will end support for the legacy addons by 2.6, so we won't need to support these features in Glimmer 2. Please carefully review these tests and see if there are anything that doesn't look like deprecated/legacy functionality. Otherwise, please open PRs to remove the tests and the features on master. (This would probably require relatively deep knowledge of the codebase.)

  • [x] [ with ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/with_test.js)
I believe this is already ported by @chadhietala. The rest are probably just legacy stuff that we can remove. <strong i="5">@chadhietala</strong> can you confirm?

  • [x] [ yield ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/yield_test.js) (: lock : by @kiwiupover)
The feature should work in Glimmer 2 (as <strong i="12">@chadhietala</strong> pointed out in https://github.com/emberjs/ember.js/pull/13093#discussion_r55926094). Please port the rest of the tests into a new file. I expect most of them to pass. There are a lot of legacy stuff in there, so please try to understand the spirit of the test and see if they are still needed (vs they are testing a legitimate thing but just happen to use legacy semantics to test them, in which case, you should port them using non-legacy semantics).

  • "ํ†ตํ•ฉ"ํ…Œ์ŠคํŠธ

    • [x] [ "์†์„ฑ ๋ฐ”์ธ๋”ฉ"ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/integration/attribute_bindings_test.js) ๐Ÿ”’ @chadhietala #

The actual `attributeBindings` feature on components is not yet implemented, but this file doesn't seem to be testing that at all. In fact, I cannot tell what this file is testing at all. Please do investigate! (I suspect this is something we already tested, perhaps <strong i="24">@GavinJoyce</strong> or <strong i="25">@chadhietala</strong> will know.)

  • [x] [ "attrs_lookup"ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/integration/attrs_lookup_test.js) # 13203 by @Joelkang
This is probably the one place where it makes sense to test `{{attrs.foo}}` vs `{{foo}}`. I expect them to already work in Glimmer 2. However, components lifecycle hooks (e.g. `didReceiveAttrs`) is not yet implemented, so you would have to either port the test without using them, or tests that needs them as `@htmlbars` for now.

  • [x] [ "๋ฐ”์ธ๋”ฉ ํ†ตํ•ฉ"ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/integration/binding_integration_test.js) # 13210 by @Joelkang
Some of these tests belongs in other files (e.g. helper without parameters should be tested inside helper tests, undefined property probably belongs in the "Basic content rendering tests". The `Binding` and computed property tests are fine here, and they should Just Workโ„ข on Glimmer to with some modernizing. (We might want to be want to be a little bit more through with CPs if this turns out to be the only place that tests them โ€“ like updating a dependent key updates the output, etc.) The view stuff seems largely incidental, you should be able to rewrite them without the legacy semantics, but there does seem to be one or two tests that are just testing legacy semantics (based on a quick scan). Please do investigate!

  • [x] [ "block params"ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/integration/block_params_test.js) # 13189 by @Joelkang
I _think_ we should be able to find a better home the stuff tested in here (like in the helpers and components files), but even just straight porting them would be helpful.

  • [x] [ elementId ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/integration/component_element_id_test.js) # 13208 by @jheth
This should be tested in https://github.com/emberjs/ember.js/blob/master/packages/ember-glimmer/tests/integration/components/curly-components-test.js and I think it should just work in Glimmer 2. It probably doesn't make sense to test updating for this test โ€“ I don't think we support updating the `elementId`, but please do investigate!

(If we start adding more tests for components, it probably makes sense to start splitting them up into different modules/files.)

  • [x] [์ปดํฌ๋„ŒํŠธ ํ˜ธ์ถœ ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/integration/component_invocation_test.js) # 12890 by @Serabe
This is the monster file that tests all things components. It should probably be tested in https://github.com/emberjs/ember.js/blob/master/packages/ember-glimmer/tests/integration/components/curly-components-test.js, but as I said above, we probably want to start breaking things up. Some of the features are not implemented Glimmer 2 yet, so feel free to use `@htmlbars` liberally.

  • [x] [๊ตฌ์„ฑ ์š”์†Œ ์ˆ˜๋ช…์ฃผ๊ธฐ ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/integration/component_lifecycle_test.js) (: lock : @chancancode ๋ฐ @ wycats)
Most of these functionality are not yet implemented in Glimmer 2, so you might have to `@htmlbars` the entire module.

  • [x] [ "escape"ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/integration/escape_integration_test.js) # 13143 by @ code0100fun + # 13259
I _think_ we should be able to find a better home the stuff tested in here (like in the content tests file), but even just straight porting them would be helpful.

  • [x] [ "๋„์šฐ๋ฏธ ์กฐํšŒ"ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/integration/helper-lookup-test.js) : ๊ฐ€์œ„ : # 13147 by @chadhietala
I think this must already be tested in the helpers test? Please do investigate and open a PR to remove if true.

  • [x] [ test] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/integration/input_test.js) (: lock : by @paddyobrien)
This is testing the `<input>` HTML element, not the `{{input}}` helper. I won't be surprised if a lot of them doesn't work in Glimmer 2 yet, but it would be very helpful to know. Please port the test cases and flag with `@htmlbars` as needed.

  • [x] [ "๋กœ์ปฌ ์กฐํšŒ"ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/integration/helper-lookup-test.js) : ๊ฐ€์œ„ :
I'm not sure if this is implemented in Glimmer 2 yet. Please port the test cases and flag with `@htmlbars` as needed.

  • [x] [ "๋ณ€๊ฒฝ ๊ฐ€๋Šฅํ•œ ๋ฐ”์ธ๋”ฉ"ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/integration/mutable_binding_test.js) : lock :
The Glimmer 2 implementation might change the story a bit, locking for now.

  • [x] [ select ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/select_in_template_test.js) : ๊ฐ€์œ„ : # 13144 ์ž‘์„ฑ์ž @HeroicEric
This is legacy. Please open a PR to remove the test and any code you could find that implements the feature.

  • [x] [ "ํƒœ๊ทธ์—†๋Š” ๋ทฐ"ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/tagless_views_rerender_test.js) : scissors : # 13146 by @ Chadhietala
I'm pretty sure this is already tested somewhere in the `if/each` tests. (The concept "tagless views" doesn't make any sense because even in htmlbars they are not implemented as views anymore.) If I am wrong, please port them into the `if/each` test files as appropriate and :scissors: this.

  • [x] [ "void element"ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/void-element-component-test.js) : ๊ฐ€์œ„ : # 13187 by @MatrixZ
I'm pretty sure this is already tested in the components test. (`tagName` is not implemented yet, but it doesn't seem important for the test.) If I am wrong, please port them into the curly component test files as appropriate and :scissors: this.

  • [x] [ "willDestroyElement"ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/will-destroy-element-hook-test.js) (: lock : @krisselden ์ž‘์„ฑ)
I don't think the `willDestroyElement` hook is implemented in Glimmer 2, but the `willDestroy` hook is (and we already have tests for them in https://github.com/emberjs/ember.js/blob/master/packages/ember-glimmer/tests/integration/components/curly-components-test.js#L202). ~~Please investigate if there are any semantic differences (ordering, etc) between the two hooks. If they have the same semantics, we might just want to merge the two tests and test it "matrix style" (please check if the two tests are actually testing the same thing, if not, it's perfectly fine to have > 1 test).~~ Otherwise please port it with `@htmlbars`.

  • [x] [ "with + view"ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/integration/with_view_test.js) : scissors : # 13149 by ๋ฟก ๋นต๋€จ
The `{{view}}` part is obviously legacy, if there are something that we didn't otherwise cover in the `{{#with}}` tests, please port them there, otherwise :scissors: /cc <strong i="13">@chadhietala</strong>

  • [] [ "๋…ธ๋“œ ๊ด€๋ฆฌ์ž๋ณด๊ธฐ"ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/node-managers/view-node-manager-test.js ) : ๊ฐ€์œ„ : : ์งˆ๋ฌธ :

ViewNodManager ์˜ ๊ตฌํ˜„์€ ์•„๋งˆ๋„ ์•ฝ๊ฐ„ ๋” ์˜ค๋ž˜ ๋จธ๋ฌด๋ฅผ ํ•„์š”๊ฐ€์žˆ์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์™œ๋ƒํ•˜๋ฉด ๋‚ด๋ถ€์  ์ธ ๊ฒƒ๋“ค์€ ์—ฌ์ „ํžˆ โ€‹โ€‹htmlbar์—์„œ ๋ทฐ๋กœ ๊ตฌํ˜„๋˜๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ์ด๊ฒƒ์€ ์ค‘์š”ํ•œ ๊ฒƒ์„ ํ…Œ์ŠคํŠธํ•˜๋Š” ๊ฒƒ ๊ฐ™์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๊ทธ๋ž˜์„œ ์šฐ๋ฆฌ๋Š” ์•„๋งˆ๋„ : scissors : ๊ทธ๊ฒƒ? @rwjblue ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๊นŒ?

  • "์‹œ์Šคํ…œ"ํ…Œ์ŠคํŠธ

    • [x] [ "ํ…œํ”Œ๋ฆฟ๋ณด๊ธฐ ์ถ”๊ฐ€"] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/system/append-templated-view-test.js) : ๊ฐ€์œ„ : # 13148 by @chadhietala

This is likely legacy. Please do investigate!

  • [x] [ "๋ถ€ํŠธ ์ŠคํŠธ๋žฉ"ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/system/bootstrap_test.js) : question : : lock : @krisselden
This seems to be testing `Ember.TEMPLATES`. I don't know if this is legacy, locking for now. <strong i="11">@rwjblue</strong> can you confirm and update this item? If it's legacy, we can just :scissors: this and the implementation. If it's not, I assume it's already handled at the container/resolver level and they should Just Workโ„ข in Glimmer 2 after porting.

  • [] [ "lookup helper"ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/system/lookup-helper_test.js) : lock : @mixonic
Please do investigate what this is testing, and see if it could be merged into the helpers integration tests.

  • [x] [ "๋ Œ๋” ํ™˜๊ฒฝ"ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/system/render_env_test.js) : scissors : : lock : https : //github.com/emberjs/ember.js/pull/13399 @mixonic
This seems to be testing 'view.env`. I don't know if this is legacy, locking for now. @rwjblue/<strong i="22">@wycats</strong> can you confirm and update this item?

ํฌํŒ…ํ•ด์•ผ ํ•  ๋‹ค๋ฅธ ํ…Œ์ŠคํŠธ๋„์žˆ์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๋‚ด๊ฐ€ ๋†“์นœ ๊ฒƒ์„ ๋ฐœ๊ฒฌํ–ˆ๋‹ค๋ฉด ๋Œ“๊ธ€์— ์–ธ๊ธ‰ํ•˜์‹ญ์‹œ์˜ค.

๋ฆฌ๋ทฐ

PR์„ ์ œ์ถœํ•  ์ค€๋น„๊ฐ€ ๋˜์—ˆ์œผ๋ฉด (WIP PR์„ ์ œ์ถœํ•ด๋„๋ฉ๋‹ˆ๋‹ค!) PR ์„ค๋ช…์—์„œ์ด ๋ฌธ์ œ๋ฅผ ์ฐธ์กฐํ•˜์—ฌ ๊ฒ€ํ†  ํ•  ์ˆ˜ ์žˆ๋„๋กํ•˜์‹ญ์‹œ์˜ค.

๊ธฐ๊ฐ„

๊ฐ€๋Šฅํ•œ ํ•œ ๋นจ๋ฆฌ ๋งŽ์€ ํ…Œ์ŠคํŠธ๋ฅผ ์ด์‹ํ•˜๋ ค๊ณ ํ•ฉ๋‹ˆ๋‹ค. ์ด์ƒ์ ์œผ๋กœ๋Š” ๋‹ค์Œ ์ฃผ ๋˜๋Š” 2 ์ฃผ ๋‚ด์— ๋Œ€๋ถ€๋ถ„์˜ (๋ชจ๋‘๋Š” ์•„๋‹ˆ์ง€๋งŒ) ํ…Œ์ŠคํŠธ๋ฅผ ์ด์‹ํ•˜๊ณ  ์‹ถ์Šต๋‹ˆ๋‹ค.

๋‹น์‹ ์˜ ๋„์›€์— ๋ฏธ๋ฆฌ ๊ฐ์‚ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค! : heart : : yellow_heart : : green_heart : : blue_heart : : purple_heart :

Glimmer2 Help Wanted

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

๊ทธ๋ƒฅ ๋›ฐ์–ด ๋“ค๊ณ  ์šฐ๋ฆฌ๋ฅผ ๋„์™€ ์ฃผ์‹  ๋ชจ๋“  ๋ถ„๋“ค๊ป˜ ๊ฐ์‚ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค! ๐Ÿ˜„ ์ง€์—ฐ์— ๋Œ€ํ•ด ์‚ฌ๊ณผ๋“œ๋ฆฝ๋‹ˆ๋‹ค. ์šฐ๋ฆฌ๋Š” ์ฒœ์ฒœํžˆ ๋ฐฑ ๋กœ๊ทธ์—์„œ ์ž์‹ ์„ ํŒŒํ—ค ์น˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋งŽ์€ : lock : ed ํ•ญ๋ชฉ์— ์ด๋ฏธ ๊ฒ€ํ†  ๋Œ€๊ธฐ์ค‘์ธ PR์ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์— Github์˜ ์ง„ํ–‰๋ฅ  ํ‘œ์‹œ ์ค„์— ํ‘œ์‹œ๋˜๋Š” ๊ฒƒ๋ณด๋‹ค ๋” ๊ฐ€๊น์Šต๋‹ˆ๋‹ค ๐ŸŽ‰

๋ชจ๋“  44 ๋Œ“๊ธ€

"willDestroyElement"ํ…Œ์ŠคํŠธ๋ฅผ ์‚ดํŽด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

ํ•ต์‹ฌ์€ didInsertElement์˜ ์—ญ์œผ๋กœ โ€‹โ€‹๊ฐ„์ฃผ๋˜๋ฏ€๋กœ DOM ๋ถ„ํ•ด ์ด์ „์— ์‹คํ–‰๋˜๋ฏ€๋กœ DOM ๋ถ„ํ•ด ํ›„ ๋น„๋™๊ธฐ ์ธ willDestroy์— ์˜ํ•ด ์ฒ˜๋ฆฌ ๋  ๊ฐ€๋Šฅ์„ฑ์ด ๊ฑฐ์˜ ์—†์Šต๋‹ˆ๋‹ค. ๋˜ํ•œ didInsertElement ํ›„ํฌ๊ฐ€ ์‹คํ–‰ ๋œ ๊ฒฝ์šฐ์—๋งŒ ์‹คํ–‰๋˜์–ด์•ผํ•ฉ๋‹ˆ๋‹ค.

@GavinJoyce ๊ตฌ์„ฑ ์š”์†Œ ๋„์šฐ๋ฏธ์—์„œ ๋„ˆ๋ฌด ๋Šฆ๊ฒŒ ๋ฐœ์ƒํ•˜๋Š”์ด ์ˆ˜๋ช…์ฃผ๊ธฐ ํ›„ํฌ์™€ ํ•จ๊ป˜ htmlbars์— ํ˜„์žฌ ๋ฒ„๊ทธ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. https://github.com/emberjs/ember.js/issues/13028

๋˜ํ•œ ํ˜„์žฌ each / else https://github.com/emberjs/ember.js/issues/12716์— ๋ฒ„๊ทธ๊ฐ€

๋˜ํ•œ 1.13์—์„œ ์‚ฌ์šฉํ•  ์ˆ˜์žˆ๋Š” parentView๋ฅผ ํšŒ๊ท€ํ–ˆ์ง€๋งŒ ๊ทธ๊ฒƒ์€ ๊ฐœ์ธ API์ด๋ฉฐ ์‚ฌ๋žŒ๋“ค์ด ๋ง‰ํžˆ๋Š” ์ด์œ ์ธ์ง€ ํ™•์‹คํ•˜์ง€ ์•Š์€ ํ•œ๋™์•ˆ ๊ทธ๋žฌ์Šต๋‹ˆ๋‹ค.

ํฌ๋ฏธํ•œ ์ˆ˜๋ช…์ฃผ๊ธฐ๋ฅผ ๋‹ค๋ฃจ๋Š” ๋‹ค๋ฅธ ํ…Œ์ŠคํŠธ๊ฐ€ ์žˆ์Šต๋‹ˆ๊นŒ? ๊ตฌ์„ฑ ์š”์†Œ๋ฅผ ์ถ”๊ฐ€ / ์ œ๊ฑฐํ•˜๋Š” ๋ชจ๋“  ํ…Œ์ŠคํŠธ์— ์ถ”๊ฐ€ํ•ด์•ผ ํ•  ๊ฒƒ์ž…๋‹ˆ๋‹ค. / cc @wycats @chancancode

  • [x] [ loc ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/loc_test.js) ( # 13129 )

์ด์‹๋˜์ง€ ์•Š์€ #with ํ…Œ์ŠคํŠธ๋ฅผ ์‚ญ์ œํ•  ์ˆ˜ ์žˆ๋Š”์ง€ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค.

  • [x] ๊ธฐ์กด #with ํ…Œ์ŠคํŠธ ์ œ๊ฑฐ # 13130

ํ™๋ณด # 13131

  • [x] [ log ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/log_test.js)
  • [x] [ debug ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/helpers/debug_test.js)

๋‚˜๋Š” unbound ์ทจํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค : ์ž ๊ธˆ :

each-in ํ…Œ์ŠคํŠธ๋ฅผ ์ด์‹ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

@chancancode- debug tests ํ•ญ๋ชฉ๋„ ํ™•์ธ / ์ œ๊ฑฐ ํ•  ์ˆ˜ ์žˆ๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค.

  • [x] custom-helper-tests

https://github.com/emberjs/ember.js/issues/13139 ๋Š” ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” glimmer-component ํ…Œ์ŠคํŠธ ํด๋”๋ฅผ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค.

"๊ธฐ๋ณธ ์ฝ˜ํ…์ธ  ๋ Œ๋”๋ง ํ…Œ์ŠคํŠธ"๋ฅผ ๋ฐ›๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค (๊ทธ๋ฆฌ๊ณ  Glimmer์—์„œ ๊ตฌํ˜„ ์ˆ˜์ •).

๋‚˜๋Š” " select test : scissors :"๋ฅผ ๋ฐ›๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

  • [x] [ "escape"ํ…Œ์ŠคํŠธ] (https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/tests/integration/escape_integration_test.js) WIP # 13143

5c12157์— ๋„์ž… ๋œ ์Šคํƒ€์ผ๊ณผ ์ผ์น˜ํ•˜๋„๋ก ์—…๋ฐ์ดํŠธ

์•„์ง ์ž ๊ฒจ ์žˆ์ง€ ์•Š์€ ๊ฒฝ์šฐ input ์š”์†Œ ํ…Œ์ŠคํŠธ๋ฅผ ์‚ดํŽด๋ณด๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

  • [x] ํƒœ๊ทธ์—†๋Š” ๋ทฐ ํ…Œ์ŠคํŠธ # 13146 : ๊ฐ€์œ„ :
  • [x] ๋„์šฐ๋ฏธ ์กฐํšŒ ํ…Œ์ŠคํŠธ # 13147 ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ๋จ & : ๊ฐ€์œ„ :
  • [x] "ํ…œํ”Œ๋ฆฟ๋ณด๊ธฐ ์ถ”๊ฐ€"# 13148 : ๊ฐ€์œ„ :
  • [x] "with + view"ํ…Œ์ŠคํŠธ # 13149 : ๊ฐ€์œ„ :

๋‚ด๊ฐ€ ์‚ดํŽด๋ณผ ๊ฒŒ

  • [x] ๋„์šฐ๋ฏธ ํ…Œ์ŠคํŠธ ๋ฐ›๊ธฐ # 13173 : lock :

์•„์ง Glimmer2์— ์ต์ˆ™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์–ด์จŒ๋“  # 13103์€ ์ด์ œ ๋ณ‘ํ•ฉ๋˜์—ˆ์œผ๋ฏ€๋กœ ๊ตฌํ˜„ ๋ฐฉ๋ฒ•์„ ์•Œ์•„ ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

ํด๋กœ์ € ๊ตฌ์„ฑ ์š”์†Œ์— ๋Œ€ํ•œ ๋ฒ„๊ทธ๋ฅผ ์ˆ˜์ •ํ•ด์•ผํ•˜๋ฏ€๋กœ closure component ์˜ ํ…Œ์ŠคํŠธ๋ฅผ ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

์šฐ๋ฆฌ๋Š” ์ƒ๋ช…์ฃผ๊ธฐ ํ›„ํฌ๋ฅผ ๊ตฌํ˜„ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. : lock : -ing the tests : ok_hand :

"๋ฌดํšจ ์š”์†Œ"ํ…Œ์ŠคํŠธ # 13187 : ๊ฐ€์œ„ :

block params ํ…Œ์ŠคํŠธ # 13189

: ์›จ์ด๋ธŒ : ๋‚ด๊ฐ€ ํ• ๊ฒŒ :

์ˆ˜์œจ ํ…Œ์ŠคํŠธ๋ฅผ ํ• ๊ฒŒ์š”

  • [] ์ˆ˜์œจ ํ…Œ์ŠคํŠธ

์ €๋„ ๊ณ„์†ํ•ด์„œ attrs_lookup ํ…Œ์ŠคํŠธ๋ฅผํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. PR # 13203

partial ๋„์šฐ๋ฏธ ํ…Œ์ŠคํŠธ๋ฅผ ์œ„ํ•ด # 13199๋ฅผ ์—ด์—ˆ์Šต๋‹ˆ๋‹ค.

binding integration ์‹œํ—˜ ์‘์‹œ

13213์ด {{yield}} ํ…Œ์ŠคํŠธ๋ฅผ ์œ„ํ•ด ์—ด๋ ค ์žˆ์Šต๋‹ˆ๋‹ค.

closure component ํ…Œ์ŠคํŠธ๋ฅผ ์œ„ํ•ด # 13214๋ฅผ ์—ฝ๋‹ˆ ๋‹ค.

{{tesxtarea}} ํ…Œ์ŠคํŠธ์˜ ๊ฒฝ์šฐ 13215

๋‚˜๋Š” view ๋„์šฐ๋ฏธ ํ…Œ์ŠคํŠธ์™€ ๊ทธ๊ฒƒ์ด ๋งŒ์ง€๋Š” ๋ชจ๋“  ๊ฒƒ์„ ๋ณผ ๊ฒƒ์ž…๋‹ˆ๋‹ค.

๊ทธ๋ƒฅ ๋›ฐ์–ด ๋“ค๊ณ  ์šฐ๋ฆฌ๋ฅผ ๋„์™€ ์ฃผ์‹  ๋ชจ๋“  ๋ถ„๋“ค๊ป˜ ๊ฐ์‚ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค! ๐Ÿ˜„ ์ง€์—ฐ์— ๋Œ€ํ•ด ์‚ฌ๊ณผ๋“œ๋ฆฝ๋‹ˆ๋‹ค. ์šฐ๋ฆฌ๋Š” ์ฒœ์ฒœํžˆ ๋ฐฑ ๋กœ๊ทธ์—์„œ ์ž์‹ ์„ ํŒŒํ—ค ์น˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋งŽ์€ : lock : ed ํ•ญ๋ชฉ์— ์ด๋ฏธ ๊ฒ€ํ†  ๋Œ€๊ธฐ์ค‘์ธ PR์ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์— Github์˜ ์ง„ํ–‰๋ฅ  ํ‘œ์‹œ ์ค„์— ํ‘œ์‹œ๋˜๋Š” ๊ฒƒ๋ณด๋‹ค ๋” ๊ฐ€๊น์Šต๋‹ˆ๋‹ค ๐ŸŽ‰

{{#each}} ํ…Œ์ŠคํŠธ : # 13349

"๋กœ์ปฌ ์กฐํšŒ"ํ…Œ์ŠคํŠธ๋ฅผํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

system/lookup-helper_test.js ํŒŒ์ผ์ด ์‹ค์ œ findHelper ๋ฉ”์„œ๋“œ๋ฅผ ํ…Œ์ŠคํŠธํ•˜๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.์ด ๋ฉ”์„œ๋“œ๋Š” integration/helpers/custom-helper-tests.js ํฌํ•จ ๋œ ๊ฒƒ์œผ๋กœ ๋ณด์ž…๋‹ˆ๋‹ค. ์šฐ๋ฆฌ๊ฐ€ ์‹ค์ œ ember-glimmer lib๋ฅผ ๋‹จ์œ„ ํ…Œ์ŠคํŠธํ•˜๊ณ ์žˆ๋Š” ๊ฒƒ ๊ฐ™์ง€ ์•Š์œผ๋‹ˆ โœ‚๏ธ? @chadhietala @asakusuma ๋‘ ๋ถ„ ๋ชจ๋‘ ๋„์šฐ๋ฏธ ์กฐํšŒ ๊ด€๋ จ ํ…Œ์ŠคํŠธ๋ฅผ ๋งŒ์กŒ

@Joelkang ๊ท€ํ•˜์˜ ์งˆ๋ฌธ๊ณผ ๊ด€๋ จ๋œ ๊ฒƒ์„ ๊ธฐ์–ตํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ๊ด€๋ จ๋œ ์ •ํ™•ํ•œ ํŒŒ์ผ์€ ๋ฌด์—‡์ž…๋‹ˆ๊นŒ? ๋‚ด๊ฐ€ ๋งŒ์ง„ git commit์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค๋ฉด ๋‚ด ๊ธฐ์–ต์„ ํ”๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

@asakusuma ์˜ค, ๋‚˜๋Š” ๋‹น์‹ ์ด ๋กœ์ปฌ ์กฐํšŒ ํ…Œ์ŠคํŠธ๋ฅผ ์ง„ํ–‰ํ•˜๊ณ  ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๊ณตํ†ต์ ์ด ์žˆ๋Š”์ง€ ํ™•์ธํ•˜๊ธฐ ์œ„ํ•ด ์˜๋ฏธํ–ˆ์Šต๋‹ˆ๋‹ค.

integration/helpers/custom-helper-tests.js ์€ (๋Š”) ๋กœ์ปฌ ์กฐํšŒ๋ฅผ ํ…Œ์ŠคํŠธํ•˜์ง€ ์•Š๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๋˜ํ•œ ๋กœ์ปฌ ์กฐํšŒ๋Š” ํ˜„์žฌ glimmer์—์„œ ์ž‘๋™ํ•˜์ง€ ์•Š์œผ๋ฉฐ ์ˆ˜์ • ์ž‘์—… ์ค‘์ž…๋‹ˆ๋‹ค.

๋ Œ๋” ํ™˜๊ฒฝ ํ…Œ์ŠคํŠธ๊ฐ€ ์ฐจ๋‹จ๋ฉ๋‹ˆ๋‹ค. ์ง€๊ธˆ "๋ถ€ํŠธ ์ŠคํŠธ๋žฉ"ํ…Œ์ŠคํŠธ๋ฅผ ์‚ดํŽด๋ณด๋ฉด ๋งŽ์€ ๋ถ€๋ถ„์ด ๊ธฐ๋Šฅ์œผ๋กœ ์ด์‹๋˜์–ด์•ผํ•ฉ๋‹ˆ๋‹ค ( <script type="text/x-handlebars" data-template-name="foo"> ).

mutable bindings ์˜ ๊ฐ„๋‹จํ•œ ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ : https://github.com/emberjs/ember.js/pull/13456

ํด๋กœ์ € ๊ตฌ์„ฑ ์š”์†Œ ํ…Œ์ŠคํŠธ๋Š” ์ด๋ฏธ ๋ช‡ ์ฃผ ์ „์— ๋ณ‘ํ•ฉ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

์—ฌ๊ธฐ์„œ ์—ด์‹ฌํžˆ ์ผ ํ•ด์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค! ์—…๋ฐ์ดํŠธ ๋œ ๋ชฉ๋ก / ๋ฌธ์ œ๋ฅผ ์œ„ํ•ด์ด ํ•ญ๋ชฉ์„ ์ข…๋ฃŒ : # 13644.

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰