Skip to content

Conversation

yeshwanth235
Copy link
Contributor

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.

@MisRob
Copy link
Member

MisRob commented Sep 8, 2025

Thank you @yeshwanth235! I set aside some time this week to review everything.

Copy link
Member

@MisRob MisRob left a 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.

cards-review-01

path: '/my-channels',
component: ChannelList,
component: StudioMyChannels,
props: { listType: ChannelListTypes.EDITABLE },
Copy link
Member

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 from RouteNames.CHANNELS_EDITABLE route above. In contrast to shared ChannelList that is re-used from multiple pages and requires related conditional logic, StudioMyChannels will be only used from My Channels. Therefore, do not add listType prop to StudioMyChannels. Preserve only logic that was previously related to ChannelListTypes.EDITABLE type. Cleanup copied code to not contain listType conditions and code for other types, such as ChannelListTypes.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.

Copy link
Contributor Author

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"
Copy link
Member

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"
Copy link
Member

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;
Copy link
Member

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.

Copy link
Contributor Author

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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here tokens.annotation.

Copy link
Contributor Author

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 {
Copy link
Member

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 :)

Copy link
Contributor Author

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 {
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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'] & {
Copy link
Member

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.

Copy link
Contributor Author

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"
Copy link
Member

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)

Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed the locale changes.

@MisRob
Copy link
Member

MisRob commented Sep 9, 2025

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.

@yeshwanth235
Copy link
Contributor Author

Thanks for the review @MisRob
Will address the comments

@MisRob
Copy link
Member

MisRob commented Sep 10, 2025

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants