Skip to content

feat: Use SveltiaCMS instead of DecapCMS - #1171

Draft
MoritzWeber0 wants to merge 15 commits into
feat/validity-decapfrom
feat/use-sveltia-cms
Draft

feat: Use SveltiaCMS instead of DecapCMS#1171
MoritzWeber0 wants to merge 15 commits into
feat/validity-decapfrom
feat/use-sveltia-cms

Conversation

@MoritzWeber0

@MoritzWeber0 MoritzWeber0 commented Aug 19, 2026

Copy link
Copy Markdown
Member

Open issues:

  • Footnotes with links are not rendered properly. Have to add another editor component for footnotes or raise an issue with lexical.
  • The FIP validity tables do not work because of missing Feature request: Expose field/widget lookup API for custom dynamic field widgets sveltia/sveltia-cms#915. As a workaround, I use relations now, but these do require a page reload after each validity group change, filters do not work.
  • Check if page redirect from CMS edit widget can be simplified.
  • The booking selection dropdown doesn't work currently
  • Check preview on fip validity group embeddings
  • Check if preSave is still necessary
  • Review the fields.js implementation
  • Wait for open authoring support
  • Update docs

@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

@netlify

netlify Bot commented Aug 19, 2026

Copy link
Copy Markdown

Deploy Preview for fipguide ready!

Name Link
🔨 Latest commit 07f8cb4
🔍 Latest deploy log https://app.netlify.com/projects/fipguide/deploys/6a88b909078bba000805ade3
😎 Deploy Preview https://deploy-preview-1171--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.

@MoritzWeber0
MoritzWeber0 changed the base branch from main to feat/validity-decap August 19, 2026 07:18
Sveltia CMS now supports CMS.registerFieldType/getFieldType, so the
fip-validity-select widget can reuse the built-in select control with
dynamically computed options again, matching the pre-migration Decap
implementation. Also restores the folder-based fip-validity collection
with YAML anchors for the target group fields, letting Sveltia
auto-discover validity.yaml files natively instead of relying on Hugo
templating for both.
CMS.getFieldType("number") is now available in Sveltia, so the custom
footnote number field can render the native number input/stepper UI
instead of a plain HTML input, consistent with the fip-validity-select
widget.
fromBlock appended /index to the id/sources values before feeding them
to the relation fields, but value_field: "{{slug}}" resolves to the
plain entry slug without the path suffix. This mismatch meant no
option matched on load, leaving the dropdown empty even though a
booking platform or operator was already referenced in the shortcode.
Manual selection appeared to work because the param.transform stripped
/index again on write, masking the read-side bug.
The booking platform link can't reactively track the relation field's
live value (editor component sub-fields aren't part of the entry data
Sveltia exposes, and relation can't be reused via getFieldType), so it
now points to the Booking Platforms collection list instead of trying
to derive a stale per-entry link.

Also sets create: false on the operator collection, since Sveltia
defaults entry collections to create: true unlike Decap CMS.
The FIP Validity Table edit link needs /validity appended, since the
collection uses path: "{{slug}}/validity" and the entry route slug
includes that segment.

Also set static summary text on the Operators, per-operator and
FIP Coupon/Reduced Ticket object fields, since without an explicit
summary Sveltia falls back to displaying an arbitrary nested field's
value (e.g. the first validity group's selected name) when collapsed,
which doesn't convey anything useful.
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.

1 participant