-
Notifications
You must be signed in to change notification settings - Fork 289
Channel cards to unstable #5696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MisRob
wants to merge
36
commits into
learningequality:unstable
Choose a base branch
from
MisRob:channel-cards
base: unstable
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
0be0e93
[Remove Vuetify from Studio] Cards in My Channels
yeshwanth235 ad0d85f
[Remove Vuetify from Studio] Cards in Starred channels changes
yeshwanth235 b7c3b45
[Remove Vuetify from Studio] Cards in View-only channels changes
yeshwanth235 2213979
Merge branch 'unstable' into channel-cards
MisRob d3f3a17
Merge pull request #5657 from MisRob/channel-cards
MisRob fbfe7c6
Merge branch 'unstable' into channel-cards-finalize
MisRob 07c0e13
Use 16:9 ratio for thumbnails
MisRob 04f1ab8
Remove unnecessary style definition
MisRob d69002a
Fix token reference
MisRob ec17f60
Do not add KTooltip to DOM when not necessary
MisRob 32093d9
Abstract page layout into a component
MisRob 217c912
Move invitations box to StudioMyChannels
MisRob 6840bdd
[Remove Vuetify from Studio] Cards in Content Library
vtushar06 c277e85
Merge branch 'channel-cards-finalize' into channel-cards
MisRob eefe23f
Remove handler call
MisRob 5327a26
Configure skeleton loaders to reflect
MisRob 36f359e
Add bottom padding
MisRob b0cfdcb
Add local claude settings to gitignore
MisRob e52d071
Align test suite with other suites regarding channel cards
MisRob a79502a
Rename method
MisRob 3aded04
Fix semantics
MisRob c837c95
Show view-only invitations
MisRob 512e2f1
Fix card click targets
MisRob 4d66ec2
Footer configuration
MisRob 841257a
Optimize card orientation in catalog
MisRob 7ee25b9
Optimize card loading
MisRob bc092cd
Disable syncCardMetrics to prevent unnecessary
MisRob aa8b0a9
Fix typo
MisRob cc563d2
Remove unused code
MisRob b0479ef
Merge branch 'unstable' into channel-cards
MisRob a820fb4
Docstrings cleanup
MisRob 18f4f26
[TODO REVERT] Temporarily install KDS fork
MisRob 82f701b
Fix string
MisRob f8c7d53
Remove modals from card component
MisRob f780f83
Use StudioCopyToken instead of CopyToken
MisRob 52535eb
Fix invitation box width regression
MisRob File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
44 changes: 44 additions & 0 deletions
44
contentcuration/contentcuration/frontend/channelList/composables/useChannelList.js
This file contains hidden or 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,44 @@ | ||
| import { ref, computed, onMounted, getCurrentInstance } from 'vue'; | ||
| import orderBy from 'lodash/orderBy'; | ||
|
|
||
| /** | ||
| * Composable for channel list functionality | ||
| * | ||
| * @param {Object} options - Configuration options | ||
| * @param {string} options.listType - Type of channel list (from ChannelListTypes) | ||
| * @param {Array<string>} options.sortFields - Fields to sort by (default: ['modified']) | ||
| * @param {Array<string>} options.orderFields - Sort order (default: ['desc']) | ||
| * @returns {Object} Loading state and filtered & sorted channels | ||
| */ | ||
| export function useChannelList(options = {}) { | ||
| const { listType, sortFields = ['modified'], orderFields = ['desc'] } = options; | ||
|
|
||
| const instance = getCurrentInstance(); | ||
| const store = instance.proxy.$store; | ||
|
|
||
| const loading = ref(false); | ||
|
|
||
| const allChannels = computed(() => store.getters['channel/channels'] || []); | ||
|
|
||
| const channels = computed(() => { | ||
| if (!allChannels.value || allChannels.value.length === 0) { | ||
| return []; | ||
| } | ||
|
|
||
| const filtered = allChannels.value.filter(channel => channel[listType] && !channel.deleted); | ||
|
|
||
| return orderBy(filtered, sortFields, orderFields); | ||
| }); | ||
|
|
||
| onMounted(() => { | ||
| loading.value = true; | ||
| store.dispatch('channel/loadChannelList', { listType }).then(() => { | ||
| loading.value = false; | ||
| }); | ||
| }); | ||
|
|
||
| return { | ||
| loading, | ||
| channels, | ||
| }; | ||
| } | ||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this fails to load (like it times out), what happens from the user perspective?