Skip to content

Commit ecbd9fe

Browse files
authored
Merge pull request #515 from appuniversum/fix/whitespace-issues
Fix some whitespace issues
2 parents 5809899 + 067ce79 commit ecbd9fe

13 files changed

+56
-72
lines changed

addon/components/au-badge.gts

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ export default class AuBadge extends Component<AuBadgeSignature> {
3737
return '';
3838
}
3939

40-
<template>
41-
<span
40+
// We don't want whitespace between our component and the outer template tag since that's visible in the app (inline element): https://github.com/emberjs/rfcs/issues/982
41+
// prettier-ignore
42+
<template><span
4243
class="au-c-badge {{this.skin}} {{this.size}}"
4344
aria-hidden={{if @iconVisible "false" "true"}}
4445
...attributes
@@ -49,6 +50,5 @@ export default class AuBadge extends Component<AuBadgeSignature> {
4950
{{#if @number}}
5051
<span class="au-c-badge__number">{{@number}}</span>
5152
{{/if}}
52-
</span>
53-
</template>
53+
</span></template>
5454
}

addon/components/au-brand.gts

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default class AuBrand extends Component<AuBrandSignature> {
1818
}
1919

2020
<template>
21-
{{#if @link}}
21+
{{~#if @link~}}
2222
<a
2323
href={{@link}}
2424
class="au-c-brand au-c-brand--link {{this.tagline}}"
@@ -52,7 +52,7 @@ export default class AuBrand extends Component<AuBrandSignature> {
5252
{{/if}}
5353
</p>
5454
</a>
55-
{{else}}
55+
{{~else~}}
5656
<div class="au-c-brand {{this.tagline}}" ...attributes>
5757
<div class="au-c-brand__logo">
5858
<svg
@@ -78,6 +78,6 @@ export default class AuBrand extends Component<AuBrandSignature> {
7878
{{/if}}
7979
</p>
8080
</div>
81-
{{/if}}
81+
{{~/if~}}
8282
</template>
8383
}

addon/components/au-button.gts

+4-4
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,9 @@ More info in the migration guide: https://github.com/appuniversum/ember-appunive
117117
return '';
118118
}
119119

120-
<template>
121-
<button
120+
// We don't want whitespace between our component and the outer template tag since that's visible in the app (inline element): https://github.com/emberjs/rfcs/issues/982
121+
// prettier-ignore
122+
<template><button
122123
class="au-c-button
123124
{{this.widthClass}}
124125
{{this.sizeClass}}
@@ -161,6 +162,5 @@ More info in the migration guide: https://github.com/appuniversum/ember-appunive
161162
<AuIcon @icon={{@icon}} />
162163
{{/if}}
163164
{{/unless}}
164-
</button>
165-
</template>
165+
</button></template>
166166
}

addon/components/au-checkbox.gts

+4-6
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ export default class AuCheckbox extends Component<AuCheckboxSignature> {
6464
}
6565
}
6666

67-
<template>
68-
{{~!~}}
69-
<label
67+
// We don't want whitespace between our component and the outer template tag since that's visible in the app (inline element): https://github.com/emberjs/rfcs/issues/982
68+
// prettier-ignore
69+
<template><label
7070
class="au-c-control au-c-control--checkbox
7171
{{if (and (not @inGroup) (not (has-block))) 'au-c-control--labelless'}}
7272
{{if @disabled 'is-disabled'}}"
@@ -84,7 +84,5 @@ export default class AuCheckbox extends Component<AuCheckboxSignature> {
8484
/>
8585
<span class="au-c-control__indicator"></span>
8686
{{yield}}
87-
</label>
88-
{{~!~}}
89-
</template>
87+
</label></template>
9088
}

addon/components/au-date-input.gts

+4-6
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ export interface AuDateInputSignature {
1919
}
2020

2121
export default class AuDateInput extends Component<AuDateInputSignature> {
22-
<template>
23-
{{~!~}}
24-
<AuInput
22+
// We don't want whitespace between our component and the outer template tag since that's visible in the app (inline element): https://github.com/emberjs/rfcs/issues/982
23+
// prettier-ignore
24+
<template><AuInput
2525
@disabled={{@disabled}}
2626
@error={{@error}}
2727
@icon={{CalendarIcon}}
@@ -31,7 +31,5 @@ export default class AuDateInput extends Component<AuDateInputSignature> {
3131
placeholder="DD-MM-JJJJ"
3232
{{auDateInput value=@value prefillYear=@prefillYear onChange=@onChange}}
3333
...attributes
34-
/>
35-
{{~!~}}
36-
</template>
34+
/></template>
3735
}

addon/components/au-dropdown.gts

+4-6
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ export default class AuDropdown extends Component<AuDropdownSignature> {
104104
};
105105
}
106106

107-
<template>
108-
{{~!~}}
109-
<div class="au-c-dropdown" ...attributes>
107+
// We don't want whitespace between our component and the outer template tag since that's visible in the app (inline element): https://github.com/emberjs/rfcs/issues/982
108+
// prettier-ignore
109+
<template><div class="au-c-dropdown" ...attributes>
110110
<AuButton
111111
{{this.reference}}
112112
@skin={{this.skin}}
@@ -153,7 +153,5 @@ export default class AuDropdown extends Component<AuDropdownSignature> {
153153
</div>
154154
</div>
155155
{{/if}}
156-
</div>
157-
{{~!~}}
158-
</template>
156+
</div></template>
159157
}

addon/components/au-icon.gts

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ export default class AuIcon extends Component<AuIconSignature> {
4545
}
4646

4747
<template>
48-
{{#if this.iconComponent}}
49-
{{#let this.iconComponent as |Icon|}}
48+
{{~#if this.iconComponent~}}
49+
{{~#let this.iconComponent as |Icon|~}}
5050
<Icon
5151
class="au-c-icon {{this.alignment}} {{this.size}}"
5252
aria-hidden={{this.ariaHidden}}
5353
...attributes
5454
/>
5555
{{/let}}
56-
{{else}}
56+
{{~else~}}
5757
<svg
5858
role="img"
5959
class="au-c-icon au-c-icon--{{@icon}} {{this.alignment}} {{this.size}}"
@@ -64,6 +64,6 @@ export default class AuIcon extends Component<AuIconSignature> {
6464
xlink:href="{{this.iconPrefix}}@appuniversum/ember-appuniversum/appuniversum-symbolset.svg#{{@icon}}"
6565
></use>
6666
</svg>
67-
{{/if}}
67+
{{~/if~}}
6868
</template>
6969
}

addon/components/au-link-external.gts

+4-6
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ export default class AuLinkExternal extends Component<AuLinkExternalSignature> {
6161
return '';
6262
}
6363

64-
<template>
65-
{{~!~}}
66-
<a
64+
// We don't want whitespace between our component and the outer template tag since that's visible in the app (inline element): https://github.com/emberjs/rfcs/issues/982
65+
// prettier-ignore
66+
<template><a
6767
class="{{this.skinClass}} {{this.widthClass}} {{this.iconOnlyClass}}"
6868
target="_blank"
6969
rel="noopener noreferrer"
@@ -83,7 +83,5 @@ export default class AuLinkExternal extends Component<AuLinkExternalSignature> {
8383
{{! @glint-expect-error: this.isIconLeft ensures that @icon is set }}
8484
<AuIcon @icon={{@icon}} />
8585
{{/if}}
86-
</a>
87-
{{~!~}}
88-
</template>
86+
</a></template>
8987
}

addon/components/au-link.gts

+6-8
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ export default class AuLink extends Component<AuLinkSignature> {
8282
return '';
8383
}
8484

85-
<template>
86-
{{~!~}}
87-
<LinkTo
85+
// We don't want whitespace between our component and the outer template tag since that's visible in the app (inline element): https://github.com/emberjs/rfcs/issues/982
86+
// prettier-ignore
87+
<template><LinkTo
8888
@route={{@route}}
8989
@models={{linkToModels @model @models}}
9090
@query={{this.queryParams}}
@@ -94,7 +94,7 @@ export default class AuLink extends Component<AuLinkSignature> {
9494
{{this.iconOnlyClass}}"
9595
...attributes
9696
>
97-
{{#if this.isIconLeft}}
97+
{{~#if this.isIconLeft~}}
9898
{{! @glint-expect-error: this.isIconLeft ensures that @icon is set }}
9999
<AuIcon @icon={{@icon}} />
100100
{{/if}}
@@ -106,8 +106,6 @@ export default class AuLink extends Component<AuLinkSignature> {
106106
{{#if this.isIconRight}}
107107
{{! @glint-expect-error: this.isIconRight ensures that @icon is set }}
108108
<AuIcon @icon={{@icon}} />
109-
{{/if}}
110-
</LinkTo>
111-
{{~!~}}
112-
</template>
109+
{{~/if~}}
110+
</LinkTo></template>
113111
}

addon/components/au-pill.gts

+7-7
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export default class AuPill extends Component<AuPillSignature> {
7272
}
7373

7474
<template>
75-
{{#if @onClickAction}}
75+
{{~#if @onClickAction~}}
7676
<span class="au-c-pill-container">
7777
<span
7878
class="au-c-pill {{this.skin}} {{this.size}} {{this.draft}}"
@@ -93,8 +93,8 @@ export default class AuPill extends Component<AuPillSignature> {
9393
<span class="au-u-hidden-visually">{{@actionText}}</span>
9494
</button>
9595
</span>
96-
{{else}}
97-
{{#if @route}}
96+
{{~else~}}
97+
{{~#if @route~}}
9898
<LinkTo
9999
class="au-c-pill au-c-pill--hover
100100
{{this.skin}}
@@ -111,7 +111,7 @@ export default class AuPill extends Component<AuPillSignature> {
111111
@hideText={{@hideText}}
112112
>{{yield}}</Inner>
113113
</LinkTo>
114-
{{else if @href}}
114+
{{~else if @href~}}
115115
<a
116116
href={{@href}}
117117
class="au-c-pill au-c-pill--hover
@@ -126,7 +126,7 @@ export default class AuPill extends Component<AuPillSignature> {
126126
@hideText={{@hideText}}
127127
>{{yield}}</Inner>
128128
</a>
129-
{{else}}
129+
{{~else~}}
130130
<span
131131
class="au-c-pill {{this.skin}} {{this.size}} {{this.draft}}"
132132
...attributes
@@ -137,8 +137,8 @@ export default class AuPill extends Component<AuPillSignature> {
137137
@hideText={{@hideText}}
138138
>{{yield}}</Inner>
139139
</span>
140-
{{/if}}
141-
{{/if}}
140+
{{~/if~}}
141+
{{~/if~}}
142142
</template>
143143
}
144144

addon/components/au-radio.gts

+4-6
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ export default class AuRadio extends Component<AuRadioSignature> {
4343
}
4444
}
4545

46-
<template>
47-
{{~!~}}
48-
<label
46+
// We don't want whitespace between our component and the outer template tag since that's visible in the app (inline element): https://github.com/emberjs/rfcs/issues/982
47+
// prettier-ignore
48+
<template><label
4949
class="au-c-control au-c-control--radio
5050
{{if (and (not @inGroup) (not (has-block))) 'au-c-control--labelless'}}
5151
{{if @disabled 'is-disabled'}}"
@@ -62,7 +62,5 @@ export default class AuRadio extends Component<AuRadioSignature> {
6262
/>
6363
<span class="au-c-control__indicator"></span>
6464
{{yield}}
65-
</label>
66-
{{~!~}}
67-
</template>
65+
</label></template>
6866
}

addon/components/au-textarea.gts

+4-6
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ export default class AuTextarea extends Component<AuTextareaSignature> {
3434
else return '';
3535
}
3636

37-
<template>
38-
{{~!~}}
39-
<textarea
37+
// We don't want whitespace between our component and the outer template tag since that's visible in the app (inline element): https://github.com/emberjs/rfcs/issues/982
38+
// prettier-ignore
39+
<template><textarea
4040
class="au-c-textarea
4141
{{this.error}}
4242
{{this.warning}}
@@ -46,7 +46,5 @@ export default class AuTextarea extends Component<AuTextareaSignature> {
4646
...attributes
4747
>
4848
{{~yield~}}
49-
</textarea>
50-
{{~!~}}
51-
</template>
49+
</textarea></template>
5250
}

addon/components/au-toggle-switch.gts

+4-6
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ export default class AuToggleSwitch extends Component<AuToggleSwitchSignature> {
3939
}
4040
}
4141

42-
<template>
43-
{{~!~}}
44-
<label
42+
// We don't want whitespace between our component and the outer template tag since that's visible in the app (inline element): https://github.com/emberjs/rfcs/issues/982
43+
// prettier-ignore
44+
<template><label
4545
for={{@identifier}}
4646
class="au-c-toggle-switch
4747
{{this.alignmentClass}}
@@ -63,7 +63,5 @@ export default class AuToggleSwitch extends Component<AuToggleSwitchSignature> {
6363
/>
6464
<span class="au-c-toggle-switch__toggle"></span>
6565
{{yield}}
66-
</label>
67-
{{~!~}}
68-
</template>
66+
</label></template>
6967
}

0 commit comments

Comments
 (0)