Yeldaai / chat-plugin

Yelda Chat Plugin
MIT License
0 stars 0 forks source link

On page demo, force the webchat to be opened on page load #68

Closed meelie closed 4 years ago

meelie commented 4 years ago

Improvement related to https://github.com/Yeldaai/chat-plugin/issues/67 user experience

User story : As a demo tester, I expect the webchat to be open on demo page on page load, even if i closed it and left the page earlier

Tech advice :

  1. pass isDemo boolean to webchat from chat-plugin injector

  2. update getPopinInitStatus()

    getPopinInitStatus: function() {
      // If demo page, force que chat to be opened on chat init
      if(this.isDemo) {
        return true
      }
    
      // shouldBeOpened define the default comportment of the popin
      return (
         // ...

    Let know if you want to do it differently or think something is wrong or missing

  3. update readmes (yelda, chat-plugin)

    | isDemo | Boolean | `false` | Set to `true` only to flag the conversation as "demo" in conversations list and training inbox |

    to

    | isDemo | Boolean | `false` | Set to `true` to flag the conversation as "demo" in conversations list and training inbox and force the webchat to be opened on page load, even if shouldBeOpened is set to false|

    and

    'isDemo': false // Only to flag the conversation as "demo" in conversations list and training inbox, default value is false
    ``
    to

    'isDemo': false // flag the conversation as "demo" in conversations list and training inbox and force the webchat to be opened on page load, even if shouldBeOpened is set to false. default value is false

thanks