None
- Fix issue with filtering out query parameters @eahlberg
- Support GHCs 9.0 and 9.2
- Re-licensed from BSD3 to MIT
- Released with tight lower bounds and no upper bounds
- Internal modernizations
- Add
PaginationConfigand various*With-flavored functions for customizing things like per-page size andGETparameter naming @eahlberg
-
Functor,Foldable, andTraversableinstances forPagesAnd so necessarily,
Page.These work by applying the functions to a
Pages' currentPage, which is to apply it to each of thePage's items. These can be used to extend the data post-pagination; purely viafmap, or with effect usingtraverse.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+1queries, but the idea is they will not be harmful whenNis small due to pagination.
- Export
getCurrentPage - Simplify some constraints with
MonadHandler
-
Major rewrite
Interfaces for
paginateandselectPaginatednow return aPages atype, free of any visuals-related concerns. This value provides the paginated items and can be passed to functions from theWidgetsmodel for rendering navigation HTML.The
ellipsedwidget is most like previous behavior withsimplebeing 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
Naturaleverywhere, withnewtypes to differentiate things likePerPage,PageNumbers, etc. -
Officially drop support for GHC < 7.10
- Add
simplePaginationWidget
- Support persistent-2.5
- Require yesod-1.4 & persistent-2.0
- Allow text-2.0
- Require persistent-1.3
1.0 Release Candidate
No changes
- Require yesod-1.2 & persistent-1.2
- Require yesod-1.1 & persistent-1.1
- Relax lower bounds on yesod & persistent back to 0.10 / 0.8
- Support custom pagination widgets
- Require yesod-1.0 & persistent-0.9
- Add example
selectPaginatedneeds to be given torunDBby you- Fix disabling of next/prev links when appropriate
First released version.