Changelog History
Page 5
-
v5.0.0 Changes
๐ฅ Breaking changes - 1. Code update
๐ Pagy 4 dropped the compatibility for old ruby versions
>2.5
and started to refactor the code using more modern syntax and paradigms and better performance. It deprecated the legacy ones, printing deprecation warnings and upgrading instruction in the log, but still supporting its legacy API. Pagy 5.0.0 cleans up and removes all that transitional support code.โฌ๏ธ The changes for upgrading your app cannot be fixed with simple search and replace, but fear not! Fixing them should just take a few minutes with the following steps:
- โฌ๏ธ Upgrade to the latest version of pagy 4
- โ Run your tests or app
- ๐ Check the log for any deprecations message starting with '[PAGY WARNING]'
- โก๏ธ Update your code as indicated by the messages
- โ Ensure that the log is now free from warnings
- โฌ๏ธ Upgrade to pagy 5
๐ FYI: Here is the list of the deprecations that are not supported anymore:
โ Removed support for deprecated variables
- 0๏ธโฃ
Pagy::VARS[:anchor]
is nowPagy::DEFAULT[:fragment]
โ Removed support for deprecated arguments order
- The argument order in
pagy_url_for(page, pagy)
is now inverted:pagy_url_for(pagy, page)
โ Removed support for deprecated positional arguments
The following optional positional arguments are passed with keywords arguments in all the pagy helpers:
- The
id
html attribute string with thepagy_id
keyword - The
url|absolute
flag with theabsolute
keyword - The
item_name
string with theitem_name
keyword - The
extra|link_extra
string with thelink_extra
keyword - The
text
string with thetext
keyword
๐ฅ Breaking changes - 2. Simple search and replace
๐ There are a few renaming that have not been deprecated in previous versions because they are extremely easy to fix with simple search and replace (while implementing deprecations would have been detrimental to performance and complex for no reason)
Consistency renaming
A few elements have been renamed: you code may or may not contain them. Just search and replace the following strings:
- 0๏ธโฃ Rename
Pagy::VARS
toPagy::DEFAULT
- Rename
enable_items_extra
toitems_extra
- Rename
enable_trim_extra
totrim_extra
- ๐ Rename
Pagy::Helpers
toPagy::UrlHelpers
- Rename
pagy_get_params
topagy_massage_params
Items accessor
๐ The items accessor does not adjust for the actual items in the last page anymore. This should not affect normal usage, so you can ignore this change unless you build something on that assumption.
If your code is relying on the actual number of items in the page, then just replace
@pagy.items
with@pagy.in
wherever you meant that.FYI: The
@pagy.items
is now always equal to@pagy.vars[:items]
(i.e. the requested items), while the@pagy.in
returns the actual items in the page (which could be less than theitems
when the page is the last page)๐ Changes
- โ Removed support for deprecations
- ๐จ Refactoring of Pagy and Pagy::Countless classes, I18n, and url helpers
- ๐จ Refactoring of the docker environment, addition of ready to use VSCode setup
- ๐ Changed general module structure (use of prepend instead of re-opening modules)
- โ Added gearbox extra for geared pagination
- โ Added configuration files for a full working VSCode devcontainer environment
- โ Added Run Configurations for RubyMine
- ๐ Improved the usage of e2e tests
- โก๏ธ Updated doc, gemfiles and github workflow
- ๐ Other minor fixes and improvements in code and doc
-
v4.11.0 Changes
๐ Changes
- โ added countless_minimal feature
- โ added missing deprecation to countless class
- doc improvements
Commits
-
v4.10.2 Changes
๐ Changes
- ๐ improve the customization of url when using the trim extra
- ๐ better tailwind rules
- ๐ doc fixes and improvements
Commits
- 9e7fd48: improve the customization of url when using the trim extra (closes #325)
- ๐ณ 0d48b5f: better handling of extra docker-compose run files
- โช f5ed8f6: added note about the possible workaround for bundler/inline bug
- ๐ 2715660: doc fixes
- 7187101: Javascript doc improvements
- ๐ 24b7e78: release workflow refactoring
- 20d1d8e: chore: add github action - publish & tag versions (#322)
- ๐ 922fd7f: better tailwind rules
- 28983e6: added doc for using Searchkick.pagy_search (closes #319)
-
v4.10.1 Changes
๐ Changes
- ๐ fixes for meilisearch extra
Commits
- ๐ ec748c2: Fixes for Meilisearch extra (#318)
-
v4.8.0 Changes
๐ Changes
- ๐ Lowered minimal ruby version requirement to 2.5+
- โ
Simpler tests using the
rematch
gem - ๐ณ Docker environment improvements
Commits
- ๐ b5b500a: Merge branch 'backport-to-2.5' into dev
- ๐ 001f22f: fix for different handling of module prepend in ruby <3
- ๐ d6d71a5: fix for frozen error handled differently on ruby <3
- ๐ 8a2cf76: replaced syntax not available in ruby 2.5
- ๐ 14b3a0c: lowered the minimum ruby version requirement to 2.5
- โก๏ธ 8c76943: updated Gemfile.lock
- 934f602: added comment in doc example about the inverted order of arguments in previous versions
- ๐ณ acd59f5: moved command out of default docker-compose to its own file in order to avoid error before first bundle install
- โก๏ธ 527a14f: Gemfile update
- โ 842de05: better tests and stricter rubocop
- โก๏ธ d82e95c: Gemfile updated and used for CI
- โก๏ธ 675f587: Gemfile: added gemspec and updated rematch
- โก๏ธ b0a6603: Updated to rematch 1.0 and copyright year
- 8bda6a9: added rematch gem and reset rematch stores
- โ f62fa88: added e2e tests to ci
- โก๏ธ 04755aa: updated puma
- ๐ 4ec03f1: added HTML validation for all the helpers and styles
- ๐จ 87b2f62: refactoring e2e: replaced snapshot plugin; updated to cypress 7.3.0
-
v4.7.1 Changes
๐ Changes
- Fixed a couple of HTML validity issues with uikit and materialize combo_nav_js
- ๐ Improved rematch testing
- ๐ Updated the documentation
Commits
- ๐ 8cb4193: fixed and simplified uikit combo nav
- f762aca: used chip class for materialized combo nav
- โ 064a2b5: rematched tests
- 2a45321: expanded the combo nav label to the whole text
- ๐ 37c65a8: fixed and simplified materialize combo nav
- 789773b: removed faulty PAGY_REMATCH variable function; added rematch_all rake task
- โก๏ธ eb2df6d: updated docs [skip ci]
-
v4.7.0 Changes
๐ Changes
- ๐จ Refactoring of pagy-json tags into data attributes
- โ Added the rematch testing system to ease maintenance of tests
- โ Added Ukrainian locale
- โก๏ธ updated Gemfile and doc
Commits
- โ 887c783: better doc for E2E testing
- โก๏ธ 738fd93: updated manifest
- 0110e3a: Ukrainian locale (#310)
- โ 9265cd2: extended must_rematch to other tests
- d217965: refactoring of pagy_json_tag to pagy_json_attr: from script tag to data attribute
- ๐ง 57e6f91: added rematch test to ease maintenance of tests
- โก๏ธ 94561a0: updated puma