Skip to content

Conversation

@therobrob
Copy link
Member

@therobrob therobrob commented Dec 28, 2025

I’ve experimented with some performance optimizations. Feel free to have a critical view. :)

  • merged pagefind implementations, because we already overwrite an large part of it. Copilot helped me to reorder the file.
  • there was an issue regarding our fonts, which weren’t loaded with font-swap. So i’ve added it and Metric Overrides to avoid layout shifts
  • the hero-image wasn’t loaded with fetchpriority=high
  • there was an issue with chaining critital requests. I’ve added the defer property to the js.

@github-actions
Copy link

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

@therobrob therobrob added the technical Technical issues, e.g. related to Hugo, HTML, CSS, deployment, etc. label Dec 28, 2025
@netlify
Copy link

netlify bot commented Dec 28, 2025

Deploy Preview for fipguide ready!

Name Link
🔨 Latest commit 8441080
🔍 Latest deploy log https://app.netlify.com/projects/fipguide/deploys/6952b40f5b77c600085514c6
😎 Deploy Preview https://deploy-preview-551--fipguide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@therobrob
Copy link
Member Author

Unfortunately, there is an error: Uncaught ReferenceError: PagefindUI is not defined.

Copy link
Member

@MoritzWeber0 MoritzWeber0 left a comment

Choose a reason for hiding this comment

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

Thanks for the effort to merge the pagefind styles 🚀
It's great if we no longer have to load thepagefind-ui CSS file :)
Unfortunately, there are a few styling issues when I run it locally, not sure if it's just my local preview that has those issues. I added comments for each issue that I found, sorry for the amount 😅

<div class="o-startpage__image">
{{ $image := resources.Get "images/startpage.webp" }}
{{ partial "image" (dict "image" $image "eager" true) }}
{{ partial "image" (dict "image" $image "eager" true "fetchpriority" "high") }}
Copy link
Member

Choose a reason for hiding this comment

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

Why do we want to have a high fetch priority for the start page image? In my opinion it's only decorative and should be loaded after other external resources like fonts, scripts and the operator logos or flags. So I'd set it to low or auto instead of high.

Comment on lines +6 to +8
ascent-override: 93%;
descent-override: 24%;
line-gap-override: 0%;
Copy link
Member

Choose a reason for hiding this comment

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

These adjustments help match the fallback font, right? That makes sense.

I noticed the text on "National Rail" looks slightly different in terms of centering, but it's quite subtle and probably won't be noticeable to others.

Before (left) vs After (right)

Image Image

Comment on lines 50 to 52
// ---------------------------------------------
// SEARCH INPUT
// ---------------------------------------------
Copy link
Member

Choose a reason for hiding this comment

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

Good comments should not repeat the code. Since the class is named search-input, the comment doesn't provide any additional information. I assume it was added by Copilot (and Copilot loves adding comments), so I've removed it and the other comments.

Feel free to state your opinion if it doesn't match mine, then I can also add them back.

Here is a good read about best practices when writing comments: https://stackoverflow.blog/2021/12/23/best-practices-for-writing-code-comments/#h2-b7593c698a940

Copy link
Member

Choose a reason for hiding this comment

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

Image

Black text on dark background in dark mode (in prod it works)

Copy link
Member

Choose a reason for hiding this comment

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

Image

The first row (8 Ergebnisse für Eurostar) is not well aligned anymore. In prod it's left-aligned:

Image

Copy link
Member

Choose a reason for hiding this comment

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

The arrow right icon seems to be broken (Firefox only):

Image

Copy link
Member

Choose a reason for hiding this comment

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

On production, the title has a larger font size than the other text:

Image

We should add it back.

Image

Copy link
Member

Choose a reason for hiding this comment

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

Image

The margins around "Mehr Ergebnisse laden" are not equal, in production they are. Would

Image

Copy link
Member

Choose a reason for hiding this comment

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

The font of the search seems to be Arial, no longer Roboto in Chrome:

Image Image

Copy link
Member

Choose a reason for hiding this comment

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

In the deployment preview, the search doesn't load anymore:

https://deploy-preview-551--fipguide.netlify.app/de/

Image

MoritzWeber0
MoritzWeber0 previously approved these changes Jan 3, 2026
@MoritzWeber0 MoritzWeber0 dismissed their stale review January 3, 2026 22:07

Wanted to approve the other PR, I should get some sleep xD

@therobrob therobrob self-assigned this Jan 4, 2026
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