bullet-train-co / bullet_train

The Open Source Ruby on Rails SaaS Template
MIT License
1.65k stars 261 forks source link

[1.7.15] Pagination styles no longer applying. #1582

Open zackgilbert opened 3 months ago

zackgilbert commented 3 months ago

I upgraded a project from 1.7.14 to 1.7.15 and noticed that the styles are no longer applying to pagination:

What is should look like (1.7.14 version):

Screenshot 2024-07-03 at 4 07 27 PM

What 1.7.15 results in:

Screenshot 2024-07-03 at 4 04 04 PM
jagthedrummer commented 3 months ago

@zackgilbert, I just tested this in 1.7.15 and pagination links are showing up correctly styled for me.

CleanShot 2024-07-09 at 11 03 50

Can you try inspecting the pagination elements to make sure that pagy-* class names are present in the markup?

And can you check the compiled stylesheets linked in your app to see if the CSS rules for them are also present?

I suspect one of the two will be missing, but I'm not sure why.

zackgilbert commented 3 months ago

Interesting. Will take a look and see if I can figure out what's going on. Thanks.

zackgilbert commented 3 months ago

Very strange...

At first glance, the styles are NOT matching the classes in the HTML:

Screenshot 2024-07-10 at 12 06 11 PM Screenshot 2024-07-10 at 12 07 07 PM

According to my Gemfile.lock:

pagy (8.6.3)
    pagy_cursor (0.2.0)
      activerecord (>= 5)
      pagy
jagthedrummer commented 3 months ago

Ah! The version thing jogged my memory and I remembered this issue: https://github.com/bullet-train-co/bullet_train/issues/1450

jagthedrummer commented 3 months ago

(Also, I'm a little surprised that depfu hasn't updated pagy in the starter repo. Not sure what's up with that.)

zackgilbert commented 3 months ago

Whoa. So my apps have an updated pagy version (8.6.3) but yours doesn't, which is why the styles are still working for you?

jagthedrummer commented 3 months ago

@zackgilbert yep, that's the thing. The starter repo is currently on 6.5.0 😬 :

https://github.com/bullet-train-co/bullet_train/blob/9d2e1c3b10aeca961cd844627c95840d7871fa55/Gemfile.lock#L464

There are a decent number of breaking changes listed for 7.0.0 and then 8.0.0 explicitly mentions changing the class name structure.

CleanShot 2024-07-10 at 14 16 11

zackgilbert commented 3 months ago

Ah! So I'm not crazy! Yay! Well that explains it. Okay... and for what its worth, I believe avo requires pagy > 7, so not sure how that's resolving correctly.

Anyways... super good to know... thanks for tracking that down.

jagthedrummer commented 3 months ago

I believe avo requires pagy > 7, so not sure how that's resolving correctly

Hey, that's fun. 🫠

swombat commented 2 months ago

avo requires pagy > 7 for the latest version but the current version (which includes a deprecated call to Rails.application.secrets...) doesn't.

Rails.application.secrets will be removed in Rails 7.2... so, I guess this might be worth updating...