Closed michael-spengler closed 3 years ago
It is provided as a HTTP response header:
https://github.com/nestdotland/x/blob/c94add3607c9fb7b45ac916d5f0776eb0fc0aeb1/src/routes/package.ts#L44
cool thanks - will probably draft this tomorrow.
Would love to see this added! Really smart thinking, @TTtie.
Perhaps we could even consider showing it beside the "shown modules" count instead...
Perhaps we could even consider showing it beside the "shown modules" count instead...
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...
Maybe something like "Showing 24 of 100 modules"?
CC @maximousblk & @justablob
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
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 https://github.com/nestdotland/nest.land/issues/267#issuecomment-691703533 ?
As this is imo necessary to get the X-Total
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.