Skip to content

Conversation

@Prashant-thakur77
Copy link
Contributor

@Prashant-thakur77 Prashant-thakur77 commented Oct 21, 2025

Fixes #5425

Summary

This PR completes the removal of Vuetify from the Send Email dialog as part of the larger Vuetify migration effort (#5060). The dialog now uses Kolibri Design System components exclusively while maintaining all existing functionality.

Changes Made:

✅ Replaced VDialog and ConfirmationDialog with KModal

✅ Replaced VFlex and VLayout with custom CSS flex styles

✅ Replaced VForm with native form element

✅ Replaced VTextField and VTextarea with KTextbox

✅ Replaced VTooltip with KTooltip

✅ Implemented form validation using generateFormMixin

✅ Created new StudioChip component to replace VChip
Screenshot From 2025-10-21 11-23-43
image
Screenshot From 2025-10-21 11-30-37

References

Sub-issue of #5060.

Reviewer guidance

Login as [email protected] with password a
Go to Administration > Users
Select few users in the table
Click Email

Visual Changes:

Minor styling differences due to KDS vs Vuetify
Consistent with Kolibri Design System patterns
Maintains all existing functionality

@Prashant-thakur77 Prashant-thakur77 changed the title Remove vuetify email dialog [Remove Vuetify from Studio] Send e-mail dialog Oct 21, 2025
Copy link
Member

@LianaHarris360 LianaHarris360 left a comment

Choose a reason for hiding this comment

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

Thanks so much for updating the EmailUsersDialog component. This is a good start so far. There’s still a couple of Vuetify components that can be removed. The VBtn and VCardText can be replaced with KButton and a div. There’s also a few user-facing strings that still need to be translated. The KModal title, the From and To labels within the form, “Subject line”, “Email body”, and the phrase “Add placeholder to message”, and all of the placeholder labels.

@Prashant-thakur77
Copy link
Contributor Author

@LianaHarris360

There’s also a few user-facing strings that still need to be translated. The KModal title, the From and To labels within the form, “Subject line”, “Email body”, and the phrase “Add placeholder to message”, and all of the placeholder labels.

I have a doubt related #5426 (comment) this.Here i was told that wrapped strings are not to be used in administraion.So please do tell what i need to do here in this context

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.

Chiming in with some additional notes.

Overall congratulations on your first more complex issue. Overall nice work. All main features seem to be preserved Thanks for examining the current experience carefully.

@Prashant-thakur77
Copy link
Contributor Author

Prashant-thakur77 commented Nov 1, 2025

Hey @MisRob, just a quick note — when triggering the email dialog from the UserActionDropdown for a specific user, their name doesn’t show up as a chip in the “To” field.
Wanted to check if that’s intentional or an oversight. 🙂
Checked it in unstable.
Screencast From 2025-11-01 22-35-19.webm
I just looked into it a little and its happening because of passing wrong prop insite EmailDialog in UserActionDropdown.

EmailUsersDialog
v-model="emailDialog"
:query="{ ids: [userId] }"

which actually should be

EmailUsersDialog
v-model="emailDialog"
:initialRecipients="[userId]"

@MisRob
Copy link
Member

MisRob commented Nov 3, 2025

@Prashant-thakur77

Wanted to check if that’s intentional or an oversight

Oversight, I would say.

@Prashant-thakur77
Copy link
Contributor Author

Should i update it?

@MisRob
Copy link
Member

MisRob commented Nov 3, 2025

@Prashant-thakur77 That'd be nice, thank you.

@MisRob
Copy link
Member

MisRob commented Nov 7, 2025

Hi @Prashant-thakur77, just checking in on what's status or if you need re-review from @LianaHarris360.

From brief skim, it seems you've resolved most of the feedback. I only don't see changes related to this comment - is it still work in progress, or some clarification is needed?

@Prashant-thakur77
Copy link
Contributor Author

Prashant-thakur77 commented Nov 7, 2025

I only don't see changes related to this comment - is it still work in progress, or some clarification is needed?

YES @MisRob do i need to make whole area clickable chips for this as in StudioChip component because i have already implemented it using button as you mentioned and this has been updated(the button component is in EmailUsersdialog not in studiochip) and the chips with x button have been implemented with help of kicon button in StudioChip component.And those chips without clear button such as used in (in front of front text )or when just one recepient is present are also in Studiochip.
I just have doubt that do we need to use the Studiochip for the placeholder button too or is it fine the way i have currently implemented it with button in EmailUsersDialog?
(Just a note that the Vchip wasnot used in placeholder button before too).

The chips are working as expected.And you also mentioned to remove the extra computed effects such as(darken on clicking) and will further notify during review :)

