Skip to content

Commit ef7cfd3

Browse files
committed
Auto merge of #2052 - Turbo87:tagless, r=locks
Migrate to tagless components "Tagless" components are components with `tagName: ''`, which causes them to not have an implicit wrapping element. This is the new default in Ember.js apps with components based on `@glimmer/component`. To make it easier to eventually migrate to these new Glimmer components we'll set `tagName: ''` on some of the existing components that can automatically be migrated. This PR was created using https://github.com/ember-codemods/tagless-ember-components-codemod r? @locks
2 parents aa88077 + a392923 commit ef7cfd3

38 files changed

+343
-275
lines changed

app/components/badge-appveyor.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ import { computed } from '@ember/object';
33
import { alias } from '@ember/object/computed';
44

55
export default Component.extend({
6-
tagName: 'span',
7-
classNames: ['badge'],
8-
6+
tagName: '',
97
id: alias('badge.attributes.id'),
108
repository: alias('badge.attributes.repository'),
119

app/components/badge-azure-devops.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ import { computed } from '@ember/object';
33
import { alias } from '@ember/object/computed';
44

55
export default Component.extend({
6-
tagName: 'span',
7-
classNames: ['badge'],
6+
tagName: '',
87
project: alias('badge.attributes.project'),
98
pipeline: alias('badge.attributes.pipeline'),
9+
1010
build: computed('badge.attributes.build', function() {
1111
return this.get('badge.attributes.build') || '1';
1212
}),
13+
1314
text: computed('pipeline', function() {
1415
return `Azure Devops build status for the ${this.pipeline} pipeline`;
1516
}),

app/components/badge-bitbucket-pipelines.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ import { alias } from '@ember/object/computed';
33
import Component from '@ember/component';
44

55
export default Component.extend({
6-
tagName: 'span',
7-
classNames: ['badge'],
6+
tagName: '',
87
repository: alias('badge.attributes.repository'),
8+
99
branch: computed('badge.attributes.branch', function() {
1010
return encodeURIComponent(this.get('badge.attributes.branch'));
1111
}),
12+
1213
text: computed('badge.attributes.branch', function() {
1314
const branch = this.get('badge.attributes.branch');
1415
return `Bitbucket Pipelines build status for the ${branch} branch`;

app/components/badge-circle-ci.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ import { alias } from '@ember/object/computed';
33
import Component from '@ember/component';
44

55
export default Component.extend({
6-
tagName: 'span',
7-
classNames: ['badge'],
6+
tagName: '',
87
repository: alias('badge.attributes.repository'),
8+
99
branch: computed('badge.attributes.branch', function() {
1010
return encodeURIComponent(this.get('badge.attributes.branch') || 'master');
1111
}),
12+
1213
text: computed('branch', function() {
1314
return `Circle CI build status for the ${this.branch} branch`;
1415
}),

app/components/badge-cirrus-ci.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ import { alias } from '@ember/object/computed';
33
import Component from '@ember/component';
44

55
export default Component.extend({
6-
tagName: 'span',
7-
classNames: ['badge'],
6+
tagName: '',
87
repository: alias('badge.attributes.repository'),
8+
99
branch: computed('badge.attributes.branch', function() {
1010
return encodeURIComponent(this.get('badge.attributes.branch') || 'master');
1111
}),
12+
1213
text: computed('branch', function() {
1314
return `Cirrus CI build status for the ${this.branch} branch`;
1415
}),

app/components/badge-codecov.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@ import { computed } from '@ember/object';
33
import { alias } from '@ember/object/computed';
44

55
export default Component.extend({
6-
tagName: 'span',
7-
classNames: ['badge'],
6+
tagName: '',
87
repository: alias('badge.attributes.repository'),
8+
99
branch: computed('badge.attributes.branch', function() {
1010
return this.get('badge.attributes.branch') || 'master';
1111
}),
12+
1213
service: computed('badge.attributes.service', function() {
1314
return this.get('badge.attributes.service') || 'github';
1415
}),
16+
1517
text: computed('branch', function() {
1618
return `CodeCov coverage status for the ${this.branch} branch`;
1719
}),

app/components/badge-coveralls.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@ import { computed } from '@ember/object';
33
import { alias } from '@ember/object/computed';
44

55
export default Component.extend({
6-
tagName: 'span',
7-
classNames: ['badge'],
6+
tagName: '',
87
repository: alias('badge.attributes.repository'),
8+
99
branch: computed('badge.attributes.branch', function() {
1010
return this.get('badge.attributes.branch') || 'master';
1111
}),
12+
1213
service: computed('badge.attributes.service', function() {
1314
return this.get('badge.attributes.service') || 'github';
1415
}),
16+
1517
text: computed('branch', function() {
1618
return `Coveralls coverage status for the ${this.branch} branch`;
1719
}),

app/components/badge-gitlab.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ import { computed } from '@ember/object';
33
import { alias } from '@ember/object/computed';
44

55
export default Component.extend({
6-
tagName: 'span',
7-
classNames: ['badge'],
6+
tagName: '',
87
repository: alias('badge.attributes.repository'),
8+
99
branch: computed('badge.attributes.branch', function() {
1010
return this.get('badge.attributes.branch') || 'master';
1111
}),
12+
1213
text: computed('badge', function() {
1314
return `GitLab build status for the ${this.branch} branch`;
1415
}),

app/components/badge-is-it-maintained-issue-resolution.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { computed } from '@ember/object';
33
import { alias } from '@ember/object/computed';
44

55
export default Component.extend({
6-
tagName: 'span',
7-
classNames: ['badge'],
6+
tagName: '',
87
repository: alias('badge.attributes.repository'),
8+
99
text: computed('badge', function() {
1010
return `Is It Maintained average time to resolve an issue`;
1111
}),

app/components/badge-is-it-maintained-open-issues.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { computed } from '@ember/object';
33
import { alias } from '@ember/object/computed';
44

55
export default Component.extend({
6-
tagName: 'span',
7-
classNames: ['badge'],
6+
tagName: '',
87
repository: alias('badge.attributes.repository'),
8+
99
text: computed('badge', function() {
1010
return `Is It Maintained percentage of issues still open`;
1111
}),

0 commit comments

Comments
 (0)