docs: add prompts partials documentation and examples#1318
Open
kushalshit27 wants to merge 1 commit intomasterfrom
Open
docs: add prompts partials documentation and examples#1318kushalshit27 wants to merge 1 commit intomasterfrom
kushalshit27 wants to merge 1 commit intomasterfrom
Conversation
- examples/yaml/tenant.yaml: Introduce partials for login and signup with custom HTML content. - examples/directory/prompts/partials.json: Create manifest for partials mapping. - examples/directory/prompts/partials/login/login/form-content-start.liquid: Add custom HTML for login form start. - examples/directory/prompts/partials/signup/signup/form-content-start.liquid: Add custom HTML for signup form start. - examples/directory/prompts/partials/signup/signup/form-content-end.liquid: Add custom HTML for signup form end.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1318 +/- ##
=======================================
Coverage 80.15% 80.15%
=======================================
Files 152 152
Lines 6096 6096
Branches 1245 1245
=======================================
Hits 4886 4886
Misses 693 693
Partials 517 517 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
🔧 Changes
Documents the
partialsfeature under thepromptsresource, which allows injecting custom HTML (via Liquid templates) into specific insertion points of a prompt screen.Examples
YAML format
Inline Liquid content in
tenant.yaml:Directory format
Folder structure:
partials.jsonmanifest (paths relative toprompts/):{ "login": [ { "login": [ { "name": "form-content-start", "template": "partials/login/login/form-content-start.liquid" } ] } ], "signup": [ { "signup": [ { "name": "form-content-start", "template": "partials/signup/signup/form-content-start.liquid" }, { "name": "form-content-end", "template": "partials/signup/signup/form-content-end.liquid" } ] } ] }🔬 Testing
📝 Checklist