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

Define a render/HTML module and protocol #6

Open
wulymammoth opened this issue Feb 14, 2018 · 2 comments
Open

Define a render/HTML module and protocol #6

wulymammoth opened this issue Feb 14, 2018 · 2 comments
Labels
enhancement New feature or request

Comments

@wulymammoth
Copy link
Contributor

If we follow what the other Prismic SDK's provide out of the box, we should provide a way to render mark-up.

We can absolve each fragment of rendering responsibilities by creating a module whose responsibility is to take a fragment struct and rendering safe HTML string with it.

Alternatively, we could also just implement the Phoenix.HTML protocol for each fragment :)

@wulymammoth wulymammoth added the enhancement New feature or request label Feb 14, 2018
@newtrat
Copy link
Contributor

newtrat commented Oct 30, 2018

I'm gonna close this issue because I think we've usually found that it's easier to specify the HTML structure in the caller. Prismic doesn't really dictate a presentation for the data you put in it, so I'm not sure it makes sense to impose one in our library, even if it's purely optional.

@newtrat newtrat closed this as completed Oct 30, 2018
@newtrat
Copy link
Contributor

newtrat commented Oct 30, 2018

Sorry, I just realized we have dummy as_html implementations all over the codebase. Should probably get rid of those if we're serious about never rendering HTML. So I'll keep this issue open for now.

@newtrat newtrat reopened this Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants