typed-ember / glint

TypeScript powered tooling for Glimmer templates
https://typed-ember.gitbook.io/glint
MIT License
109 stars 51 forks source link

Use content tag #615

Closed NullVoxPopuli closed 10 months ago

NullVoxPopuli commented 1 year ago

Resolves: https://github.com/typed-ember/glint/issues/609 Blocked by: https://github.com/embroider-build/content-tag/issues/19 Blocked by: https://github.com/embroider-build/content-tag/pull/31

Unblocks: https://github.com/NullVoxPopuli/polaris-starter/pull/11

Problem:

This isn't a new problem for Glint, but it does take things in the wrong direction a bit.

NullVoxPopuli commented 12 months ago

Observations:

Deleting the closing </template>

Example 1

kinda goofy image

Before this PR, the experience is worse image

Example 2

this actually makes sense and provides meaningful feedback about the missing closing </template>, which I believe is an improvement? image

Before this PR, the experience is worse image

Deleting the opening <template>

Example 1

sqigglies everywhere. maybe this is something we can get our swc parser to help with though?

image

Before this PR, the experience is not helpful, but :shrug: when it comes to deciding if better or worse, imo image

Deliberate syntax error

"importing a number"

image

Before this PR, the experience is better image

extra quote

image

Before this PR, the experience is better image

number * string

image

Before this PR, the experience is better image

forgetting to give a variable a value

image

Before this PR, the experience is better image

fun thing(s) ### accidentally discovered function noop shorthand this is actually valid, but looks goofy ![image](https://github.com/typed-ember/glint/assets/199018/026dc12f-2d6a-4129-bc18-1a1f47aef7b4)
NullVoxPopuli commented 10 months ago

I broke something here, so I'm starting over here: https://github.com/typed-ember/glint/pull/655