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

Pagination at /users is not working #161

Open
thelissimus-work opened this issue Feb 28, 2025 · 4 comments
Open

Pagination at /users is not working #161

thelissimus-work opened this issue Feb 28, 2025 · 4 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request ui/ux Usability or design problems

Comments

@thelissimus-work
Copy link
Contributor

thelissimus-work commented Feb 28, 2025

There are two problems:

  1. Pagination "Per page" is not working on initial load. Even on value 15 the page has more than 15 users.
  2. There is no next/prev buttons to navigate.
  3. Search was not working because it was not implemented.

Here is an image (had to zoom out to include all of it one screenshot):
Image

@thelissimus-work thelissimus-work added bug Something isn't working enhancement New feature or request ui/ux Usability or design problems labels Feb 28, 2025
@thelissimus-work thelissimus-work self-assigned this Feb 28, 2025
@diyor28
Copy link
Contributor

diyor28 commented Feb 28, 2025

Wasn't it your task to make it work?

@thelissimus-work
Copy link
Contributor Author

The task was to add infinite scroll without breaking the existing functionality. But the existing functionality is already broken. In the original issue there wasn't anything about fixing that issue.

@thelissimus-work
Copy link
Contributor Author

In users core domain the search by name is not even implemented. Last time I touched I had to add ASC/DESC filter for fields of the user, but even there wasn't anything about implementing search by name. So we only have this rn:

type Field = int
const (
FirstName Field = iota
LastName
MiddleName
Email
LastLogin
CreatedAt
)
type SortBy struct {
Fields []Field
Ascending bool
}
type FindParams struct {
Limit int
Offset int
SortBy SortBy
}

@diyor28
Copy link
Contributor

diyor28 commented Feb 28, 2025

I see, users wasn't touched for a while soo it's not surprising. Well then You'll have to implement it looks like

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request ui/ux Usability or design problems
Projects
None yet
Development

No branches or pull requests

2 participants