flaviusmatis / flaviusmatis/simplePagination.js

Width changes when next/prev is pressed

Open
#33 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
777
Forks
397
PR merge metrics
No merged PRs in 30d

Description

First let me say this is great work and a very clean design. I like it quite a bit. However the one issue I see that precludes us from implementing it, is the width changes when next/prev is clicked. The problem is most apparent when pressing next after a fresh page load. The number and size of the pages increases until eventually the last item is in the place of the next button causing the user to inadvertently click the last item. For example, this could cause them to jump from 10 to 100 when they are expecting 11. This can be very confusing. They also have to click the first item and start clicking next to find their original location which can be very frustrating. Contributing to this is the number of digits present in the page number. The width of the

  • changes for single digit to double ad so on. This causes the overall width to creep. I think a min-width option may help mitigate this issue, but I don't have the time to test it.
  • Contributor guide

    No contributing guide indexed for this repository

    Research direction

    Reproduce the issue by using the next/prev pagination controls after a fresh page load, including transitions from single- to multi-digit page numbers. Inspect the controls'

  • sizing and verify that their positions remain stable so pressing next selects the expected page rather than a neighboring item.
  • Written by the indexing model from the issue text.

    Assessment

    Tech stack
    javascript, jquery
    Domain
    frontend
    Issue type
    Bug
    Difficulty
    2/5
    Estimated time
    1-3 hours
    Activity status
    Stale
    Clarity
    Mostly clear
    Newbie friendliness
    35/100

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.