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

Add pagination to organization teams table #342

Merged
merged 18 commits into from
Dec 15, 2022
Merged

Conversation

vgeorge
Copy link
Member

@vgeorge vgeorge commented Dec 12, 2022

This contributes to #319 by adding pagination to the list of teams on the organization page. It should serve as the pattern for all tables in the UI. Changes added:

  • Added pagination component to org teams list
  • Added useFetchList for fetching table data
  • Moved "create org team" and "get org teams" routes to Next.js /api folder
  • Started refactoring validation and permissions middleware to Next.js using next-connect

To do:

  • Make API return the total count of existing teams for an org
  • Add documentation to refactored routes
  • Add styles
  • Add Cypress test coverage for pagination

cc @LanesGood @batpad

@vercel
Copy link

vercel bot commented Dec 12, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
osm-teams ✅ Ready (Inspect) Visit Preview Dec 14, 2022 at 1:19PM (UTC)

@LanesGood
Copy link
Member

@vgeorge Styles added
image

@vgeorge
Copy link
Member Author

vgeorge commented Dec 14, 2022

@LanesGood this looks great, thanks for the change. I've hidden the 'id' column in the Teams table. I don't think it is very useful as OSM user ids. I also made the pagination component disappear if there are no records in the database. Let me know if you prefer a different approach.

My recent changes are:

  • Added test coverage for the pagination component
  • Added swagger docs for the org team routes (I have a plan to reinstate all docs, which will be ticketed)
  • Added LOG_LEVEL environment variable to avoid logging expected errors during testing
  • Refactored the base handler

@kamicut this is ready for review. You can see pagination working by running yarn e2e:dev and visiting the organization spec.

@vgeorge vgeorge mentioned this pull request Dec 14, 2022
Copy link
Member

@batpad batpad left a comment

Choose a reason for hiding this comment

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

@vgeorge this looks really good to me!

@vgeorge vgeorge merged commit 2f72db7 into develop Dec 15, 2022
@vgeorge vgeorge deleted the add/team-list-pagination branch December 15, 2022 13:43
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.

3 participants