Skip to content

feat: Properly show updates of news articles - #973

Merged
MoritzWeber0 merged 17 commits into
mainfrom
feat/news-updates
Jul 25, 2026
Merged

feat: Properly show updates of news articles#973
MoritzWeber0 merged 17 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 aa5c765
🔍 Latest deploy log https://app.netlify.com/projects/fipguide/deploys/6a6461e0f8b53c00082abdb1
😎 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.

@therobrob

therobrob commented Jul 12, 2026

Copy link
Copy Markdown
Member

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.

@MoritzWeber0, Lennart and I discussed another design idea for the news-update-tag; i pushed it to the PR (hope that’s okay) and i’m interested in your opinion! :) The tag still generates attention, but integrates better into the page.

text-box-trim is supported by mostly all browsers and will get support by firefox soon.

Bildschirmfoto 2026-07-12 um 21 12 13

@lenderom

Copy link
Copy Markdown
Member
  • Review von Moritz
  • Darkmode Variante
  • Sidemenu anpassen (einheitlicher Tag/nicht nur Text)

therobrob
therobrob previously approved these changes Jul 24, 2026

@therobrob therobrob 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.

@MoritzWeber0 i’ve added the points discussed. Do you wanna review the adjustments? :)

@MoritzWeber0

MoritzWeber0 commented Jul 25, 2026

Copy link
Copy Markdown
Member Author

@MoritzWeber0 i’ve added the points discussed. Do you wanna review the adjustments? :)

I noticed that the font-size and paddings for the other tags (train category expanders, booking expanders) were also changed, so I changed them back to the original value and only applied the changes to the news tags. Everything else looks good :)

@MoritzWeber0
MoritzWeber0 merged commit eb8af55 into main Jul 25, 2026
7 checks passed
@MoritzWeber0
MoritzWeber0 deleted the feat/news-updates branch July 25, 2026 07:16
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.

3 participants