Skip to content

Conversation

Kartikayy007
Copy link
Contributor

@Kartikayy007 Kartikayy007 commented Aug 19, 2025

Summary

Replaced Vuetify's MessageDialog component with Kolibri Design System's KModal for the unsaved changes dialog in the Collections modal.

  • Replaced MessageDialog with KModal in ChannelSetModal.vue
  • Updated modal props to use KModal's API (title, submitText, cancelText)
  • Maintained all existing functionality and event handlers

Manual verification:

  1. Logged in as [email protected] with password a
  2. Navigated to Channels > Collections
  3. Clicked "New collection" button
  4. Added text to Collection name input
  5. Clicked close button in the top bar
  6. Verified unsaved changes modal appears with KModal styling
  7. Tested both "Exit without saving" and "Save and close" buttons
  8. All functionality works as expected

References

Reviewer Guidance

Test these changes by:

  1. Login as [email protected] with password a
  2. Go to Channels > Collections
  3. Click "New collection" button
  4. Add text to Collection name input
  5. Click the close button in the top bar
  6. Verify the unsaved changes modal appears and functions correctly
  7. Test both cancel and save actions

Areas to focus on:

  • Modal properly blocks navigation when unsaved changes exist
  • Both RTL and LTR layouts work correctly
  • All 19 tests in channelSetModal.spec.js pass

@Kartikayy007 Kartikayy007 changed the title Refactor unsaved changes dialog to use KModal component and update te… Refactor unsaved changes dialog to use KModal component and update tests Aug 19, 2025
@Kartikayy007 Kartikayy007 changed the title Refactor unsaved changes dialog to use KModal component and update tests Refactor 'unsaved changes' modal to use KModal component and update tests Aug 19, 2025
@MisRob
Copy link
Member

MisRob commented Aug 22, 2025

Thank you @Kartikayy007, we will assign a reviewer next week.

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.

There just a few items that need to be cleaned up, but otherwise these changes are looking good, thank you @Kartikayy007!

import { set } from 'vue';
import { mapGetters, mapActions } from 'vuex';
import difference from 'lodash/difference';
import KModal from 'kolibri-design-system/lib/KModal';
Copy link
Member

Choose a reason for hiding this comment

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

We don't have to import KModal from KDS, this line can be removed :)

MessageDialog,
ChannelItem,
FullscreenModal,
KModal,
Copy link
Member

Choose a reason for hiding this comment

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

Likewise, this line should be removed, we don't need to insert KModal as a child component.

}
},
confirmCancel() {
this.showUnsavedDialog = false;
Copy link
Member

Choose a reason for hiding this comment

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

showUnsavedDialog is set to false within this.close(), which is called in this function already, so we don't need this line added here.

@MisRob
Copy link
Member

MisRob commented Sep 23, 2025

@Kartikayy007 are you planning to resolve feedback?

@MisRob
Copy link
Member

MisRob commented Oct 6, 2025

@LianaHarris360 since we didn't hear from @Kartikayy007, noting that @vtushar06 may finish this work in this PR, so that you don't need to review everything again - as suggested here.

vtushar06 added a commit to vtushar06/studio that referenced this pull request Oct 7, 2025
@MisRob
Copy link
Member

MisRob commented Oct 7, 2025

Closing in favor of #5432

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.

[Remove Vuetify from Studio] 'Unsaved changes' modal in Channels - New collection

3 participants