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-10469: Revert news archive from index to database based #683

Merged
merged 5 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,17 @@ selection of what to show is determined by the `field_listing_type`, and the par
#### News archive (news_archive)

The _news_archive_ paragraph provides the news archive search that can be added to landing pages. The news archive is
a React search that uses views listing (`news_archive_index`) as a fallback when JavaScript is not enabled. All React
a React search that uses views listing (`news_archive`) as a fallback when JavaScript is not enabled. All React
searches are in the `hdbt` theme, so most of the related logic is also found there. The _news_archive_ paragraph has an
editable title and description.
- React search code can be found under the `hdbt` theme [here](https://github.com/City-of-Helsinki/drupal-hdbt/tree/main/src/js/react/apps/news-archive).
- Additional configuration for the React app is under the `hdbt_subtheme` theme function
`hdbt_subtheme_preprocess_paragraph` [here](https://github.com/City-of-Helsinki/drupal-helfi-etusivu/blob/dev/public/themes/custom/hdbt_subtheme/hdbt_subtheme.theme)
- Fallback view when JavaScript is not enabled can be found in the `/conf/cim` folder [here](https://github.com/City-of-Helsinki/drupal-helfi-etusivu/blob/dev/conf/cmi/views.view.news_archive_index.yml).
- Fallback view when JavaScript is not enabled can be found in the `/conf/cim` folder [here](https://github.com/City-of-Helsinki/drupal-helfi-etusivu/blob/dev/conf/cmi/views.view.news_archive.yml).
- **NOTICE:** The fallback view and RSS view retrieve data from the regular database, while the React application queries
the Elasticsearch index. This is because switching the view to use the Elasticsearch index as the data source limits
its ability to filter using URL queries, compared to the regular view. For example, queries in the format
`?tags%5b%5d=375` would no longer work out of the box, and the contextual filters would need to be added separately.

### Custom roles

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ display:
exposed_sorts_label: Järjestä
sort_asc_label: Nouseva
sort_desc_label: Laskeva
news_archive_feed_index:
news_archive_block:
display_title: Uutisarkisto
news_archive_feed:
display_options:
title: Uutiset
news_archive_index_block:
display_title: Uutisarkisto
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ display:
first: Första
last: Sista
title: 'Alla nyheter'
news_archive_index_block:
news_archive_block:
display_title: Nyhetsarkiv
news_archive_feed_index:
news_archive_feed:
display_options:
title: Nyheter
Loading