Git Product home page Git Product logo

Comments (4)

fatihsolhan avatar fatihsolhan commented on September 26, 2024

Hi, @DominikGanic thanks a lot for your request and kind words.
That callback does make sense. There is already PR #48 which adds the exit event.
I will review and merge it asap. Having a super busy week, that's why couldn't find time and merge that.

v-onboarding will only emit the close/exit event. I think letting the users implement their own prompt makes more sense because that looks out of the v-onboarding's scope for me. I might be wrong, would love to hear your opinions as well.

from v-onboarding.

DominikGanic avatar DominikGanic commented on September 26, 2024

Thanks again for your answer and don't worry about me, just take your time and relax if you're really busy. :)

It would be awesome if we could listen to the close event (button click close event) and inject our own logic into it - either it should close or not like returning a boolean.

Something like this:

@close="CloseBoarding"

const CloseBoarding = () => {
     // any individual logic here like prompts / saving cookie states blabla..

     return true; // will close the boarding
     return false; // will continue the boarding
};

from v-onboarding.

fatihsolhan avatar fatihsolhan commented on September 26, 2024

I would suggest adding your own close listener to your custom UI button like this

<template>
<VOnboardingWrapper>
  <VOnboardingStep>
    // ...
    <button class="close" @click="onClickClose">X</button>
    // ...
  </VOnboardingStep>
</VOnboardingWrapper>

</template>
<script>
const { start, finish } = useVOnboarding()

const showPrompt = ref(false)

const onClickClose = () => {
    showPrompt.value = true

  // apply logic here
 
 // if decided to end onboarding:
 finish()

 // if decided to stay
 showPrompt.value = false
}
</script>

from v-onboarding.

github-actions avatar github-actions commented on September 26, 2024

🎉 This issue has been resolved in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

from v-onboarding.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.