GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Community channels page by AlexVelezLl · Pull Request #5770 · learningequality/studio Conversation
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
💀 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
b1bdaf4 to
b22272c
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Solid new feature adding a Community Library browsing page with filters, search, pagination, and channel details. The architecture is clean — good use of provide/inject for filter state, backward-compatible pagination, and proper deduplication for M2M joins.
CI passing (relevant checks skipped due to path matching).
Suggestions:
> after </script> in AboutCommunityLibraryModal.vuenResultsFound i18n string (duplicate of resultsText)print left in testmapResponseChannel across two filesSee inline comments for details.
Comments on lines not in diff:
contentcuration/kolibri_public/views.py:209 — praise: The existing deduplication via OrderedDict neatly handles potential duplicates from the M2M included_languages filter join. Good that this was already in place.
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
Reviewed the pull request diff checking for:
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| } = communityChannelsStrings; | ||
|
|
||
| </script> | ||
| > |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
suggestion: There's a stray > character after the closing </script> tag. Vue SFC parsers will likely ignore it, but it should be removed to keep the file clean.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks, good catch
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| searchLabel: { | ||
| message: 'Search', | ||
| context: 'Label for the search input', | ||
| }, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
suggestion: nResultsFound appears to be an unused duplicate of resultsText (defined a few lines above). Only resultsText is referenced in the template. Consider removing nResultsFound to avoid confusion. They also use different ICU plural syntax (=1 vs one).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Great catch, thanks.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| response = self._list({"languages": "en,fr", "public": "false"}) | ||
| self.assertEqual(response.status_code, 200, response.content) | ||
| ids = [UUID(item["id"]) for item in response.data] | ||
| print("ids", ids) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
nitpick: Debug print("ids", ids) left in the test. Should be removed before merge.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| <span> | ||
| {{ language }} | ||
| </span> | ||
| <span v-if="channel.countries"> |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
suggestion: v-if="channel.countries" is truthy for an empty array []. When the API returns countries: [] (which it does by default in consolidate), this span renders with empty text but still gets the • dot separator from the CSS span:not(:last-child)::after rule. Consider v-if="channel.countries && channel.countries.length" or v-if="country" to avoid the visual artifact.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| import SidePanelModal from 'shared/views/SidePanelModal'; | ||
| import { commonStrings } from 'shared/strings/commonStrings'; | ||
|
|
||
| function mapResponseChannel(channel) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
suggestion: This mapResponseChannel function is nearly identical to the one in CommunityChannelDetailsModal.vue (which has additional fields like resource_count, resource_size, languages, licenses). Consider extracting a shared utility to avoid divergence over time. The details modal version is a superset — the list version could potentially reuse it.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I don't want to mess with it just yet, until we have a clear direction on whether we want to introduce info from the public models on more places.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @@ -0,0 +1,156 @@ | |||
| import { computed, inject, provide } from 'vue'; | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
praise: Clean use of provide/inject with Symbol keys to share filter state between the parent list component and the filters component without prop drilling. The composable pattern with both useCommunityChannelsFilters (provider) and injectCommunityChannelsFilters (consumer) is well-structured.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
|
|
||
| class ChannelMetadataListPagination(CachedListPagination): | ||
| page_size = None |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
praise: Good choice setting page_size = None — this makes pagination opt-in via query param, preserving backward compatibility for existing callers that expect a flat list response.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| * @returns {UseFilterReturn} | ||
| */ | ||
| export function useFilter({ name, filterMap, defaultValue = null }) { | ||
| export function useFilter({ name, filterMap, multi, defaultValue = null }) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
praise: The multi-select extension to useFilter is well-designed — comma-separated URL params, proper unifyMultiParams merging, and clean integration with existing single-select behavior.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Resolved:
> in AboutCommunityLibraryModal.vue (suggestion) — removed in 2720b83nResultsFound string (suggestion) — removed in 2720b83print in test (nitpick) — removed in 2720b83channel.countries in StudioChannelCard (suggestion) — changed to v-if="country" in 2720b83Acknowledged (not re-raised):
mapResponseChannel (suggestion) — author replied: "I don't want to mess with it just yet"5/5 prior findings resolved or acknowledged. 0 re-raised.
Clean delta — all prior findings addressed. One new suggestion on StudioDetailsPanel. CI passing.
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
Compared the current PR state against findings from a prior review:
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| </StudioDetailsRow> | ||
|
|
||
| <StudioDetailsRow | ||
| v-if="_details.countries" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Same empty-array pattern that was just fixed in StudioChannelCard: _details.countries is [] (truthy) for community channels with no countries, so this row renders and ExpandableList receives items=null from the countries computed. Consider v-if="countries" (the computed property) to stay consistent with the StudioChannelCard fix.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| self.assertEqual(response.status_code, 200, response.content) | ||
| ids = [UUID(item["id"]) for item in response.data] | ||
| self.assertIn(UUID(self.channel_en.id), ids) | ||
| self.assertNotIn(UUID(self.channel_multi.id), ids) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
praise: Thorough test coverage — search, case insensitivity, combined filters, and the language M2M filter are all well-covered with clear setup and assertions.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Clean delta — 4/5 prior findings resolved, 1 acknowledged.
CI passing. Video demo reviewed — filters, search, pagination, channel cards, and details modal all look correct.
Prior findings:
> in AboutCommunityLibraryModal, unused nResultsFound string, debug print in test, empty-array country guard in StudioChannelCardmapResponseChannel — author prefers to deferv-if="_details.countries" in StudioDetailsPanel (re-raised below)New findings:
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
Compared the current PR state against findings from a prior review:
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| </StudioDetailsRow> | ||
|
|
||
| <StudioDetailsRow | ||
| v-if="_details.countries" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
suggestion (re-raised from prior review — unaddressed):
_details.countries is [] (truthy) for community channels with no countries, so this row renders even when there are none. The countries computed correctly returns null for empty arrays, so switching to v-if="countries" would be consistent with the StudioChannelCard fix from 2720b83.
<StudioDetailsRow v-if="countries" :label="countryLabel$()" >
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| </p> | ||
| </div> | ||
| <div class="button-wrapper"> | ||
| <KButton :text="goToMyChannelsAction$()" /> |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
suggestion: This button has no @click handler or :to prop, so it renders but doesn't navigate anywhere. If it should link to the My Channels tab:
<KButton :text="goToMyChannelsAction$()" :to="{ name: 'CHANNELS_EDITABLE' }" />
Or if it's intentionally a placeholder for a follow-up, a brief comment would help reviewers.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| self.assertEqual(response.status_code, 200, response.content) | ||
| ids = [UUID(item["id"]) for item in response.data] | ||
| self.assertIn(UUID(self.channel_en.id), ids) | ||
| self.assertNotIn(UUID(self.channel_multi.id), ids) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
praise: Thorough test coverage for the language M2M filter — single language, multi-language, and combined with search are all well-covered with clear setup and assertions.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| provide(SET_KEYWORDS, setKeywords); | ||
| provide(FILTERS_QUERY_PARAMS, filtersQueryParams); | ||
| provide(REMOVE_FILTER_VALUE, removeFilterValue); | ||
| provide(CLEAR_SEARCH, clearSearch); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
praise: Clean use of provide/inject with Symbol keys to share filter state between the list page and the filters component — avoids prop drilling while keeping the coupling explicit and type-safe.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
1694638 to
ebc4482
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Clean delta — all prior findings resolved.
v-if="_details.countries" guard in StudioDetailsPanel — now uses computed countries propertygoToMyChannelsmapResponseChannel — author prefers to deferCI passing. Video reviewed — filters, search, pagination, and channel cards look correct.
currentLanguage.split('-')[0] fix across all 4 countriesUtil call sites (see inline)@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
Compared the current PR state against findings from a prior review:
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| export default function useCommunityChannelsFilters() { | ||
| const countryFilterMap = computed(() => { | ||
| const [lang] = currentLanguage.split('-'); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
praise: Good fix — i18n-iso-countries registers locales by base language code (en, pt, etc.), so currentLanguage values like pt-BR or es-419 would silently fail. Nice that this was applied consistently across all four call sites.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This looks great, @AlexVelezLl. Admittedly, rtibblesbot probably gave you a much better quality code review than me on the test updates and some of the composables/public channels metadata, but overall the code looks clean and readable, the implementation is exactly what I was thinking (I have done manual QA including some basic a11y testing), and it even looks nice on mobile! 🎉 thanks very much.
we'll see if Peter has anything to report once we get this merged into unstable, but this is looking ready to merge to me. thank you!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.