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 #1091

Merged
merged 13 commits into from
Oct 22, 2024
Merged

Conversation

jeremysteerio
Copy link
Contributor

@jeremysteerio jeremysteerio commented Oct 18, 2024

UHF-10259

Add fronted 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 template support for curated event list paragraph
  • Add styles for curated event list
  • Add template hook to set translated title for paragraph
  • Add translations

How to install

Test this on an instance of your choice. Note: if you want to run make fresh, do it before the next steps.

Install the platform config 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 this 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.
  • The SCSS for the event component is more or less a copy paste of the medium news teaser. Making a ticket for a general reusable component for this since upcoming Helsinki Kanava component is also a copy of these.'

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 them 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

Platform config

- Add template support for curated event list paragraph
- Add styles for curated event list
- Add template hook to set translated title for paragraph
- Add translations
@jeremysteerio jeremysteerio marked this pull request as ready for review October 21, 2024 14:20
Copy link

⚠️ Visual regression found! Please check if this change is wanted or accidental. You can check the output here: https://city-of-helsinki.github.io/drupal-hdbt/pull/1091/html_report/

Copy link
Contributor

@teroelonen teroelonen left a comment

Choose a reason for hiding this comment

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

This is good to go from my side now 🦖

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