-
Notifications
You must be signed in to change notification settings - Fork 225
Cards in My Channels #5345
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
base: unstable
Are you sure you want to change the base?
Cards in My Channels #5345
Conversation
Thank you @yeshwanth235! I set aside some time this week to review everything. |
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.
(1) Can you ensure that card width is same as before on all resolutions? I would recommend you create a wrapper container that has a grid and the button in it, set paddings in the wrapper container, and then let the grid take 100% width of the wrapper. If it helps, a convenient way to preview is to star some channels and then switch between the new My Channels and the Starred Channels that still has the previous version, and ensure that My Channels results in same layout experience.
(2) There's missing space above the button.
(3) Would you follow this guidance to display the thumbnail placeholder? Including placeholder icon responsive behavior (guidance). Again compare with the previous version which has a gray image icon when thumbnail image is not available - that needs to be preserved - including how it scales size depending on card size.

path: '/my-channels', | ||
component: ChannelList, | ||
component: StudioMyChannels, | ||
props: { listType: ChannelListTypes.EDITABLE }, |
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.
Would you remove listType
prop and all related conditional logic from StudioMyChannels
?StudioMyChannels
will always be EDITABLE
- so you can just assume it in that component. I've tried to say more in the issue, not sure if it's explained well - let me now if you had any questions.
Note
listType
prop removal fromRouteNames.CHANNELS_EDITABLE
route above. In contrast to sharedChannelList
that is re-used from multiple pages and requires related conditional logic,StudioMyChannels
will be only used from My Channels. Therefore, do not addlistType
prop toStudioMyChannels
. Preserve only logic that was previously related toChannelListTypes.EDITABLE
type. Cleanup copied code to not containlistType
conditions and code for other types, such asChannelListTypes.PUBLIC
.
Otherwise, as we progress refactoring other tabs on the page, StudioMyChannels
would end up as a monolithic component with lots of conditional logic and hard to maintain. The current ChannelList
suffers from this problem and I want us to avoid it in new components. We will take a different approach to re-use logic - I will outline the strategy in the upcoming issues.
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.
Need some clarification
So for starred and view-only pages. Are we going to use same component StudioMyChannels or it will be an new component
</div> | ||
<div class="my-channels__body"> | ||
<p | ||
v-if="listChannels && !listChannels.length" |
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.
v-if="!listChannels || !listChannels.length"
would be a bit more robust.
Also let's adjust the condition to make sure that "No channels found" is not displayed while channels are loading. Otherwise, particularly on slower network, we will see "No channels found" just to be replaced by channels in a moment.
</p> | ||
<KCardGrid | ||
layout="1-1-1" | ||
:loading="loading" |
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.
Could you use skeletonsConfig
to
- (1) Show 3 skeleton cards
- (2) For each breakpoint, configure skeleton to resemble loaded cards as closely as possible
There's quite a detailed tutorial here. Notice debug
prop that will help you to fine-tune for each breakpoint.
I was able to preview loading state when I turned on network throttling 2G:

But for development, I think it'd be most convenient if you just set loading
to true
temporarily :)
&__desc { | ||
margin-top: 4px; | ||
color: #000000; |
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.
We avoid hardcoded colors in our codebase in favor of KDS theme colors. See the same page for why.
For black text, we'd want to use tokens.text.
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.
updated it.
&__left { | ||
span { | ||
font-size: 14px; | ||
color: #666666; |
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.
And here tokens.annotation.
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.
updated it.
} | ||
.icon-wrapper { | ||
::v-deep button { |
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.
Why was this needed?
I know ::v-deep
is used in the codebase, however it's an anti-pattern we're trying to get rid of. Here's on why.
If there's some limitation in KDS that caused the need for it, let me know and I will help with next steps :)
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.
This class is not required removed it.
margin-left: 8px; | ||
} | ||
[dir='rtl'] & div { |
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.
This can be removed - RTLCSS library takes care of it - however it can only be previewed on the devserver without :hot
pnpm run devserver
I've just double-checked and all is fine without it.
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.
will check this and update it
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.
Removed it. Working fine in npm run devserver
border: 0; | ||
} | ||
[dir='rtl'] & { |
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.
Also can be removed. KDS and RTLCSS takes care of this - see the related comment for more.
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.
Removed it
</div> | ||
<div class="my-channels__cards--footer__right"> | ||
<KRouterLink | ||
v-if="!libraryMode" |
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.
Alongside similar comments, libraryMode
will never be truthy on StudioMyChannels
so it can be removed from here and elsewhere in the file (+ I've just learned that it's an obsolete mode that doesn't take effect in the current version either)
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.
I was wondering how these /locale
changes found their way in here?
In any case, these files will need to be removed from the PR - they will be prepared later as part of the release translation process.
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.
I have added them. As mentioned it will be prepared while release. Hence removing them
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.
removed the locale changes.
Hi @yeshwanth235, note that the amount of comments I am leaving here is very common in my reviews for larger PRs :) Overall this is fantastic work and I'm really happy you picked one of the high complexity issues - you've handled it very well. It is aligned with what was requested in the issue, and all main pieces work great in this very first version. Thanks a lot. Most of my feedback is around few areas where I noticed some regression. Also we can simplify some conditional logic. Take all the time you need, and let me know if you had any questions. |
Thanks for the review @MisRob |
Thanks @yeshwanth235. I wanted to mention that I will be on vacation until September 22. My colleague @rtibbles may leave some notes as well meanwhile, and I will get back to you as soon as I'm back :) |
Summary
Created StudioMyChannels component.
Which uses KCardGrid to show cards
KDropdownMenu used for dropdown.
KModal is used for delete and copy features.
Updated /my-channels component to StudioMyChannels
Video
References
5227
Reviewer guidance
Need to end to end testing for /my-channels.