News for hackers. Stuff that matters.

stereobooster

Re:ShowHN: Facets – client-side faceted search on Monday November 20, 2023 @09:25AM (#38348689)
Think of it like Algolia, Typesense, Meilisearch, but done without server - directly in the browser.

Online demo: https://facets-demo.stereobooster.com/

Re:Fullscreen mobile modal: how hard can it be? on Monday September 10, 2018 @05:13AM (#17950442)
Thanks for this response, this is very helpful. I will update post with this concern
Re:Show HN: An Almost Ideal React Image Component on Sunday June 03, 2018 @04:25AM (#17218532)
Module size is ~7Kb. A detailed comparison is here https://github.com/stereobooster/react-ideal-image/blob/mast...

> The discussion on performance is too focused on mobile

Because mobile users have a slower internet connection and worse CPUs.

What kind of performance are you talking about? If load performance, then this component uses well-established techniques (not invented by me), like lazy-loading (known since jQuery times), srcset (web standard), LQIP (used by Facebook, Medium), width, height (required for all blocks in AMP).

If you are talking about JS performance like frame rate or paint or "junk" on the scroll - I didn't measure it but didn't say it was the first target either.

Re:Show HN: An Almost Ideal React Image Component on Saturday June 02, 2018 @02:57AM (#17213167)
But not this component. This component will load images without JS. Test it yourself https://stereobooster.github.io/react-ideal-image-experiment...
Re:Show HN: An Almost Ideal React Image Component on Saturday June 02, 2018 @02:20AM (#17213054)
What you are talking about is more like graceful degradation. If server side rendering is used you will be able to see content ASAP, but not able to scroll, because interaction is blocked by JS. But if you will visit page with JS disabled you will get what you want, because component generates img in noscript tag and you will be able press space to scan the page
Re:Show HN: An Almost Ideal React Image Component on Saturday June 02, 2018 @01:46AM (#17212941)
Oh yes. More than one
Re:Show HN: An Almost Ideal React Image Component on Saturday June 02, 2018 @01:41AM (#17212931)
This component supports solid color as placeholder. The same way as Google Images or Pinterest do
Re:Show HN: An Almost Ideal React Image Component on Saturday June 02, 2018 @01:32AM (#17212904)
I'll definitely take your use case into the consideration in the future
Re:Show HN: An Almost Ideal React Image Component on Saturday June 02, 2018 @12:45AM (#17212771)
Ok I see your use case: you load page on good connection, then connection get worse and images are not loaded when you scroll to it.

This component allows to retry image load (click on it).

It can be even more smart, like if network is good go ahead and download everything. Need to think about it

Re:Show HN: An Almost Ideal React Image Component on Saturday June 02, 2018 @12:31AM (#17212716)
It supports retina/3x. Provide big enough image and it will use it. It takes into account `devicePixelRatio`

> maybe default max width of 100% on mobile?

It is.

> optional ability to overlay an empty full size block so the image cant easily be right clicked and saved

Not sure what you mean, but as soon as image loaded it turns into good old image, so you can do right click

Re:Show HN: An Almost Ideal React Image Component on Saturday June 02, 2018 @12:27AM (#17212703)
It supports SVG placeholders. SVGs need to be converted to data URIs, like `data:image/svg+xml,%3csvg xmlns='...`, and it works the same as LQIP. You can use https://github.com/stereobooster/sqip.macro to generate those
Re:Show HN: An Almost Ideal React Image Component on Friday June 01, 2018 @11:57PM (#17212578)
Can you explain why?

Older »