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

UHF-8080: Watson Talpa chat opening fix #446

Merged
merged 3 commits into from
Feb 28, 2023

Conversation

teroelonen
Copy link
Contributor

@teroelonen teroelonen commented Feb 27, 2023

UHF-8080

What was done

  • Added timeout and different opening function for Watson type chats
  • Make sure the talpa chats are loaded as quickly as possible by adding async attribute for the library
  • Fixed php warnings from ChatLeijuke.php

How to install

  • Make sure your instance is up and running on latest dev branch. You can use for example asuminen.
    • git pull origin dev
    • make fresh
  • Update the Helfi Platform config
    • composer require drupal/helfi_platform_config:dev-UHF-8080_watson_chat_opening_issue_fix
  • Run make drush-cr

How to test

  • You should test this with multiple chats so add many of them to different pages on the block layout page. You can add them using the Chat Leijuke block and selecting the Chat type from there. The bug was reported on the Tablotti but you should check others too.
  • Check that there is no PHP errors/warnings related to the chats on the pages where the chat is added.
  • Clear page cookies.
  • Refresh the page where the chat is and accept only compulsory cookies.
  • Click on the chat and make sure it opens with first click.
  • Close the chat so that there is no more popup visible.
  • Open the chat again and close it once more.
  • Refresh the page and make sure the chat opens again nicely.
  • Clear the page cookies again.
  • Refresh the page where the chat is and accept all cookies.
  • Click on the chat and make sure it opens with first click.
  • Close the chat so that there is no more popup visible.
  • Open the chat again and close it once more.
  • Refresh the page and make sure the chat opens again nicely.
  • Repeat these steps to all the chats that you are testing.
  • Check that code follows our standards

…e chats, make sure the talpa chats are loaded as quickly as possible by adding async attribute for the library, fixed php warnings from ChatLeijuke.php
@juho-lehmonen juho-lehmonen self-requested a review February 27, 2023 13:31
Copy link
Contributor

@juho-lehmonen juho-lehmonen left a comment

Choose a reason for hiding this comment

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

Not sure if this is related to our code, but you can consistently bug out the Genesys SUUNTE and KYMP chatbots (at least on Firefox) so the button disappears until you clear all cookies:

  • Open the page
  • Accept or deny cookies
  • Open the Genesys chat
  • Quickly hit the x to close the chat
  • Reload the page before the closing animation completes
  • The button is now gone on all subsequent page loads
  • Delete cookies and reload the page, accept cookies again. The button should be visible again

helfi_platform_config.libraries.yml Show resolved Hide resolved
@juho-lehmonen
Copy link
Contributor

juho-lehmonen commented Feb 28, 2023

Again, probably not related to our code, but If you open one of the Watson bots, for example Sotebotti, and then load a page with another bot like Talbotti, the previous bot opens automatically.

Also if you try to open one of the Watson bots immediately after refreshing the page, the button stays on the page. Doesn't happen with other chatbots so probably not a bug with our code.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

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