Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add divider support in resource def cards #3241

Open
3 of 11 tasks
yuki-yogi opened this issue Sep 12, 2024 · 5 comments
Open
3 of 11 tasks

Add divider support in resource def cards #3241

yuki-yogi opened this issue Sep 12, 2024 · 5 comments
Labels
Enhancement Not necessarily a feature, but something has improved Stale exempt

Comments

@yuki-yogi
Copy link

yuki-yogi commented Sep 12, 2024

Describe the bug

  • divider in resource cards does not work
NoMethodError - undefined method `use' for nil:
  app/avo/resources/**.rb:**:in `cards'
  • The divider on the dashboard cards is working as expected

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:

  • Community
  • Pro
  • Advanced

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

  • Yes. If so, please post code samples.
  • No

Screenshots or screen recordings

Additional context

Impact

  • High impact (It makes my app un-usable.)
  • Medium impact (I'm annoyed, but I'll live.)
  • Low impact (It's really a tiny thing that I could live with.)

Urgency

  • High urgency (I can't continue development without it.)
  • Medium urgency (I found a workaround, but I'd love to have it fixed.)
  • Low urgency (It can wait. I just wanted you to know about it.)
@Paul-Bob
Copy link
Contributor

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.

@Paul-Bob Paul-Bob added the Enhancement Not necessarily a feature, but something has improved label Sep 13, 2024
@Paul-Bob Paul-Bob changed the title divider in resource cards does not work Add divider support in resource def cards Sep 13, 2024
@yuki-yogi
Copy link
Author

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
Copy link
Contributor

so it might be clearer if this is corrected.

Thanks for pointing that out!

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

Copy link
Contributor

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

@github-actions github-actions bot added the Stale label Sep 29, 2024
@Paul-Bob Paul-Bob removed the Stale label Sep 29, 2024
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Not necessarily a feature, but something has improved Stale exempt
Projects
Status: To Do
Development

No branches or pull requests

3 participants