tobie / pr-preview

Adds preview and diff to spec pull requests.
Apache License 2.0
33 stars 16 forks source link

Copy images into the preview #6

Open jyasskin opened 7 years ago

jyasskin commented 7 years ago

The preview for @equalsJeffH's https://github.com/w3c/webauthn/pull/463 failed to copy https://s3.amazonaws.com/pr-preview/w3c/webauthn/images/fido-attestation-structures.svg into place, leading to a broken link in https://s3.amazonaws.com/pr-preview/w3c/webauthn/jeffh-redraw-fig3.html#sctn-attestation.

Bikeshed's Echidna support defaults to including the images, diagrams, and examples directories, and perhaps pr-preview should do the same. Ideally there'd also be a way in .pr-preview.json to add files.

tobie commented 7 years ago

This sounds like a nice improvement to pr-preview. I don't really have the cycles to tackle that though, so I welcome a pull request for it if anyone cares enough about it to make it work.

marcoscaceres commented 6 years ago

I just found myself wanting this too... could you provide some brief details of what would need to be done to implement this? Should image resources be the added to the .pr-preview config? or would there be better way of doing it?

tobie commented 6 years ago

iirc, Bikeshed has some mechanism for this. That’s where I’d start looking. Other options include using jsdom to find all IMG elements. I’m planning to use jdsom to fix the weird line breaks that are generated by the differ, so maybe that’s something we could just add on top of it?

xfq commented 3 years ago

As I mentioned in https://github.com/w3c/speced-cg/issues/1 , another problem is that if the PR submitter only modifies files like images, there will be no preview.

tobie commented 3 years ago

As I mentioned in w3c/speced-cg#1 , another problem is that if the PR submitter only modifies files like images, there will be no preview.

We already have infrastructure to enable this for Bikeshed includes which could be repurposed.