Skip to content

Conversation

@SigureMo
Copy link
Collaborator

@SigureMo SigureMo commented Dec 20, 2025

Before:

image

After:

image

Copilot AI review requested due to automatic review settings December 20, 2025 04:09
@netlify
Copy link

netlify bot commented Dec 20, 2025

Deploy Preview for pfccblog ready!

Name Link
🔨 Latest commit 0c6dc66
🔍 Latest deploy log https://app.netlify.com/projects/pfccblog/deploys/694621946b5f460008fc956d
😎 Deploy Preview https://deploy-preview-225--pfccblog.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements a folding pagination feature that displays ellipsis (...) to collapse page numbers when there are more than 7 pages, improving the UI for blogs with many pages.

  • Adds computed property pages that intelligently determines which page numbers to show and where to place ellipses
  • Updates the template to conditionally render page numbers as links or ellipses as non-clickable spans
  • Imports computed from Vue to support the reactive pagination logic

Comment on lines +39 to +40
if (pageIndex >= numPages - 3) {
return [1, '...', numPages - 4, numPages - 3, numPages - 2, numPages - 1, numPages]
Copy link

Copilot AI Dec 20, 2025

Choose a reason for hiding this comment

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

When numPages is exactly 8 and pageIndex is 5 (which satisfies pageIndex >= numPages - 3), the returned array is [1, '...', 4, 5, 6, 7, 8]. This means the ellipsis hides only pages 2 and 3. However, the general best practice for pagination is to only use an ellipsis when hiding at least 2 or more pages. Consider adjusting the threshold conditions to ensure ellipses are only shown when they actually save space (hiding 2+ pages), otherwise the ellipsis doesn't provide value and can confuse users.

Copilot uses AI. Check for mistakes.
@SigureMo SigureMo merged commit c71cfad into main Dec 20, 2025
12 checks passed
@SigureMo SigureMo deleted the fold-pagination branch December 20, 2025 04:14
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