-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow users to set page size in W3APIProvider #308
Conversation
Allow users to set page size in W3APIProvider. It feels like it would be cleaner to make it possible to set page size in the `useUploadsList` hook, but a bit of work on that revealed some complexity that will take a bit more planning and design to get right - see e50e025 for the work I did toward this and a short description of the issues I ran into. For now I think this is good enough to ship, and I'd like to think more carefully about how we handle state in the UploadsList in future versions of these libs.
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 393ef77:
|
examples/react/w3console/src/app.tsx
Outdated
@@ -201,7 +201,7 @@ export function Logo (): JSX.Element { | |||
|
|||
export function App (): JSX.Element { | |||
return ( | |||
<W3APIProvider> | |||
<W3APIProvider uploadsListPageSize={10}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moar! i think we'll add fake multipage pagination to our list component like certain other consoles do.
<W3APIProvider uploadsListPageSize={10}> | |
<W3APIProvider uploadsListPageSize={60}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so like fetch 60 but show the first 20 as "page 1" and then show "page 2" and "page 3" as links and then "..." to imply more pages, and then fetch the next n when the user flips through the pages, kinda thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok cool - will bump to 20 for now, and create an issue to keep this rolling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya let's land this. please open an issue to capture the bigger change.
per PR request from @olizilla
🤖 I have created a release *beep* *boop* --- ## 1.0.0 (2023-03-23) ### ⚠ BREAKING CHANGES * use new account model ([#400](#400)) ### Features * add terms of service page ([#417](#417)) ([6deb24d](6deb24d)) * adds space-finder autocomplete combobox ([#268](#268)) ([3dcd647](3dcd647)) * allow users to set page size in W3APIProvider ([#308](#308)) ([814a293](814a293)) * club tropical w3 auth boxen ([#350](#350)) ([2266eb2](2266eb2)) * delegate access to spaces ([#293](#293)) ([441d757](441d757)) * import a space into w3console ([#309](#309)) ([a69a95b](a69a95b)) * Improve upload component flow ([#285](#285)) ([ba9a3bf](ba9a3bf)) * publish console to IPFS & Cloudflare from CI ([#287](#287)) ([e2a833e](e2a833e)) * Storybook story improvements ([#294](#294)) ([e0de2cc](e0de2cc)) * use new account model ([#400](#400)) ([66dd20b](66dd20b)) * w3console example app ([#255](#255)) ([df08029](df08029)) ### Bug Fixes * add _headers ([#418](#418)) ([4eb1da1](4eb1da1)) * fix w3console styling ([#320](#320)) ([74a298c](74a298c)) * remove authenticator class when registed ([#352](#352)) ([3668f3b](3668f3b)) * w3console polish ([#284](#284)) ([9a67365](9a67365)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## 1.0.0 (2023-11-28) ### Features * adds space-finder autocomplete combobox ([#268](#268)) ([3dcd647](3dcd647)) * allow users to set page size in W3APIProvider ([#308](#308)) ([814a293](814a293)) * club tropical w3 auth boxen ([#350](#350)) ([2266eb2](2266eb2)) * Customizable UI components ([#208](#208)) ([0a776fe](0a776fe)) * implement reverse paging ([#381](#381)) ([10f059a](10f059a)) * Improve upload component flow ([#285](#285)) ([ba9a3bf](ba9a3bf)) * simplify ([#591](#591)) ([d1dfdf0](d1dfdf0)) * Storybook story improvements ([#294](#294)) ([e0de2cc](e0de2cc)) ### Bug Fixes * fix w3console styling ([#320](#320)) ([74a298c](74a298c)) * remove authenticator class when registed ([#352](#352)) ([3668f3b](3668f3b)) * w3console polish ([#284](#284)) ([9a67365](9a67365)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Alan Shaw <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.2.0](react-v1.1.1...react-v1.2.0) (2023-11-30) ### Features * add a logout function ([#595](#595)) ([0995fd5](0995fd5)) * adds space-finder autocomplete combobox ([#268](#268)) ([3dcd647](3dcd647)) * allow users to set page size in W3APIProvider ([#308](#308)) ([814a293](814a293)) * club tropical w3 auth boxen ([#350](#350)) ([2266eb2](2266eb2)) * Customizable UI components ([#208](#208)) ([0a776fe](0a776fe)) * implement reverse paging ([#381](#381)) ([10f059a](10f059a)) * Improve upload component flow ([#285](#285)) ([ba9a3bf](ba9a3bf)) * simplify ([#591](#591)) ([d1dfdf0](d1dfdf0)) * Storybook story improvements ([#294](#294)) ([e0de2cc](e0de2cc)) ### Bug Fixes * fix w3console styling ([#320](#320)) ([74a298c](74a298c)) * homepage URL in package.json ([1229119](1229119)) * remove authenticator class when registed ([#352](#352)) ([3668f3b](3668f3b)) * w3console polish ([#284](#284)) ([9a67365](9a67365)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Allow users to set page size in W3APIProvider.
It feels like it would be cleaner to make it possible to set page size in the
useUploadsList
hook, but a bit of work on that revealed some complexity that will take a bit more planning and design to get right - see e50e025 for the work I did toward this and a short description of the issues I ran into.For now I think this is good enough to ship, and I'd like to think more carefully about how we handle state in the UploadsList in future versions of these libs.