nestdotland/nest.land

Proposal: Show overall number of modules like Deno is doing - see screenshot

michael-spengler opened this issue ยท 11 comments

Screen Shot 2020-09-12 at 11 30 59 PM

in gallery.

Just exploring how this goes together with the lazy loading 24 ... + more on demand ...

If somebody reading this knows if the API provides something like https://x.nest.land/api/modulecount/ please let me know.

cool thanks - will probably draft this tomorrow.

t8 commented

Would love to see this added! Really smart thinking, @TTtie.

t8 commented

Perhaps we could even consider showing it beside the "shown modules" count instead...
image

Perhaps we could even consider showing it beside the "shown modules" count instead...
image

I'd rather get rid of this one (x Modules Shown) - it is over the Deno's foot traces - and the info (that there are many modules...) is pretty well in the search field (Search through x modules).

It is provided as a HTTP response header:
https://github.com/nestdotland/x/blob/c94add3607c9fb7b45ac916d5f0776eb0fc0aeb1/src/routes/package.ts#L44

It's really cool to have X-Total however it seems that the following is necessary to enable this:
Access-Control-Expose-Headers: X-Total

Background:
https://stackoverflow.com/questions/37897523/axios-get-access-to-response-header-fields

If that's right: Could anyone tell me where I can do that because so far response.headers only contains / reveals content-type when called via browser / page ?

Perhaps we could even consider showing it beside the "shown modules" count instead...
image

Maybe something like "Showing 24 of 100 modules"?

I like @thewizardbear's idea of showing

Showing $visible of $total modules

I'd even suggest we should do what deno has with the search box

t8 commented

I really like @thewizardbear's idea too. I'd be happy with either representation of this data.

ok - does anyone have updates on this one
#267 (comment) ?

As this is imo necessary to get the X-Total