-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): render service #4467
Merged
Conversation
This file contains 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.
This is a very simple interface meant to simplify the creation of payloads for builtin types.
You can also create a pipeline to avoid having to render, translate and template multiple payloads. You provide a language and a context and
.translate
and.template
get automatically calledIt does not support the old way of storing translations with $en and $fr. I'm not sure what the state of that is, but preferably we would get rid of that and only use nested translations.
I'm also not sure how well this works alongside bp.cms. I made this to programmatically create payloads, so if someone decides to use the cms and this interface interchangeably, it probably won't work very well.
This also does not support custom content type renderers. I put a middleware in the cms for now. Basically any payload that doesn't have the new
rendered
property set to true gets rendered by its channel renderer. It's an hackish solution that's temporarily in place until content type renderers are removed/changed. I plan on reimplementing content type renderers as extensions to channels, and having our own builtin content types be processed with their default payload in all of our channels (so no renderers for them).Typing indicators are also a problem. We'll need to adjust our channels so that all payloads can include typings indicators