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-9824: Allow relative links #52

Merged
merged 11 commits into from
Mar 20, 2024
Merged

UHF-9824: Allow relative links #52

merged 11 commits into from
Mar 20, 2024

Conversation

tuutti
Copy link
Member

@tuutti tuutti commented Mar 19, 2024

How to install

Etusivu

  • Make sure Etusivu instance is up and running
  • Change the UID 1 user's password to 123 on Etusivu: drush upwd helfi-admin 123 for example

Some other instance

  • composer require drupal/helfi_navigation:dev-UHF-9824
  • composer require drupal/hdbt:dev-UHF-9824
  • Add navigation API keys to your local.settings.php:
      $config['helfi_api_base.api_accounts']['vault'][] = $pubsub_vault;
      $config['helfi_api_base.api_accounts']['vault'][] = [
        'id' => 'helfi_navigation',
        'plugin' => 'authorization_token',
        'data' => base64_encode('helfi-admin:123'), // 123 is the password of helfi-admin account
      ];

How to test

  • Run drush php-eval "_helfi_navigation_queue_item('main', 'en', 'update');" && drush cron && drush cr
  • Make sure local URLs are synced with domain (https://helfi-etusivu.docker.so/en/api/v1/global-menu/liikenne)
  • Add these to your sites/default/local.services.yml file:
     parameters:
       helfi_navigation.absolute_url_always: false
  • Re-run the php-eval command
  • Make sure the synced URLs are relative (https://helfi-etusivu.docker.so/en/api/v1/global-menu/liikenne
  • Test Global navigation blocks on desktop size
  • Test Global navigation blocks on mobile size

Other PRs

@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.26%. Comparing base (b16d21d) to head (b5e2b45).

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

Additional details and impacted files
@@             Coverage Diff              @@
##               main      #52      +/-   ##
============================================
+ Coverage     85.14%   85.26%   +0.12%     
  Complexity      140      140              
============================================
  Files            18       18              
  Lines           579      577       -2     
============================================
- Hits            493      492       -1     
+ Misses           86       85       -1     

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

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@hyrsky hyrsky left a comment

Choose a reason for hiding this comment

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

This works perfectly! 🎉

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