Skip to content

Replace PrimaryDialog with KModal (and remove it along with DialogBox)#2984

Merged
rtibbles merged 6 commits intolearningequality:developfrom
nucleogenesis:kds-kmodal--primarydialog
Feb 24, 2021
Merged

Replace PrimaryDialog with KModal (and remove it along with DialogBox)#2984
rtibbles merged 6 commits intolearningequality:developfrom
nucleogenesis:kds-kmodal--primarydialog

Conversation

@nucleogenesis
Copy link
Copy Markdown
Member

@nucleogenesis nucleogenesis commented Feb 22, 2021

Description

  • Replaces all uses of PrimaryDialog with KModal
  • Removes PrimaryDialog and DialogBox from the codebase (the latter was not used to begin with)
  • Applies changes to other components to ensure proper functionality.

Issue Addressed (if applicable)

Fixes learningequality/kolibri-design-system#158

Steps to Test

  • Copy the channel token from the Channel List
  • Copy the channel token from the Channel Edit
  • Use the Channel Edit -> Sync Resources Modal - Ensure that you can go back and forth between the steps.
  • See this comment for testing the Catalog Filters Bar: 8f281cc#r47435467

Implementation Notes (optional)

At a high level, how did you implement this?

KModal doesn't take a v-model, so we change those to v-ifs.
Then instead of using the actions slot (that both KModal and VDialog have) - we use the simpler props on KModal to apply the text for the cancel/submit buttons and the actions to take when they're clicked.

Does this introduce any tech-debt items?

Quite the opposite :)

- Removes PrimaryDialog from ChannelItem.vue as the modal
  handling the deletion pop-up.
- Wraps the <VCard> with a <div> so that KModal can live outside
  of the hierarchy of the <VCard>, which wraps internals in an <a>
  tag resulting in clicking the action buttons in KModal following
  that <a> tag.
Also required moving ChannelTokenModal usage in ChannelItem
such that it is rendered outside of the active wrapping DOM element
so that clicking the Close button on KModal doesn't click behind it too
@rtibbles rtibbles merged commit c6c7b8a into learningequality:develop Feb 24, 2021
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.

KModal -> PrimaryDialog

3 participants