bullet-train-co / bullet_train

The Open Source Ruby on Rails SaaS Template
MIT License
1.67k stars 267 forks source link

Upgrade pagy to version 8 (via `core`) #1767

Closed jagthedrummer closed 3 days ago

jagthedrummer commented 4 days ago

This makes it so that we don't declare a direct dependency on pagy, but instead rely on the version specified by the core gems.

Joint PR in core that updates pagy from version 6 to version 8: https://github.com/bullet-train-co/bullet_train-core/pull/955

In pagy version 7 they changed the default text for the "next page" and "previous page" buttons. For simplicity, and to reduce the amount of code that we need to support, we're sticking with the pagy defaults. Previously those buttons read < Prev and Next > and now they've dropped the text and just use the symbols < and >.

If you want to maintain the previous behavior you can copy the pagy translation file into your app, customize it, and then configure pagy to use it.

If you stick with the new defaults you may need to update some system tests to alter how they move from page to page (if you have any of your own tests around pagination).

Before upgrading pagy:

CleanShot 2024-11-19 at 09 54 28

After upgrading pagy:

CleanShot 2024-11-19 at 09 54 40

Fixes: https://github.com/bullet-train-co/bullet_train/issues/1582 Fixes: https://github.com/bullet-train-co/bullet_train/issues/1450