-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[usage] Improve pagination behavior #11800
Conversation
started the job as gitpod-build-lau-pagination-layout-fixes-11530.2 because the annotations in the pull request description changed |
4e38cae
to
8f5e018
Compare
8073e74
to
4204132
Compare
Due to a test commit: /hold |
Are you still able to access the preview for this? It doesn't work for me:
|
Let me re-run it - that usually fixes it. /werft run 👍 started the job as gitpod-build-lau-pagination-layout-fixes-11530.11 |
4204132
to
140848c
Compare
@@ -32,7 +32,7 @@ function TeamUsage() { | |||
const team = getCurrentTeam(location, teams); | |||
const [billedUsage, setBilledUsage] = useState<BillableSession[]>([]); | |||
const [currentPage, setCurrentPage] = useState(1); | |||
const [resultsPerPage] = useState(10); | |||
const [resultsPerPage] = useState(1); |
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.
I removed the dummy file and instead set this to 1 per page. Will change to 15
before merging.
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.
Already put back and will unhold.
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.
Looks good, just wonder about the need for the custom hook.
cdfe3b1
to
c3c1e96
Compare
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.
Nice. I like this more with the unit test and without the hook 👍
/hold for the typing issue and this comment: https://github.com/gitpod-io/gitpod/pull/11800/files#r936443747
eb47fde
to
7567bdb
Compare
7567bdb
to
a6fbc1e
Compare
Thank you @andrew-farries for reviewing and making sure I don't over-engineer 🧡 |
Description
Improves the pagination behavior.
Note: This has a /hold label because it has a test commit that needs to be removed later.
Related Issue(s)
Fixes #11530
How to test
This PR includes a file
dummy.ts
so that the pagination behavior when there are too many pages can be tested.The number of results per page is also made smaller.
Release Notes
Documentation
Werft options: