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

✨ #24 - feat: add paginator component #16

Merged
merged 5 commits into from
Jan 26, 2024
Merged

Conversation

svenvandescheur
Copy link
Collaborator

No description provided.

Copy link
Contributor

@Xaohs Xaohs left a comment

Choose a reason for hiding this comment

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

There are a few points that we should double check:

  • Adding an aria-label in the <nav/> tag to describe it's purpose. Should we not use our <Toolbar/> component here instead by the way?
  • We should add a debounce on the changing of the page in the Input field, consider a user typing in page "24" would first see page 2, before seeing page 24.
  • Should we consider removing the html increment numbers on the side of the Input field? I think they might be unecessary since we already provide our own increment buttons on the right side of the component.
  • On mobile the component overflows and doesn't look as good anymore.

@svenvandescheur
Copy link
Collaborator Author

  • We should add a debounce on the changing of the page in the Input field, consider a user typing in page "24" would first see page 2, before seeing page 24.

That should already be debounced right? Or perhaps I missed something?

@svenvandescheur
Copy link
Collaborator Author

Should we consider removing the html increment numbers on the side of the Input field? I think they might be unecessary since we already provide our own increment buttons on the right side of the component.

I'm not sure, I think the main goal of this library is to provide an easy UI building experience to developer for admin interfaces. I think some users might consider the number input's button useful in an admin environment?

Maybe we should discuss this further down the road but I'm a bit reluctant to remove it now.

@Xaohs
Copy link
Contributor

Xaohs commented Jan 26, 2024

  • We should add a debounce on the changing of the page in the Input field, consider a user typing in page "24" would first see page 2, before seeing page 24.

That should already be debounced right? Or perhaps I missed something?

You're right, I have missed this!

Should we consider removing the html increment numbers on the side of the Input field? I think they might be unecessary since we already provide our own increment buttons on the right side of the component.

I'm not sure, I think the main goal of this library is to provide an easy UI building experience to developer for admin interfaces. I think some users might consider the number input's button useful in an admin environment?

Maybe we should discuss this further down the road but I'm a bit reluctant to remove it now.

I see your point. I was just thinking about removing the HTML arrows in our Paginator (not the Input by default), since we've got our own buttons. But you're right, keeping them might be better for a general UI library. Let's stick with that.

@svenvandescheur
Copy link
Collaborator Author

Adding an aria-label in the

tag to describe it's purpose. Should we not use our component here instead by the way?

I've addressed the missing aria-label attribute, I've experimented with re-using the Toolbar after your comment but it turned out to be a little unpractical at the moment, for now I think it's better to wrap the Paginator in a Toolbar when used.

On mobile the component overflows and doesn't look as good anymore.

Nice catch, I fixed this.

@svenvandescheur svenvandescheur requested a review from Xaohs January 26, 2024 14:38
@svenvandescheur svenvandescheur merged commit 5399457 into main Jan 26, 2024
6 checks passed
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.

2 participants