Skip to content
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

Support for rendering rich media types #2

Open
SpencerPark opened this issue Jan 8, 2018 · 1 comment
Open

Support for rendering rich media types #2

SpencerPark opened this issue Jan 8, 2018 · 1 comment
Labels

Comments

@SpencerPark
Copy link
Owner

To support rendering classes that you don't own in addition to a more OO approach there should be 2 ways to write render functions: via implementing an interface or registering a function (likely a lambda).

A render function takes an object of the type it can render and returns DisplayData.

A renderable object must serialize itself as DisplayData similar to toString() but richer instead.

Any objects that are not renderable are rendered as their string form.

SpencerPark added a commit that referenced this issue May 6, 2018
- Parse MIME types
- Register render functions for MIME types
- Displayable interface for owned classes
- Render with parameters and request rendering as certain types
@SpencerPark
Copy link
Owner Author

Published in 2.1.1-SNAPSHOT

SpencerPark added a commit that referenced this issue Jun 10, 2018
- Always ask for a text representation to support overriding one during
rendering.
- Supply meaningful defaults for DisplayDataRenderable implementations
for supported and preferred types.
- Allow renderable types to declare they support any or an entire group
of mime types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant