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

Feat/paginator-optional-size #2193

Closed

Conversation

Mahmoud-zino
Copy link
Contributor

Linked Issue

Closes #2066

Description

when the size is optional, all controls depending on it are hidden.

Changsets

Instructions: Changesets automate our changelog. If you modify files in /packages/skeleton, run pnpm changeset in the root of the monorepo, follow the prompts, then commit the markdown file. Changes that add features should be minor while chores and bugfixes should be patch. Please prefix the changeset message with feat:, bugfix: or chore:.

Checklist

Please read and apply all contribution requirements.

  • This PR targets the dev branch (NEVER master)
  • Documentation reflects all relevant changes
  • Branch is prefixed with: docs/, feat/, chore/, bugfix/
  • Ensure Svelte and Typescript linting is current - run pnpm check
  • Ensure Prettier linting is current - run pnpm format
  • All test cases are passing - run pnpm test
  • Includes a changeset (if relevant; see above)

@changeset-bot
Copy link

changeset-bot bot commented Oct 26, 2023

🦋 Changeset detected

Latest commit: 06b2107

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@skeletonlabs/skeleton Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Oct 26, 2023

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

Name Status Preview Updated (UTC)
skeleton-docs ✅ Ready (Inspect) Visit Preview Oct 26, 2023 6:39pm

@endigo9740
Copy link
Contributor

endigo9740 commented Oct 27, 2023

@Mahmoud-zino it looks like we hav a bug. In fact, I'm not sure how we'll overcome this. But when no size is present we don't know the max range, so you can just navigate to the next page forever. Well beyond the limit of the content itself.

Screenshot 2023-10-27 at 10 22 28 AM

I think we may just want to trust our gut on this one and make the recommendation that we don't support pagination without a size defined. Even if the end users have to query this separately, they should be able to know the max number of items, which is crucial for pagination to work at all. I've visualized the issue below:

Screenshot 2023-10-27 at 10 30 57 AM

Without a size defined, we don't know when to quit showing new "groups" of items.

Unless you can come up with a better solution, I'll go ahead and close this and respond in the original thread.

@Mahmoud-zino
Copy link
Contributor Author

@endigo9740 I noticed this when testing but I didn't consider it a bug because if the size is not known, it should be expected that we can't limit the paginator.
With that being said, I can see why this could cause us more trouble than benefits and I agree that we should not implement it. 😄

@endigo9740
Copy link
Contributor

@Mahmoud-zino yeah this will look and feel busted to end users. They won't understand why this occurring since there's no indicator they've reached the end of the content.

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.

Paginators: make 'size' setting optional (fro Server-Side Pagination)
2 participants