avo-hq / avo

Build Ruby on Rails apps 10x faster
https://avohq.io
Other
1.48k stars 232 forks source link

Pagination buttons rendering #2524

Closed yorsant closed 6 months ago

yorsant commented 6 months ago

Describe the bug

Screenshot 2024-02-27 at 9 22 21 AM

The pagination buttons render like this when used on association fields (tabs)

Steps to Reproduce

Find a resource with a has_many association. Render that field in a tab

Expected behavior & Actual behavior

All buttons should be aligned and have the same sizes.

Models and resource files

class Community < Avo::BaseResource
  ...
  def fields
    ...
    tabs do
      field(:people, as: :has_many)
    end
  end

System configuration

gem 'avo', '~> 3.4.1'
gem 'avo-pro', '~> 3.4.1', source: 'https://packager.dev/avo-hq/'

Rails version: 7.1.3.2

Ruby version: 3.2.2

License type:

Are you using Avo monkey patches, overriding views or view components?

I'm using self.components = { resource_index_component: Avo::Views::BankAccounts::ResourceIndexComponent } to add data: { action: 'click->plaid-link#open' } to my resource.

Screenshots or screen recordings

Additional context

Impact

I haven't check if the buttons work, UI looks broken.

Urgency

adrianthedev commented 6 months ago

What does bundle info pagy give you?

adrianthedev commented 6 months ago

Nevermind. I see it too. Looking into it!

brandondrew commented 6 months ago

I'm seeing this behavior too. I just noticed it for the first time today. (Perhaps I haven't dealt with multiple pages since last updating Avo.)

adrianthedev commented 6 months ago

Yes. Pagy was updated to v7 in one of your bundle updates and changed some classes. I have a PR in the works. It'll be fixed soon.

JeremasPosta commented 6 months ago

@adrianthedev , maybe this issue persists for us using the avo-advanced gem?

image
adrianthedev commented 6 months ago

That's interesting! Can you please try bundle update pagy too? That should have been fixed.