Skip to content

Commit

Permalink
UHF-9815: Merge branch 'main' of https://github.com/City-of-Helsinki/…
Browse files Browse the repository at this point in the history
…drupal-hdbt into UHF-9815
  • Loading branch information
teroelonen committed Apr 15, 2024
2 parents 6234c53 + e494732 commit abcaf79
Show file tree
Hide file tree
Showing 13 changed files with 677 additions and 949 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/npm-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Create Pull Request
if: steps.npm_audit.outputs.CREATE_PR == 'true'
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v6
with:
committer: GitHub <[email protected]>
author: actions-bot <[email protected]>
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/visual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
- name: Set theme folder
run: echo "THEME_FOLDER=$DRUPAL_ROOT/public/themes/contrib/$THEME_NAME" >> $GITHUB_ENV

- name: Update
run: sudo apt update

- name: Clone platform
run: |
git clone --depth=1 https://github.com/City-of-Helsinki/drupal-helfi-platform.git $DRUPAL_ROOT
Expand Down Expand Up @@ -139,7 +142,7 @@ jobs:
destination_dir: pull/${{github.event.number}}

- name: Update comment
uses: hasura/comment-progress@v2.2.0
uses: hasura/comment-progress@v2.3.0
if: github.ref != 'refs/heads/main'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.19.0
18.20.2
1 change: 1 addition & 0 deletions dist/js/chat-trigger.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions hdbt.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ sidebar-menu-toggle:
js:
dist/js/sidebar-menu-toggle.min.js: {}

chat-trigger:
version: 1.0
js:
dist/js/chat-trigger.min.js: {}

color-palette:
version: 1.0
css:
Expand Down
13 changes: 13 additions & 0 deletions hdbt.theme
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,19 @@ function hdbt_preprocess_block(&$variables): void {
if ($variables['plugin_id'] == 'profile_block') {
$variables['#attached']['drupalSettings']['hdbt']['profile_dropdown'] = TRUE;
}

$chat_blocks = [
'ibm_chat_app',
'telia_ace_widget',
'chat_leijuke',
];

// Add the chat trigger handler JS to chat blocks.
// It tracks the data-chat-trigger attribute and opens
// a corresponding chat if clicked.
if (in_array($variables['plugin_id'], $chat_blocks)) {
$variables['#attached']['library'][] = 'hdbt/chat-trigger';
}
}

/**
Expand Down
Loading

0 comments on commit abcaf79

Please sign in to comment.