-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7857 from michaelchadwick/frontend-5426-learner-g…
…roup-loading-route Learner Groups now use same loading style as Instructor Groups
- Loading branch information
Showing
6 changed files
with
97 additions
and
43 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
packages/frontend/app/components/learner-groups/loading.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<table class="learner-groups-loading" ...attributes> | ||
<thead> | ||
<tr> | ||
<th class="text-left" colspan="2"> | ||
{{t "general.learnerGroupTitle"}} | ||
</th> | ||
<th class="text-center hide-from-small-screen"> | ||
{{t "general.members"}} | ||
</th> | ||
<th class="text-center hide-from-small-screen"> | ||
{{t "general.subgroups"}} | ||
</th> | ||
<th class="text-right"> | ||
{{t "general.actions"}} | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{{! template-lint-disable no-unused-block-params }} | ||
{{#each (repeat @count) as |empty|}} | ||
<tr class="is-loading"> | ||
<td class="text-left" colspan="2">{{truncate | ||
(repeat (random 3 10) "ilios rocks") | ||
100 | ||
}}</td> | ||
<td class="text-center hide-from-small-screen">{{random 1 9}}</td> | ||
<td class="text-center hide-from-small-screen">{{random 1 9}}</td> | ||
<td class="text-right"></td> | ||
</tr> | ||
{{/each}} | ||
</tbody> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/frontend/app/styles/components/learner-groups/loading.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@use "../../mixins" as m; | ||
|
||
.learner-groups-loading { | ||
@include m.main-list-loading-table; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
packages/frontend/tests/integration/components/learner-groups/loading-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { module, test } from 'qunit'; | ||
import { setupRenderingTest } from 'ember-qunit'; | ||
import { setupIntl } from 'ember-intl/test-support'; | ||
import { render } from '@ember/test-helpers'; | ||
import { hbs } from 'ember-cli-htmlbars'; | ||
import a11yAudit from 'ember-a11y-testing/test-support/audit'; | ||
|
||
module('Integration | Component | learner-groups/loading', function (hooks) { | ||
setupRenderingTest(hooks); | ||
setupIntl(hooks, 'en-us'); | ||
|
||
test('it renders', async function (assert) { | ||
await render(hbs`<LearnerGroups::Loading @count={{2}} />`); | ||
assert.dom('tbody tr').exists({ count: 2 }); | ||
await a11yAudit(this.element); | ||
}); | ||
}); |