Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: freckle/yesod-page-cursor
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.0.0
Choose a base ref
...
head repository: freckle/yesod-page-cursor
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.0.0.1
Choose a head ref
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on Aug 31, 2020

  1. Correctly handle conditional previous-page link

    The handling of this was incorrect with regard to the extra item
    indicating presence of a Next page or Previous page.
    
    To work correctly, we need to switch on the current position a few times
    to ensure that:
    
    - The "extra" item existing is only used to indicate a Next page if we
      were "traveling in that direction". Otherwise, it should be used to
      indicate a Previous page existing
    
    - Being on a First or Next page can know a-priori if there's a Previous
      page. Similarly, being on a Last or Previous page can know if there's
      a Next page -- checking for the "extra item" in either of these cases
      will give the wrong answer half the time.
    
    Since the current test suite only ever checked for conditionality of a
    Previous link from a Last page, it happened to work. The failing case
    was discovered when trying to use this library in an app, via it's test
    suite, and backfilled here.
    pbrisbin committed Aug 31, 2020
    Configuration menu
    Copy the full SHA
    245c4c8 View commit details
    Browse the repository at this point in the history
  2. Version bump

    pbrisbin committed Aug 31, 2020
    Configuration menu
    Copy the full SHA
    be8af49 View commit details
    Browse the repository at this point in the history
Loading