studio icon indicating copy to clipboard operation
studio copied to clipboard

[Remove Vuetify from Studio] Buttons, dropdowns, and dialog in channel editor root page

Open vtushar06 opened this issue 10 months ago • 31 comments

Summary

Migrated channel editor toolbar from Vuetify to KDS components, replacing VTooltip, VBtn, VList, and BaseMenu with KDS equivalents.

Changes:

  • Replaced VTooltip with KTooltip (error count + publish button tooltips)
  • Replaced VBtn with KButton for Publish button
  • Replaced BaseMenu + VList with KButton + KDropdownMenu for Share dropdown
  • Replaced VBtn + BaseMenu + VList with KIconButton + KDropdownMenu for three-dots menu
  • Added shareMenuOptions and channelMenuOptions computed properties
  • Added handleShareMenuSelect and handleChannelMenuSelect methods

Screenshots: Screenshot 2026-01-28 at 5 56 43 PM … Screenshot 2026-01-28 at 5 55 55 PM … Screenshot 2026-01-28 at 5 55 47 PM … Screenshot 2026-01-28 at 5 54 45 PM … Screenshot 2026-01-28 at 5 55 39 PM … Screenshot 2026-01-28 at 5 54 34 PM … Screenshot 2026-01-28 at 5 55 32 PM … Screenshot 2026-01-28 at 5 54 15 PM … Screenshot 2026-01-28 at 5 54 52 PM

…

References

Closes #5597 …

Reviewer guidance

  1. Login as [email protected] / a
  2. Go to Channels > Published Channel > Edit (to enter channel editor)
  3. Test Share dropdown (desktop view)
  4. Test Publish button
  5. Test three-dots menu
  6. Test responsive behavior (resize browser to mobile width ~375px)

…

vtushar06 avatar Jan 28 '26 12:01 vtushar06

👋 Thanks for contributing!

We will assign a reviewer within the next two weeks. In the meantime, please ensure that:

  • [ ] You ran pre-commit locally
  • [ ] All issue requirements are satisfied
  • [ ] The contribution is aligned with our Contributing guidelines. Pay extra attention to Using generative AI. Pull requests that don't follow the guidelines will be closed.

We'll be in touch! 😊

learning-equality-bot avatar Jan 28 '26 12:01 learning-equality-bot

hi @misrob, On small screens, the Edit channel option goes into the three-dots menu. The original code showed a red error icon when the channel has no language set. Since KDropdownMenu only accepts strings for option labels, I am thinking to use an emoji instead:

let label = this.$tr('editChannel');
if (!this.currentChannel.language) {
  label = `${label} ⚠️`;
}

Is this okay, or would you prefer something like "Edit channel (incomplete)"?

vtushar06 avatar Jan 29 '26 03:01 vtushar06

one more thing I wanted to ask about original code had some duplication where users could access the same thing from both the Share dropdown and three-dots menu:

  • "Share token" / "Get token" → both open token modal
  • "Invite collaborators" / "Share channel" → both go to share page I kept this for backward compatibility. Should I remove the duplicates from the three-dots menu?

vtushar06 avatar Jan 29 '26 03:01 vtushar06

Hi @vtushar06,

On small screens, the Edit channel option goes into the three-dots menu. The original code showed a red error icon when the channel has no language set. Since KDropdownMenu only accepts strings for option labels, I am thinking to use an emoji instead

Emoji sounds creative ;)!

KDropdownMenu can show icons (doc) but yes - not colored ones. Would you please post before/after screenshot of that place with the icon (as supported by KDropdownMenu now)? Then we can see.

one more thing I wanted to ask about original code had some duplication where users could access the same thing from both the Share dropdown and three-dots menu...

Yes, as you mentioned, let's keep the options exactly the same now. I am not sure what was the original decision, it may be intentional - and not exactly in scope of this project.

MisRob avatar Jan 29 '26 13:01 MisRob

Before we assign a maintainer, I will first try inviting the community review ;)

📢 ✨ Community Review guidance for both authors and reviewers.

MisRob avatar Jan 29 '26 13:01 MisRob

