Skip to content

feat: Properly show updates of news articles#973

Open
MoritzWeber0 wants to merge 10 commits into
mainfrom
feat/news-updates
Open

feat: Properly show updates of news articles#973
MoritzWeber0 wants to merge 10 commits into
mainfrom
feat/news-updates

Conversation

@MoritzWeber0

Copy link
Copy Markdown
Member

Add a new updated attribute to articles. It should reflect the date of the last major update. This replaces the previous manual handling via updating the original date and the title. The updated date is displayed after the original date as updated tag.

In addition, add an updated partial which can be used to show the updated parts in the news article.

@netlify

netlify Bot commented May 25, 2026

Copy link
Copy Markdown

Deploy Preview for fipguide ready!

Name Link
🔨 Latest commit 2152dab
🔍 Latest deploy log https://app.netlify.com/projects/fipguide/deploys/6a358550e21e550008f9ed14
😎 Deploy Preview https://deploy-preview-973--fipguide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

Copy link
Copy Markdown

Hi there! 👋

Thank you for your contribution to the FIP Guide! 🚀
We appreciate your effort in making rail staff travel information more accessible. 🚄

Checklist before merging:

  • Added a description to the Pull Request
  • Checked the License of new pictures (non-commercial use without attribution)
  • Modified content in English
  • Modified content in German
  • Modified content in French

@MoritzWeber0 MoritzWeber0 requested a review from therobrob May 25, 2026 15:37
@MoritzWeber0 MoritzWeber0 changed the title feat: Properly show updates to news articles feat: Properly show updates of news articles May 25, 2026
@lenderom

Copy link
Copy Markdown
Member

Thanks for the implementation. I think it's a huge improvement for the usability

@MoritzWeber0 MoritzWeber0 added the technical Technical issues, e.g. related to Hugo, HTML, CSS, deployment, etc. label Jun 2, 2026

@lenderom lenderom left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for the addition. I think this is a great addition for our users to see which news articles got an update. In the past this wasn't easiely accessible.

I've found some minor improvements:

When having a first glimpse on this PR, I saw badges at the article. However these are not visible anymore:

Image

Also I find the badges a bit distracting / too prominent. For example in the sidebar:

Image

@MoritzWeber0

Copy link
Copy Markdown
Member Author

When having a first glimpse on this PR, I saw badges at the article. However these are not visible anymore:

Good catch, this was a bug with the updated logic, the page store is only initialized on first render, which didn't happen on the main page. Fixed.

Also I find the badges a bit distracting / too prominent. For example in the sidebar:

I changed it to normal text in the sidebar, which is less disturbing. For the main page it probably still make sense to generate attention. In the end we want users to recognize that there has been an update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

technical Technical issues, e.g. related to Hugo, HTML, CSS, deployment, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants