Skip to content

feat: render borderpoints dynamically - #1238

Open
lenderom wants to merge 2 commits into
mainfrom
feat/render-borderpoints-dynamically
Open

lenderom wants to merge 2 commits into
mainfrom
feat/render-borderpoints-dynamically

Conversation

@lenderom

@lenderom lenderom commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Generate the borderpoints dynamically and also update the neighbouring operators.

There are some missing borderpoints like for Eurostar. We can add them in a different PR, for the moment I would like to migrate the current content state. However on some borderpoints they were not consistently named. So I decided by myself to the best of my knowledge and belief for each borderpoint where this was the case.

@lenderom lenderom added the technical Technical issues, e.g. related to Hugo, HTML, CSS, deployment, etc. label Oct 4, 2026
@github-actions

github-actions Bot commented Oct 4, 2026

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

@lenderom
lenderom marked this pull request as draft October 4, 2026 12:51
@netlify

netlify Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for fipguide ready!

Name Link
🔨 Latest commit 79de9af
🔍 Latest deploy log https://app.netlify.com/projects/fipguide/deploys/6ac8b4f9fc5f6a0008f07e76
😎 Deploy Preview https://deploy-preview-1238--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.

@lenderom
lenderom marked this pull request as ready for review October 4, 2026 12:58
@MoritzWeber0

MoritzWeber0 commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

While looking at the border points, I came up with some questions regarding the handling of some special cases, for example the global fare operators. I added an issue for it. It probably needs a bit of discussion: #1245
Depending on the outcome, some parts of the implementation could be simplified.

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

Cool, thanks for the implementation! It's a good foundation for future features like the border point map. I have a few improvement ideas (because of the amount, I split it into another PR). If you are fine with the changes, you can just merge #1248 into this PR. Otherwise, feel free to open conversations in the other PR. It also includes a bug fix for the CMS which doesn't seem to work in this branch. The PR description explains the changes.

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.

For some operators, the list gets really long (for example DB). I'm not sure if there is much value in such a list, even if the calculation makes more sense now.

Image

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We really need to check here if this is even right. I think some Operators doesn't have any borderpoints to DB (like SP oder BLS)

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.

We have to apply the change to the new north macedonia page as well.

- Border points are expected to be between exactly two countries. There
was just one case where more than two countries were used: Eurostar on
the UK page. Since Eurostar didn't show the list of countries on the
Germany page either, I removed the option to include multiple countries.
Replaced with country France, all Eurostar services from UK pass France
anyway.
- Add a new shortName to operators and use it as label for border
points. For consistency, I changed LTG-Link to LTG, Hellenic Train to HT
and ZSSK / ZSR to ZSSK as short names.
- Render HTML directly instead of Markdown, move implementation to own
folder. More fail-safe than the generation of markdown tables.
- Move the border points selection via IDs to the corresponding
countries front matter files. Only the border point definitions stay in
the border points file.
- Properly register the border points file as singleton in the CMS. Add
relations from the border points definition on the country pages to the
values of the singelton, include a link where to edit it. Add a border
points editor component.
- Removed the sort attribute since we have full-control over the sorting
in the border points file. Performed a one-time sorting on the element
where `sort: true` was set.
- Since the variant attribute of the expander shortcode is no longer
needed (faq and border points have their own handling), I replaced
variant with icon to allow more flexibility.

This branch has not been deployed

No deployments
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