Skip to content
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

Create paginator component #3195

Merged
merged 25 commits into from
May 3, 2023
Merged

Create paginator component #3195

merged 25 commits into from
May 3, 2023

Conversation

CarolineDenis
Copy link
Contributor

Fixes #1398

@CarolineDenis CarolineDenis marked this pull request as draft March 16, 2023 18:19
@CarolineDenis
Copy link
Contributor Author

Tests are failing because Paginator component is called by RecordSetsDialog. The props in RecordSetsDialog have been modified, need to add those new props in other places where the component is called. (Not just in RecordSetsOverlay)

Shift burden of responsibility to the hook, from the component. Since
the hook is going to be called in many places, that will result in
reduction of code.
Because default value for sort config was a new object that was
created on each render
@CarolineDenis I had to remove the min-w from <select> as it was causing
issues in many places. Instead, you should add it back only for small
screens, and only in places where it was necessary
Copy link
Member

@maxpatiiuk maxpatiiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CarolineDenis please review the changes I did.
Changed this branch to be based on xml-editor since record sets code was simplified there.

  1. 928be8b - Moved most of the code and states into usePaginator() so that the places using it have very little stuff left to do
  2. 08bb7ba - Fixed the bug with record sets not being sorted properly
  3. 1ec1f25 - Fixed page size selector being too wide
  4. bf23b48 - Made usePaginator() remember the page size user selected last time

@maxpatiiuk maxpatiiuk changed the base branch from production to xml-editor March 17, 2023 15:09
@maxpatiiuk
Copy link
Member

Note tests are failing because I need to fix them on xml-editor branch. If the behavior in the UI is correct, this should be merged despite failing tests (or wait for me to fix them on xml-editor)

@maxpatiiuk maxpatiiuk requested a review from a team March 17, 2023 15:10
@maxpatiiuk maxpatiiuk marked this pull request as ready for review March 17, 2023 15:10
@maxpatiiuk
Copy link
Member

@CarolineDenis either here, or after this is merged on a new branch, can you add a paginator to the queries dialog?

Then look though specify to identify other places that could use a paginator

@maxpatiiuk
Copy link
Member

@specify/ux-testing the loading dialog that appears whenever you change page or page size is too obtrusive. We have a bug to incrementally fix that across specify - #2998

Copy link
Contributor

@chanulee1 chanulee1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maxpatiiuk and others added 5 commits April 19, 2023 09:30
It should have been removed, but probably was resurected by a git merge
There was conflict between "fields", the relationship in the SpQuery
table, and "fields" the property of the /api/specify_rows/ endpoint
Triggered by 0360179 on branch refs/heads/issue-1398
@CarolineDenis CarolineDenis marked this pull request as draft April 20, 2023 15:56
@CarolineDenis CarolineDenis marked this pull request as ready for review April 20, 2023 19:54
@CarolineDenis CarolineDenis requested a review from chanulee1 April 20, 2023 19:54
Copy link
Member

@maxpatiiuk maxpatiiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nothing major. looking good

Copy link
Contributor

@chanulee1 chanulee1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Paginator also not locked in place in Create Loan dialog.

dJl2cS7e5F.mp4

https://sdnhmpaleo33123-issue-1398.test.specifysystems.org/specify/overlay/interactions/create/Loan/

@chanulee1
Copy link
Contributor

Other than that, looks good. Tested record set list, query list, and record set list in create loan dialog. Is there any other place I missed?

@CarolineDenis
Copy link
Contributor Author

Paginator also not locked in place in Create Loan dialog.

dJl2cS7e5F.mp4

https://sdnhmpaleo33123-issue-1398.test.specifysystems.org/specify/overlay/interactions/create/Loan/

but was elsewhere?

@chanulee1
Copy link
Contributor

Paginator also not locked in place in Create Loan dialog.
dJl2cS7e5F.mp4
https://sdnhmpaleo33123-issue-1398.test.specifysystems.org/specify/overlay/interactions/create/Loan/

but was elsewhere?

Yes, it was locked in place on the query list and record set list dialogs but not the Create Loan dialog.

L3sUt2oD1b.mp4

So that long numbers are not hidden behind numeric field arrows when
typing them
Make them stick to the bottom of the dialog
Triggered by b397f5a on branch refs/heads/issue-1398
@CarolineDenis CarolineDenis requested a review from chanulee1 May 2, 2023 19:00
Copy link
Contributor

@chanulee1 chanulee1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@CarolineDenis CarolineDenis merged commit fb69938 into xml-editor May 3, 2023
@CarolineDenis CarolineDenis deleted the issue-1398 branch May 3, 2023 18:31
@CarolineDenis CarolineDenis linked an issue Aug 30, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a react virtual scrolling library Add pagination where applicable
3 participants