Skip to content

Commit 91bd36c

Browse files
committed
Make Community Library more consistent with Kolibri Library page
1 parent b515a2e commit 91bd36c

8 files changed

Lines changed: 23 additions & 16 deletions

File tree

contentcuration/contentcuration/frontend/channelList/router.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import StudioViewOnlyChannels from './views/Channel/StudioViewOnlyChannels';
66
import StudioCollectionsTable from './views/ChannelSet/StudioCollectionsTable';
77
import ChannelSetModal from './views/ChannelSet/ChannelSetModal';
88
import CatalogList from './views/Channel/CatalogList';
9-
import CommunityLibraryList from './views/Channel/CommunityLibraryList';
9+
import CommunityLibraryList from './views/Channel/CommunityLibraryList/index.vue';
1010
import { RouteNames } from './constants';
1111
import CatalogFAQ from './views/Channel/CatalogFAQ';
1212
import SubmissionDetailsModal from 'shared/views/communityLibrary/SubmissionDetailsModal/index.vue';

contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogList.vue

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,18 @@
330330
getDropdownItems(channel) {
331331
const items = [];
332332
if (channel.source_url) {
333-
items.push({ label: this.$tr('goToWebsite'), icon: 'openNewTab', value: 'source-url' });
333+
items.push({
334+
label: this.$tr('goToWebsite'),
335+
icon: 'openNewTab',
336+
value: 'source-url',
337+
});
334338
}
335339
if (channel.demo_server_url) {
336-
items.push({ label: this.$tr('viewContent'), icon: 'openNewTab', value: 'demo-url' });
340+
items.push({
341+
label: this.$tr('viewContent'),
342+
icon: 'openNewTab',
343+
value: 'demo-url',
344+
});
337345
}
338346
return items;
339347
},
@@ -421,7 +429,7 @@
421429
},
422430
},
423431
$trs: {
424-
title: 'Content library',
432+
title: 'Kolibri library',
425433
resultsText: '{count, plural,\n =1 {# result found}\n other {# results found}}',
426434
selectChannels: 'Download a summary of selected channels',
427435
cancelButton: 'Cancel',

contentcuration/contentcuration/frontend/channelList/views/Channel/CommunityLibraryList/index.vue

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@
118118
/>
119119
</div>
120120
</div>
121-
<div class="list-wrapper">
121+
<div>
122122
<div class="results-header">
123123
<p
124-
v-if="!loading"
124+
v-if="!loading && activeFilters.length > 0"
125125
class="results-text"
126126
>
127127
{{ resultsText$({ count }) }}
@@ -543,18 +543,15 @@
543543
}
544544
545545
.content-container {
546+
max-width: 1080px;
546547
padding: 16px;
548+
margin: 0 auto;
547549
548550
p {
549551
margin: 8px 0;
550552
}
551553
}
552554
553-
.list-wrapper {
554-
max-width: 1080px;
555-
margin: 0 auto;
556-
}
557-
558555
.results-header {
559556
margin-bottom: 16px;
560557
}

contentcuration/contentcuration/frontend/channelList/views/Channel/__tests__/catalogList.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ describe('CatalogList', () => {
126126
it('shows the visually hidden title and all channel cards in correct semantic structure', async () => {
127127
renderComponent();
128128

129-
const title = await screen.findByRole('heading', { name: /content library/i });
129+
const title = await screen.findByRole('heading', { name: /kolibri library/i });
130130
expect(title).toBeInTheDocument();
131131
expect(title.tagName).toBe('H1');
132132
expect(title).toHaveClass('visuallyhidden');

contentcuration/contentcuration/frontend/channelList/views/ChannelListIndex.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@
251251
title = this.translateConstant('bookmark');
252252
} else if (routeName === RouteNames.CHANNELS_EDITABLE) {
253253
title = this.translateConstant('edit');
254+
} else if (routeName === RouteNames.COMMUNITY_LIBRARY_ITEMS) {
255+
title = this.communityLibraryLabel$();
254256
}
255257
// Title changes for other routes are handled by other components, since
256258
// we can access $tr messages only from within the component.
@@ -264,7 +266,7 @@
264266
},
265267
$trs: {
266268
channelSets: 'Collections',
267-
catalog: 'Content Library',
269+
catalog: 'Kolibri Library',
268270
libraryTitle: 'Kolibri Content Library Catalog',
269271
frequentlyAskedQuestions: 'Frequently asked questions',
270272
},

contentcuration/contentcuration/frontend/shared/mixins.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export const fileStatusMixin = {
8989
export const constantStrings = createTranslator('ConstantStrings', {
9090
[ChannelListTypes.EDITABLE]: 'My channels',
9191
[ChannelListTypes.VIEW_ONLY]: 'View-only',
92-
[ChannelListTypes.PUBLIC]: 'Content library',
92+
[ChannelListTypes.PUBLIC]: 'Kolibri library',
9393
[ChannelListTypes.STARRED]: 'Starred',
9494
do_all: 'Goal: 100% correct',
9595
num_correct_in_a_row_10: 'Goal: 10 in a row',

contentcuration/contentcuration/frontend/shared/strings/communityChannelsStrings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ export const communityChannelsStrings = createTranslator('CommunityChannelsStrin
195195
'Description of warning shown in the "Submit to Community Library" panel when the channel is not published',
196196
},
197197
publicWarningTitle: {
198-
message: 'This channel is currently public in the Content Library.',
198+
message: 'This channel is currently public in the Kolibri Library.',
199199
context:
200200
'Title of warning shown in the "Submit to Community Library" panel when the channel is public',
201201
},

contentcuration/kolibri_public/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ class ChannelMetadataViewSet(ReadOnlyValuesViewset):
201201
}
202202

203203
def get_queryset(self):
204-
return models.ChannelMetadata.objects.all()
204+
return models.ChannelMetadata.objects.all().order_by("name")
205205

206206
def consolidate(self, items, queryset):
207207
# Only keep a single item for every channel ID, to get rid of possible

0 commit comments

Comments
 (0)