avo-hq / avo

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

Add `divider` support in resource `def cards` #3241

Open yuki-yogi opened 2 weeks ago

yuki-yogi commented 2 weeks ago

Describe the bug

Steps to Reproduce

Steps to reproduce the behavior:

  1. using divider in resource cards
  2. See error

Expected behavior & Actual behavior

Models and resource files

System configuration

Avo version: 3.12.0

Rails version: 7.2.1

Ruby version: 3.3.4

License type:

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

Screenshots or screen recordings

Additional context

Impact

Urgency

Paul-Bob commented 2 weeks ago

Hello @yuki-yogi this is not a bug, it's more lack of a feature.

As we mention in the documentation the def cards method on the resource only accepts cards for now.

yuki-yogi commented 2 weeks ago

Hello @Paul-Bob Thank you for your confirmation!

In the document below, it is described as if the divider can be used within Resources, so it might be clearer if this is corrected.

https://docs.avohq.io/3.0/cards.html#dividers

On Resources

class Avo::Resources::User < Avo::BaseResource  
def cards  
card Avo::Cards::ExampleColumnChart  
card Avo::Cards::ExamplePieChart  
card Avo::Cards::ExampleBarChart  
divider label: "Custom partials"  
card Avo::Cards::ExampleCustomPartial  
card Avo::Cards::MapCard  
end  
end  
Paul-Bob commented 2 weeks ago

so it might be clearer if this is corrected.

Thanks for pointing that out!

Agree! I'm removing it until the support is added

github-actions[bot] commented 1 day ago

This issue has been marked as stale because there was no activity for the past 15 days.