@Prashant-thakur77
Copy link
Contributor Author

Prashant-thakur77 commented Nov 7, 2025

r if you need re-review from @LianaHarris360.

apart from it everything else if fine.
Yes , changes are ready for the review.

@MisRob
Copy link
Member

MisRob commented Nov 7, 2025

Ah I see @Prashant-thakur77. It's good consideration. I think that having <button> related logic in EmailUsersDialog is fine - I am not yet sure if it will be needed at another place or not, so there's no need to abstract those parts into StudioChip yet. I was primarily interested whether the comment is resolved and if we should re-review. I will let @LianaHarris360 to start the next review round :) Thanks both.

Copy link
Member

@LianaHarris360 LianaHarris360 left a comment

Choose a reason for hiding this comment

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

Thanks for updating your PR and resolving the feedback, it's almost ready to be merged! There were some visual elements that are slightly different from the initial modal that I commented on.

},
placeholderButtonStyles() {
return {
backgroundColor: this.$themePalette.grey.v_300,
Copy link
Member

Choose a reason for hiding this comment

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

Can we make the background color of these placeholder buttons the same as the StudioChips?

Copy link
Member

Choose a reason for hiding this comment

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

That's a good suggestion - it will be a minor deviation, but using a little lighter version like in StudioChip will also help contrast 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice suggestion .on 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.

Addressed it

&:hover {
opacity: 0.9;
transform: translateY(-1px);
Copy link
Member

Choose a reason for hiding this comment

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

We typically darken button backgrounds on hover, so I would suggest setting the background-color to #CCCCCC here instead. We should also remove the transform animation to keep the button behavior the same as before.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When updating a color, is it okay to directly use #CCCCCC in the hover state? Shouldn’t we use a theme token instead? If so, could you provide an example of how to use a theme token for hover effects? I tried implementing it, but it didn’t work as expected.

Copy link
Member

@MisRob MisRob Nov 7, 2025

Choose a reason for hiding this comment

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

Yes to tokens. $computedClass to the rescue :) Scroll to Computed classes section on https://design-system.learningequality.org/colors We use those for hovers. First steps can be a bit tricky, but you can also search Studio and Kolibri codebases for plenty examples.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ON 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.

Addressed it

min-height: 24px;
padding: 2px 8px;
margin: 2px;
font-size: 12px;
Copy link
Member

Choose a reason for hiding this comment

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

The font-size of the original chips was 13px, can we update the font-size here to match?

Original PR Version
before after

Also, the close icon buttons look bigger than the original x buttons. The size of the chips or the size of the icon buttons might need to be updated.

Copy link
Member

@MisRob MisRob Nov 7, 2025

Choose a reason for hiding this comment

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

And dark gray background with white X for close button needs to be preserved as well, @Prashant-thakur77. Except tiny details, we really need to stay close to the current experience. If it helps, feel free to drop KIconButton use in favor of custom <button> for close button.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On it..:)

Copy link
Contributor Author

@Prashant-thakur77 Prashant-thakur77 Nov 7, 2025

Choose a reason for hiding this comment

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

image Updated with native button

Copy link
Contributor Author

@Prashant-thakur77 Prashant-thakur77 Nov 7, 2025

Choose a reason for hiding this comment

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

This done with the help of KIconbutton .
Screencast From 2025-11-08 02-59-12.webm
The :color prop of kbutton will be used with hex
The issue is that the icon cannot be more smaller than this.
image

KIconButton
v-if="close"
class="studio-chip__close"
:aria-label="removeLabel"
icon="delete"
color=#999999
appearance="flat-button"
data-test="remove-chip"
@click.stop="handleClose"

This is done with the help of Div and native button
Screencast From 2025-11-08 03-04-00.webm

The only major diff is that the kIconButton provides with the background show and rest it similar.The native button requires more styling.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do tell which we should prefer :)

Copy link
Member

Choose a reason for hiding this comment

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

Both versions look fine, but I believe the one that more clearly shows a visual difference when hovered is preferred, the KIconButton version.

Copy link
Contributor Author

@Prashant-thakur77 Prashant-thakur77 Nov 8, 2025

Choose a reason for hiding this comment

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

Addressed it,Used kIconbutton

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Remove Vuetify from Studio] Send e-mail dialog

3 participants