-
Notifications
You must be signed in to change notification settings - Fork 5
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
Ws 119/admin listing page #6179
Merged
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
f1a1e6d
Create mocked search API endpoint
robmarch2 8676776
Add react router dependency
robmarch2 ad11160
Create middleware API caller with typed response
robmarch2 a6e2dd1
Create utils for building search URLs
robmarch2 7bdbd19
Create search components
robmarch2 9506630
Add search component to homepage
robmarch2 dcdbe74
Add stylesheets
robmarch2 bafdfaf
Expand pagination component
robmarch2 8f79bfc
Remove magic numbers from pagination
robmarch2 f0a096c
Remove intermediate state on search forms
robmarch2 2b3c3a2
Hide placeholder text on status dropdown
robmarch2 a0df4a4
Fix linting issue
robmarch2 35679e7
Remove unnecessary dependency
robmarch2 e7a82cd
Provide default value for page in mock API
robmarch2 b730b8b
Use query string to build search URLs
robmarch2 d7e892c
Make page number cast in mock API more explicit
robmarch2 48069ee
Merge branches 'master' and 'WS-119/admin-listing-page' of https://gi…
robmarch2 2d80d91
Remove app CSS
robmarch2 ab83f28
Use standardised pretty date module
robmarch2 36d0853
Remove unnecessary dependency
robmarch2 1a59d01
Use correct query string library to build URLs
robmarch2 aac2a27
Simplify last login date field
robmarch2 f6bfa4c
Remove redundant sort field check
robmarch2 115a802
Add pagination tests
robmarch2 a876b05
Add sorter tests
robmarch2 1683380
Add status dropdown tests
robmarch2 1eb0f09
UI and UX changes to make the user listing page
robmarch2 1e26551
Improve styling of status dropdown
robmarch2 26ceba6
Merge branch 'master' of https://github.com/wellcomecollection/wellco…
robmarch2 d2cc332
Ensure correct query param is used to build search URL
robmarch2 c5079d8
Style user list item to appear clickable
robmarch2 7053bbc
Integrate user listing page with real API
robmarch2 366645b
Remove unusable sort field
robmarch2 e0dcbc1
Improve pagingation tests
robmarch2 1a8859a
Improve sorter tests
robmarch2 c3167b8
Improve status dropdown tests
robmarch2 f34c2a0
Remove unnecessary logging from test
robmarch2 2506f92
Wrap user list entry in link
robmarch2 f208633
Update yarn.lock
robmarch2 c635a6f
Merge branches 'master' and 'WS-119/admin-listing-page' of https://gi…
robmarch2 bb5d259
Update yarn.lock
robmarch2 d5b81fc
Improve selctors for tests
robmarch2 f123a89
Improved semantics for table header
robmarch2 7c9156d
Increase contrast of disabled pagination links
robmarch2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is really cool, but I'd just use the
query-string
package to do this job: https://www.npmjs.com/package/query-stringThere 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've pushed up a version using
query-string
but I don't think it's really giving us all that much. The typescript module is missing the property we really need to be able to get it to minimise the logic here (i.e. https://www.npmjs.com/package/query-string#skipnull ). If you've got any suggestions on how we could improve on it, I'm all ears!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.
The pushed code imports from the wrong library:
Such an easy mistake to make!
Once we're importing from that library, we don't need its
skipNull
option. From that link:So we can actually make
buildSearchParams
a one-liner:...or even remove it altogether.