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

Community Feedback Request: Rich content response objects #21

Open
patrickjquinn opened this issue Feb 4, 2017 · 5 comments
Open

Community Feedback Request: Rich content response objects #21

patrickjquinn opened this issue Feb 4, 2017 · 5 comments

Comments

@patrickjquinn
Copy link
Owner

Hi Guys,

So i've been giving some thought to the best way to return 'rich content' such as weather cards, news etc and have come up with a partial solution that I would like your feedback on.

Basically, we generate a html card with the weather forecast say on the server (for example in the weather skill), then render that to a canvas and finally a png file and rend that along with the response. That way we can have rich responses that can rendered on any client, be that web or native, by simply rendering the image.

Does anyone have any feedback on this?

@timstableford
Copy link
Collaborator

I'd actually be tempted to send HTML snippets to the client, it's much more lightweight and most things support HTML rendering.

@patrickjquinn
Copy link
Owner Author

Thinking in terms of iOS or Android clients, or say an embedded device with a small screen, the latency pulling in all of the css and js dependencies to render might hold up the show significantly, however its worth testing rendering it in a webview and seeing how long it takes.

@timstableford
Copy link
Collaborator

I was thinking simpler than I think you're planning. HTML more along the lines of <img src="rain.jpg"/>It's raining today..

@patrickjquinn
Copy link
Owner Author

Say you wanted to display something like the attached though, i'll be adding Giphy and flickr skills for "Show me cat gifs" or "show me cat picture" style commands so they'll be rendering an img passed down in the payload (the response)

img_56b0f50c2f56b

@timstableford
Copy link
Collaborator

@patrickjquinn I'm leaning more towards using images now. I think that might be the best approach.

When responding currently there's:

{
    text:"response text",
    url:"http://example.com",
    silent: true
}

With URL and silent being optional. Maybe we should add an optional image tag to responses?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants