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-9741: News archive refresh #659

Merged
merged 16 commits into from
Jul 19, 2024
Merged

UHF-9741: News archive refresh #659

merged 16 commits into from
Jul 19, 2024

Conversation

teroelonen
Copy link
Contributor

@teroelonen teroelonen commented Jul 9, 2024

UHF-9741

What was done

  • Removed news_archive view and replaced it with news_archive_index view.
  • Added news_archive paragraph that can be added to landing pages.
  • Delete old aliases related to the news_archive view.

How to install

  • Make sure your instance is up and running on dev branch.
    • git checkout dev
    • make fresh
  • Run make drush-cim drush-cr
  • Run git fetch; git checkout UHF-9741
  • Run composer require drupal/hdbt:dev-UHF-9741; composer require drupal/helfi_platform_config:dev-UHF-9741
  • Run make drush-cim drush-cr drush-updb drush-locale-update drush-cr

How to test

  • Go to https://helfi-etusivu.docker.so/fi/uutiset / https://helfi-etusivu.docker.so/sv/nyheter / https://helfi-etusivu.docker.so/en/news and you should get 404.
  • Now run make drush-uli and log in.
  • Go to add a landing page with translations https://helfi-etusivu.docker.so/en/node/add/landing_page and give it a title, hero without an image and for the content area give it news archive paragraph. For the paragraph write Limit the search / Rajaa hakua / Begränsa sökningen as the title depending on what language version you are creating. Before saving change the uncheck the automatic alias and change the alias to /news / /uutiset / /nyheter. The description is optional but write something there too at least for one of the language versions. Do all the same things for each translation version.
  • Now you should have three language versions of news archive and they all should work correctly. The results should only find news articles in the language selected (so there should be different amount for each language) and the UI should be in correct language.
  • The term on the submit button should say Search / Etsi / Sök
  • The amount news listed per page should be 15.
  • The results title text should say X search results / X hakutulosta / X träffar and it should change to singular form if there is only one search result.
  • You should be able to order the RSS-feed with no filters or selected filters as before from the link on the bottom of the results. The text on the link changes based on if you have filtered the results or not.
  • The design of the block should look similar to these designs: https://www.figma.com/file/v5YC5vwdlXr1N8RaZ9SMPO/Hel.fi-Ajankohtaissis%C3%A4ll%C3%B6t-(Uutiset)?type=design&node-id=1024-43520&mode=design&t=4vlJyjZxqcBSgY2M-4
  • Turn of javascript and reload the page and you should see fallback view that lists the same amount of news as the react search but doesn't have filtering options and the title of the component should say News archive / Uutisarkisto / Nyhetsarkiv.
  • There should be feed link on the fallback view as well. Test that it works as well.
  • Check that code follows our standards

Bonus sector

  • Since the hdbt touches other react searches with the changes that were made I think it would be wise to check their functionality as well with the hdbt branch active. There are the health station search and maternity and child health clinic search paragraphs on SOTE instance that could be tested, ploughing schedule and district and project search paragraphs on KYMP instance, school search on KASKO instance, job search on REKRY instance and event search on every instance that might have been affected by the changes I made. They could be tested that they still work the same or even better than before.

Continuous documentation

  • This feature has been documented/the documentation has been updated (news_archive paragraph updated to components excel)
  • This change doesn't require updates to the documentation

Translations

  • Translations have been added to configuration-files and included in this PR

Other PRs

@teroelonen teroelonen changed the title UHF- 9741 UHF-9741: News archive refresh Jul 9, 2024
@teroelonen teroelonen marked this pull request as ready for review July 10, 2024 13:37
Copy link

Copy link
Contributor

@khalima khalima left a comment

Choose a reason for hiding this comment

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

Awesome! 🚀

@teroelonen teroelonen merged commit 929dbef into dev Jul 19, 2024
2 checks passed
@teroelonen teroelonen deleted the UHF-9741 branch July 19, 2024 11:30
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.

4 participants