hoarder-app/hoarder

Take full page screenshots

Closed this issue · 6 comments

Taking a screenshot of the page would be much better if it would take a full page screenshot.
If I am not mistaken it should only require a change in this line to add "fullpage: true"

Yeah I tried it out and it works fine, but I can't figure out how to make the screenshot show up correctly.
Tried all kinds of things with ScreenshotSection.tsx, but the screenshot stays like this:
image

If I remove the "height: 100%" style from the create image tag it looks fine, but I don't understand how that works with the "Image" tag from next:
image

I didn't look at the source, but it seems like some sort of height-limited div with "overflow:hidden" might to do the trick.

Yeah, dealing with the Image tag of next can be very annoying :) I'll check it over the weekend.

I think also I'll also make this behavior configurable. Screenshots can take a ton of disk space specially with that size and not everyone finds them useful.

I found the solution here and opened a PR.
You mentioned making that configurable. You mean with an environment variable or in the UI?

Nice! will check it out!

By configurable, I mean with an env variable. All config knobs are here: https://github.com/MohamedBassem/hoarder-app/blob/main/packages/shared/config.ts and you'll find this serverConfig option used a lot in the crawlerWorker.ts already. And if it's not too much, I'd be grateful if you add the new env variable to the docs here as well https://github.com/MohamedBassem/hoarder-app/blob/main/docs/docs/03-configuration.md :) I think we can name it CRAWLER_FULL_PAGE_SCREENSHOT.

@kamtschatka implemented in #148!