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-10614: News article and news item publish date changes #1062

Merged
merged 4 commits into from
Oct 3, 2024

Conversation

teroelonen
Copy link
Contributor

@teroelonen teroelonen commented Sep 27, 2024

UHF-10614

What was done

  • Add publish and updated dates to the the article content type hero-block.

How to install

How to test

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

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/1062/html_report/

@juho-lehmonen juho-lehmonen self-requested a review October 1, 2024 06:45
{{ published_time }}
</time>

{% if updated_time|render|striptags|trim is not empty and html_updated_time|render|striptags|trim is not empty and updated_time > published_time %}
Copy link
Contributor

Choose a reason for hiding this comment

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

This should probably use html_updated_time > html_published_time for more consistent results, otherwise the updated datetime stays hidden in a lot of cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There was actually a bigger bug here I think - it was printing and comparing the created and published_at dates when it should have actually done the comparison to changed and published_at values. This is now fixed.

@@ -49,6 +49,10 @@ $koro-height: 50px;
}
}

.hero__publish-information {
Copy link
Contributor

Choose a reason for hiding this comment

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

There's an empty space before the ", updated" text:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed the unwanted spacing before the datetime on the template.

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