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-9274: Basic implementation of Telia ACE widget. #652

Merged
merged 5 commits into from
Nov 29, 2023

Conversation

juho-lehmonen
Copy link
Contributor

@juho-lehmonen juho-lehmonen commented Nov 27, 2023

UHF-9274

What was done

Creates an embed block for Telia ACE chat widgets. Actual chat functionality can't be tested locally yet because local domains aren't whitelisted on Telia's end, but the widget is visible on the demo site: https://drupal-helfi-drupal-platform-test.test.hel.ninja/fi/new-telia-ace-widget

How to install

  • Make sure your instance is up and running on latest dev branch.
    • git pull origin dev
    • make fresh
  • Update the Helfi Platform config
    • composer require drupal/helfi_platform_config:dev-UHF-9274-telia-ace
  • Run make drush-cr
  • Create a new page or landing page for testing with swedish and english translations
  • Add a new Telia ACE block to the Attachments region with the following values:
    • Hide the title
    • Script URL: /wds/instances/J5XKjqJt/ACEWebSDK.min.js
    • Chat ID: //acewebsdk/local-chat-asiointi-eng
    • Translate the block and change the chat ID:
      • Finnish: //acewebsdk/local-chat-asiointi-fin
      • English: //acewebsdk/local-chat-asiointi-sve

How to test

  • Check that this feature works on the page where the block is visible:
    • View the page source, make sure the <a class="hidden" href="//acewebsdk//local-chat-asiointi"></a> element is there
    • The ACEWebSDK.min.js script is embedded on the page and has the async parameter
    • The window.chat_user_consent object is available on the page
  • Config ignore functionality:
    • Export the new block's config with drush cex -y
    • Edit the block and translations, then run drush cim -y.
    • The config ignore hook should work and the changes you made after the export should not be reverted
  • Check that code follows our standards

@juho-lehmonen juho-lehmonen changed the title Draft: UHF-9274: Basic implementation of Telia ACE widget. UHF-9274: Basic implementation of Telia ACE widget. Nov 28, 2023
@codecov-commenter
Copy link

codecov-commenter commented Nov 28, 2023

Codecov Report

Attention: 48 lines in your changes are missing coverage. Please review.

Comparison is base (4c1c831) 13.75% compared to head (b1d579c) 13.03%.
Report is 12 commits behind head on main.

❗ Current head b1d579c differs from pull request most recent head da0d96b. Consider uploading reports for the commit da0d96b to get more accurate results

Files Patch % Lines
src/Plugin/Block/TeliaAceWidget.php 0.00% 48 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #652      +/-   ##
============================================
- Coverage     13.75%   13.03%   -0.72%     
- Complexity      238      241       +3     
============================================
  Files            27       28       +1     
  Lines           880      928      +48     
============================================
  Hits            121      121              
- Misses          759      807      +48     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@hyrsky hyrsky self-requested a review November 28, 2023 09:57
@juho-lehmonen juho-lehmonen marked this pull request as ready for review November 28, 2023 11:19
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.

3 participants