Hii @MisRob! Thank you, I've tested both approaches you suggested:

  1. Emoji Approach: Screenshot showing "Edit channel details ⚠️" and warning appears after the text and more noticeable due to colored emoji.. ...
Screenshot 2026-01-30 at 3 34 26 PM

...

  1. Icon Approach (using KDropdownMenu's icon prop): Screenshot showing "⚠ Edit channel details" and KDropdownMenu places icons before the label text ...
Screenshot 2026-01-30 at 3 41 21 PM

I suggest keeping the emoji approach because the warning appears after the text, which is more natural for an indicator Please let me know which approach you prefer, and I'll finalize the implementation accordingly.

vtushar06 avatar Jan 30 '26 10:01 vtushar06

Hey @vtushar06 ! I am still learning testing , I see the tests now check the computed properties directly instead of the DOM. Should we also test that handleShareMenuSelect and handleChannelMenuSelect actually get called with the right values when users click? Or is testing the computed properties sufficient?

abhiraj75 avatar Feb 01 '26 15:02 abhiraj75

hey @abhiraj75, In our codebase, we're still migrating from old test patterns. The TreeViewBase tests use wrapper.vm computed properties, which is what was approved as not in this PR scope. But best practice going forward is to test user-observable behavior (what appears on screen) rather than internal handler calls.

vtushar06 avatar Feb 01 '26 15:02 vtushar06

Thanks @vtushar06 !

abhiraj75 avatar Feb 01 '26 16:02 abhiraj75

Hi @vtushar06

I've tested both approaches you suggested:

Thanks for following-up, appreciated! And meanwhile similar issues showed up in other places. I'm now coordinating a decision on how to proceed. Will let you know soon.

MisRob avatar Feb 02 '26 19:02 MisRob

@vtushar06 we will update KDS to allow for easier dropdown item customization. Tracking here https://github.com/learningequality/kolibri-design-system/issues/1200. As soon as it's done I will install the new KDS version in Studio, and then you can use it :) In any case, thanks for raising that and also thinking through options. I prefer KDS update because it will be useful in more places and in general, and will allow us to use KDS icons as usual.

MisRob avatar Feb 02 '26 21:02 MisRob

sure @MisRob, please let me know If I can help there too, I would like to work on that issue in KDS..

vtushar06 avatar Feb 03 '26 03:02 vtushar06

Hey @Gauravchy09, thanks for taking the time to review really appreciate it Good points. I’ll take a closer look at the trash link behavior, the remaining Vuetify usage, and the menu duplication to better understand them. Thanks again!

vtushar06 avatar Feb 25 '26 04:02 vtushar06

Thanks both.

As for Vuetify breakpoints ~ for now no problem to keep $vuetify.breakpoint. Vuetify breakpoints are scattered all over and this page still have many Vuetify components. KDS breakpoint system is different. So I think it will be easier & more consistent to take care of all breakpoints at once some time later.

MisRob avatar Feb 25 '26 16:02 MisRob

📢✨ Before we assign a reviewer, we'll turn on @rtibblesbot to pre-review. Its comments are generated by an LLM, and should be evaluated accordingly.

learning-equality-bot avatar Mar 23 '26 13:03 learning-equality-bot

Hi @vtushar06, we will soon release the KDS version with the update you prepared & then we can start wrapping it up here.

MisRob avatar Mar 23 '26 13:03 MisRob

Would you be able to have a look at the conflicting file?

MisRob avatar Mar 23 '26 13:03 MisRob

yeah sure @MisRob.I will look into it.

vtushar06 avatar Mar 23 '26 16:03 vtushar06

Hi, the latest KDS is now merged to unstable https://github.com/learningequality/studio/pull/5787 so you can merge unstable here now to have it available.

MisRob avatar Apr 01 '26 04:04 MisRob

Thanks for the review, I applied the requested refactors (constants, responsive composable, shared handlers, cleaner visibility checks) and updated tests are passing. I still need guidance on the Enter-key/focus behavior before making a follow-up fix there.

vtushar06 avatar Apr 01 '26 18:04 vtushar06