Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add replaceMode onto User Options #73

Merged
merged 3 commits into from
Apr 27, 2021
Merged

Add replaceMode onto User Options #73

merged 3 commits into from
Apr 27, 2021

Conversation

mbomfim33
Copy link
Contributor

This PR is related to #64 discussion, and it is a pretty naive implementation of what I understand would suffice to allow users to mount their applications onto the specified DOM element, and avoid the concatenation of .single-spa-container class.

@mbomfim33 mbomfim33 changed the title Add replaceMode onto User Options WIP - Add replaceMode onto User Options Apr 26, 2021
Copy link
Member

@joeldenning joeldenning left a comment

Choose a reason for hiding this comment

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

This looks good to me. Were you able to test it in your app? Also, could you add a test for this to https://github.com/single-spa/single-spa-vue/blob/main/src/single-spa-vue.test.js?

@mbomfim33
Copy link
Contributor Author

Hey, @joeldenning, sure. I'll start the tests and trying it out now, just wanted to be sure that this was what we are looking for. Is there any other specific scenarios I should be worried about with this new condition? Or that's all good?

@joeldenning
Copy link
Member

We should verify that the following code would result in the following html:

singleSpaVue({
  el: '#vue-app',
  replaceMode: true,
  // rest of options
})
<template>
  <div id="vue-app">
    <button>Hi</button>
  </div>
</template>
<html>
  <body>
    <div id="vue-app">
      <button>Hi</button>
    </div>
  </body>
</html>

@mbomfim33
Copy link
Contributor Author

@joeldenning, done. Should have TDD'ed here, but oh well.

@mbomfim33 mbomfim33 changed the title WIP - Add replaceMode onto User Options Add replaceMode onto User Options Apr 26, 2021
Copy link
Member

@joeldenning joeldenning left a comment

Choose a reason for hiding this comment

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

Thanks

@joeldenning joeldenning merged commit a5925b4 into single-spa:main Apr 27, 2021
joeldenning added a commit to single-spa/single-spa.js.org that referenced this pull request Apr 27, 2021
joeldenning added a commit to single-spa/single-spa.js.org that referenced this pull request Apr 27, 2021
joeldenning added a commit to single-spa/single-spa.js.org that referenced this pull request Apr 27, 2021
@joeldenning
Copy link
Member

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.

2 participants