Repository navigation
feat(hosted): card layout options in the card URL (#94) - #414
Merged
Merged
Conversation
The hosted card reads padding, radius, titleSize, subtitleSize, progressHeight, textAlign, fieldOrder, progressPosition, progressWidth and direction from the URL query. Each is allowlisted and range-checked; bad or repeated values return 400 invalid_layout. The ingest payload and schema are unchanged, and the ETag is still over the rendered SVG.
Contributor
|
/mira pause |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Sep 24, 2026
Merged
This was referenced Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #94 (the hosted card only read theme, width and show).
/card/<cardId>.svgand/api/cardaccept optional layout options in the URL query only:padding(12-48),radius(0-24),titleSize(14-30),subtitleSize(10-20),progressHeight(2-12), the same ranges assettings.jscard.layout, plustextAlign,fieldOrder,progressPosition,progressWidthanddirectionwith the values the renderer accepts.invalid_layout, liketheme/width/show. Other query params (such asidon/api/card) are handled as before.INGEST_KEYSinhosted/lib/service.js. The PC still sends only playback fields.hosted/README.mdendpoints table has a row for the new params.node --test test/hosted-*.test.js: 54 pass. Full suite: 742 pass.The hosted lane knows this is coming and will check it against the live service after merge.