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

LOM-266 Profile block #523

Merged
merged 34 commits into from
Feb 1, 2023
Merged

LOM-266 Profile block #523

merged 34 commits into from
Feb 1, 2023

Conversation

teroelonen
Copy link
Contributor

@teroelonen teroelonen commented Jan 18, 2023

LOM-266

What was done

  • Refactored global navigation functionality to allow using the javascript toggle-functionality to be used without the global navigation as well.
  • Added styles for profile block for the header.

How to install

  • Make sure your instance (any instance is fine, you should test with at least rekry and some other one) is up and running on latest dev branch.
    • git pull origin dev
    • make fresh
  • Update the HDBT theme
    • composer require drupal/hdbt:dev-LOM-266_profile_block
  • Update the helfi_platform_config
    • composer require drupal/helfi_platform_config:dev-LOM-266_profile_block
  • Enable the helfi_profile_block module
    • make shell
    • drush en helfi_profile_block
    • drush locale:check; drush locale:update; drush cr
  • Go to /admin/structure/block and add the Profile block to the Header - Branding region as the last block, hide its title and save the configuration.

How to test

  • You should now have the profile block on the header region of the website. It should have user information if you are logged in or link to login page if you are not logged in. If you are logged in you can click on the user-icon and name and a menu should open with the full user name and logout link. These should work for all languages and for any user on all browser sizes. Test this functionality.
  • Also test carefully that the global navigation functionality works as well the way it worked before.
  • Also test the local navigation functionality that nothing is broken there either.
  • The block should look similar to what has been specified here: https://share.goabstract.com/90969836-ce14-4406-87c1-5f907ca5a2d5?collectionLayerId=2863d3bc-13c3-4f45-9562-bd656af61b18&mode=design&sha=latest and there is also some layouts here https://share.goabstract.com/90969836-ce14-4406-87c1-5f907ca5a2d5 but there is also a lot of wrong information so I would mainly concentrate on the first abstract link that is provided.
  • Check that code follows our standards

Designers review

  • This PR does not need designers review
  • This PR has been visually reviewed by a designer (Name of the designer)

Other PRs

@teroelonen teroelonen force-pushed the LOM-266_profile_block branch from 62c5ace to 3c7643b Compare January 18, 2023 11:44
@teroelonen teroelonen marked this pull request as ready for review January 20, 2023 15:38
Copy link
Contributor

@Arkkimaagi Arkkimaagi left a comment

Choose a reason for hiding this comment

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

Amazing job, such a complex deprecated code mess that you cleaned. I have no idea how you had the patience. I did spot a bunch of stuff, but otherwise great stuff! 🌹

src/js/nav-global/menu.js Outdated Show resolved Hide resolved
templates/layout/page.html.twig Outdated Show resolved Hide resolved
templates/block/block--profile-block.html.twig Outdated Show resolved Hide resolved
src/js/nav-local.js Outdated Show resolved Hide resolved
Copy link
Contributor

@Arkkimaagi Arkkimaagi left a comment

Choose a reason for hiding this comment

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

Good job cleaning stuff, I happened to stumble upon a couple of minor things still. Sorry! 😢

templates/misc/nav-toggle-button.twig Outdated Show resolved Hide resolved
Copy link
Contributor

@Arkkimaagi Arkkimaagi left a comment

Choose a reason for hiding this comment

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

Good job! Approved 🌻

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