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

Google APIs screenshot #80

Closed
hazemhagrass opened this issue Aug 28, 2017 · 15 comments
Closed

Google APIs screenshot #80

hazemhagrass opened this issue Aug 28, 2017 · 15 comments

Comments

@hazemhagrass
Copy link

Hi,
Google APIs is supporting retrieving a screenshot from the result.
Is this supported on your plugin?
screen shot 2017-08-28 at 2 36 47 pm

@DanielRuf
Copy link
Contributor

Obviously so far not, so this would need to be implemented.

@DanielRuf
Copy link
Contributor

@exterkamp
Copy link
Collaborator

In v5+ the API returns final_screenshot and filmstrips as data uris. Not sure how we'd expose them on cli, maybe saving them as images and then linking to them with a flag.

If that's interesting post it here as a possible enhancement.

@JuanMaRuiz
Copy link
Contributor

Hi @exterkamp maybe it's not necessary to expose on cli but we could save them, as you say.

I think filmstrips could be useful for users than want to make performance regression tests. What do you think?

Best regards.

@paulirish
Copy link

if anyone is making regression tests then they should just work with the JSON data directly. i dont think this utility saving the datauris to disk would be too helpful.

@JuanMaRuiz
Copy link
Contributor

if anyone is making regression tests then they should just work with the JSON data directly. i dont think this utility saving the datauris to disk would be too helpful.

You are right, this utility should only provide the data. Users should be on charge of saving (or not) the data if they need to.

@DanielRuf
Copy link
Contributor

Exactly. So is there still something needed / missing that users can get / consume this data?

@JuanMaRuiz
Copy link
Contributor

JuanMaRuiz commented Oct 27, 2019

Exactly. So is there still something needed / missing that users can get / consume this data?

As @exterkamp said filmstrips are returned by v5 but psi tool is not exposing that data but user could get it using the psi output:

const psi = require('psi');

(async () => {
  // Get the PageSpeed Insights report
  const {data} = await psi('https://theverge.com');
  console.log(data.lighthouseResult.audits['screenshot-thumbnails'].details.items);
})();

@exterkamp
Copy link
Collaborator

+1 to @paulirish & @JuanMaRuiz, this data is accessible to the user already.

I think this could be part of a cookbook on how to do common things, like getting screenshots out of a result e.g. the code that @JuanMaRuiz made. Maybe a doc opportunity?

@JuanMaRuiz
Copy link
Contributor

@exterkamp I think it would be a good idea to document it. Where should be the cookbook/doc placed? Maybe as a wiki page within this repo? Maybe gulp/grunt/ ... examples could be added there as well. What do you think? Make it sense for you?

@exterkamp
Copy link
Collaborator

Didn't see that there was a question directed at me here, whoops!

Could add it to the main readme in a cookbook section? Maybe put it in a <details> element similar to these? Maybe "Getting PSI into your build process" also belongs in a details element in a "Common Use cases" section.

@JuanMaRuiz
Copy link
Contributor

Didn't see that there was a question directed at me here, whoops!

Could add it to the main readme in a cookbook section? Maybe put it in a <details> element similar to these? Maybe "Getting PSI into your build process" also belongs in a details element in a "Common Use cases" section.

SGTM the idea of a Recipes section. I can try and make a PR with the proposal. Does that sound good to you @exterkamp ?

Best regards.

@exterkamp
Copy link
Collaborator

Sounds like a plan!

@JuanMaRuiz
Copy link
Contributor

Hi @exterkamp PR was merged. I think this issue cloud be closed, isn't it?

@exterkamp
Copy link
Collaborator

Yup!

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

5 participants