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-10259: Curated event list #830

Merged
merged 18 commits into from
Oct 22, 2024
Merged

Conversation

jeremysteerio
Copy link
Contributor

@jeremysteerio jeremysteerio commented Oct 18, 2024

UHF-10259

Add backend files for curated event list paragraph.

Sketch: https://www.figma.com/design/v5YC5vwdlXr1N8RaZ9SMPO/Hel.fi-Ajankohtaissis%C3%A4ll%C3%B6t-(Uutiset)?node-id=3261-57157

What was done

  • Add new paragraph: curated_event_list
  • Add new external entity for Linked Events events
  • Add new storageclient for retrieving events
  • Add custom constraint and validator
  • Add translations

How to install

Install this branch:

  • composer require drupal/helfi_platform_config:dev-UHF-10259-curated-event-list
  • Run drush updb -y. This should install the new paragraph module.
  • Run drush cr

Install the HDBT branch:

  • composer require drupal/hdbt:dev-UHF-10259-curated-event-list
  • Run drush cr

Import translations:

  • Run drush locale:check && drush locale:update
  • Run drush cr

How to test

Known issues / deviations from the sketch

  • Link icon within the event title/link is the one we usually use. Discussion about this / possible jira ticket upcoming
  • Time is displayed in the format we use, d.m.Y H:i and JS locale string format as in sketch. Confirming with design / writing a ticket about this as well.

Event testing:

  • Add a new landing page. You should see curated event list option in the list for available paragraph types for content field.
  • Add events to the paragraph. You may do this by searching a name and letting autocompletion find the for you. You may also search event by ID. See field instructions for more info.
  • View the page. The paragraph layout should match the sketch.

Try you some event combinations. These restrictions should apply:

  • You can't add and event that is past its end time. You can test the validation by typing elo:32916e77-a2fc-4b4b-a605-c84b680bd4c5 in the event search field and choosing the event found. If you try to save the page with this selection, the validation fails it and shows an error message.
  • Only the top 3 events should be displayed, based on how you order them in the admin
  • This is hard to test, but once an added event is past its end time, it should be hidden in the view

Multilingual support:

  • Translations of events are loaded dynamically IF those are present in the source data. This is a bit confusing to test since source data has "translations" that are actually the same title in fi, sv and en. You can add event helsinki:agif33o4ui to the list and translate the node to fi / en versions. When viewing the page and switching between translations, you should see event name change accordingly.

Also:

  • View all -link should work with default settings. You should be able to change the link text and href.
  • Check that code quality matches our standards.

Continuous documentation

  • This feature has been documented/the documentation has been updated
  • This change doesn't require updates to the documentation

Translations

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

Other PRs

HDBT

- Add new paragraph: curated_event_list
- Add new external entity for Linked Events events
- Add new storageclient for retrieving events
- Add custom constraint and validator
- Add translations
@jeremysteerio jeremysteerio marked this pull request as draft October 21, 2024 05:54
@teroelonen teroelonen changed the title Uhf 10259 curated event list UHF-10259: Curated event list Oct 21, 2024
@teroelonen
Copy link
Contributor

Functionality works nicely, needs someone with more backend expertise to review the code.

@jeremysteerio jeremysteerio marked this pull request as ready for review October 22, 2024 05:30
Copy link

sonarcloud bot commented Oct 22, 2024

@jeremysteerio jeremysteerio merged commit c17835f into main Oct 22, 2024
4 checks passed
@jeremysteerio jeremysteerio deleted the UHF-10259-curated-event-list branch October 22, 2024 08:56
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