#
CHANGELOG
#
Breaking Changes
If you upgrade from version < 9.0.0
see the following:
Breaking changes in version 9.0.0 - Breaking changes in version 8.0.0
- Breaking changes in version 7.0.0
- Breaking changes in version 6.0.0
- Breaking changes in version 5.0.0
- Breaking changes in version 4.0.0
- Breaking changes in version 3.0.0
- Breaking changes in version 2.0.0
- Breaking changes in version 1.0.0
#
Deprecations
:after_latest
keyset variable: use:filter_newest
#
Version 9.2.0
- Simplify the keyset API:
- Deprecate the :after_latest variable in favour of :filter_newest
- Add the keyset argument to the :filter_newest lambda
- Rename protected after_latest_query > filter_newest_query
#
Version 9.1.1
- Simplify calendar code
#
Version 9.1.0
- Add Dzongkha (dz locale) (#741)
#
Version 9.0.9
- Set freeze flag to false (#737)
- Fix: Prefix DEFAULT with Pagy:: (#736)
#
Version 9.0.8
- Keep offset and limit variables untouched by the overflow extra in :empty_page mode (closes #733)
#
Version 9.0.7
- Absolutize generic define? to fix module resolution
#
Version 9.0.6
- Fix docs (closes #732)
- Replace pluck with pick
#
Version 9.0.5
- Fix for missing variables passed to pagy_anchor from pagy_nav (closes #728)
#
Version 9.0.4
- Fix groupdate timezone error on certain machines/config
- Fix gem containing tmp files
#
Version 9.0.3
- Remove legacy and unused javascript files
- Improve pagy_get_page with force_integer option
- Fix jsonapi with keyset
- Complete the internal refactoring of version 9:
- Remove the pagy*_get_vars methods now useless
- Use to_i on the page variable for the search extras
#
Version 9.0.2
- Rename and document the link header to pagy_link_header
- Add first and next url helpers to the keyset extra; add the keyset section to config/pagy.rb
- Fix nil page in keyset URL not overriding the params page
- Extracted shared method
#
Version 9.0.1
- Fix countless executing the count query
- Rename row_comparison > tuple_comparison; ignore mixed orders
#
Version 9.0.0
#
Breaking Changes
#
Dropped support for deprecated stuff
- The
foundation
,materialize
,semantic
anduikit
CSS extras have been removed: (See the reasons) - Javascript renamed files
pagy.js
: usepagy.min.js
pagy-module.js
: usepagy.mjs
pagy-dev.js
: use thepagy.min.js
with thepagy.min.js.map
pagy-module.d.ts
: usepagy.d.ts
- The Array type for the
:size
(e.g.size: [1, 4, 4, 1]
) that generates the classic bar is not supported anymore: use the:size
set to an integer with theends: true
variable (which are the default since 8.4.6). If a legacy bar remains REALLY a requirement, addrequire 'pagy/extras/size
to yourpagy.rb
initalizer. (See the size extra)
#
Simple renaming
We used items
for too many things that confused even maintainers. The "items" are now referencing only the records/elements
fetched from a collection (plural entity), so they are kept as before (e.g. pagy_*get_items
methods).
The "number of items" (singular entity), are now unmistakably referenced as the limit
everywhere (code, API, files, extras,
docs, etc.). The logic didn't change so you have just to globally search 'items' and replace with limit
and you should be
done... or use the detailed table below:
#
Code changes
- The
DEFAULT[:anchor_string]
was useless and has been dropped. - The
:anchor_string
and the:fragment
are not instance variables anymore, but keyword arguments for all the helpers, because it is frontend code (see the discussion). Instead of passing them to thepagy*
method in the controller, pass it to anypagy_*nav
method in the view. - A general internal revamp has changed the positional argument for the Pagy::* objects and constructors methods to keyword
arguments. If you get a
wrong number of arguments (given 1, expected 0) (ArgumentError)
, just use a double splat**
.
#
Possibly breaking overrides
- The internal Pagy protected methods have been renamed and refactored. If you use custom Pagy classes, you may need to search into the code.
#
Changes
- Improve Keyset::Sequel and docs
- BREAKING: Rename :max_limit > :limit_max
- BREAKING: Rename variable, param, accessor, extra and helper "items" to "limit"
- Add playground keyset_ar.ru and keyset_s.ru apps and integration with the rest of the gems
- Add keyset pagination base files
- Pagy::Keyset API
- ActiveRecord and Sequel adapters
- BREAKING: Transform the vars positional hash argument in keyword arguments (double splat); internal renaming of setup/assign methods
- Refactor pagy_get_vars in various backend extras
- BREAKING: Refactor the fragment url
- BREAKING: Refactor the anchor_string system
- BREAKING: Drop the support for 8+ deprecations