All Versions
18
Latest Version
Avg Release Cycle
-
Latest Release
-

Changelog History
Page 1

  • v1.1.1.0 Changes

    • โž• Add PaginationConfig and various *With-flavored functions for customizing things like per-page size and GET parameter naming @eahlberg
  • v1.1.0.2 Changes

    • Functor, Foldable, and Traversable instances for Pages

    And so necessarily, Page.

    These work by applying the functions to a Pages' current Page, which is to apply it to each of the Page's items. These can be used to extend the data post-pagination; purely via fmap, or with effect using traverse.

      pages <- runDB $ do
        users <- selectPaginated 10 [UserFoo ==. foo] []
    
        -- for :: Pages User -> (User -> t UserWithPosts) -> t (Pages UserWithPosts)
    
        for users $ \user -> do
          posts <- selectList [PostUserId ==. user] [Desc PostCreatedAt, LimitTo 5]
          pure $ UserWithPosts user posts
    

    Yes, this does encourage N+1 queries, but the idea is they will not be harmful when N is small due to pagination.

  • v1.1.0.1 Changes

    • Export getCurrentPage
    • Simplify some constraints with MonadHandler
  • v1.1.0.0 Changes

    • Major rewrite

    Interfaces for paginate and selectPaginated now return a Pages a type, free of any visuals-related concerns. This value provides the paginated items and can be passed to functions from the Widgets model for rendering navigation HTML.

    The ellipsed widget is most like previous behavior with simple being a new, simpler alternative. These are (for the most part) not configurable, we should instead strive to create separate widgets if we need different behavior.

    Everything is now very type-safe: we use Natural everywhere, with newtypes to differentiate things like PerPage, PageNumbers, etc.

    • ๐Ÿ‘ Officially drop support for GHC < 7.10
  • v0.11.0 Changes

    • โž• Add simplePaginationWidget
  • v0.10.1 Changes

    • ๐Ÿ‘Œ Support persistent-2.5
  • v0.10.0 Changes

    • Require yesod-1.4 & persistent-2.0
  • v0.9.1 Changes

    • ๐Ÿ‘ Allow text-2.0
    • Require persistent-1.3
  • v0.9 Changes

    ๐Ÿš€ 1.0 Release Candidate

  • v0.4.1 Changes

    No changes