-
-
Notifications
You must be signed in to change notification settings - Fork 234
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
feature: resource cards #791
Conversation
@@ -0,0 +1,211 @@ | |||
module Avo | |||
class BaseCard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Class BaseCard
has 23 methods (exceeds 20 allowed). Consider refactoring.
end | ||
end | ||
|
||
def card_classes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method card_classes
has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Code Climate has analyzed commit 7ec0b09 and detected 3 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
lib/avo/concerns/has_cards.rb
Outdated
|
||
delegate :item_at_index, to: :class | ||
|
||
def cards(params: nil, view: nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method cards
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
|
||
def initialize(id, **args, &block) | ||
def initialize_visibility(args = {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method initialize_visibility
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
lib/avo/concerns/has_cards.rb
Outdated
|
||
delegate :item_at_index, to: :class | ||
|
||
def cards |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method cards
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
This PR has been marked as stale because there was no activity for the past 15 days. |
|
||
delegate :item_at_index, to: :class | ||
|
||
def cards |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method cards
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
before_action :set_card, only: :show | ||
|
||
def show | ||
end | ||
|
||
def show_for_resource | ||
abort ['show_for_resource', params].inspect | ||
show |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[rubocop] reported by reviewdog 🐶
Lint/UnreachableCode: Unreachable code detected.
|
||
def show_for_record | ||
abort ['show_for_record', params].inspect | ||
show |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[rubocop] reported by reviewdog 🐶
Lint/UnreachableCode: Unreachable code detected.
This PR has been marked as stale because there was no activity for the past 15 days. |
Closing in favor to bring it in Avo 3.0. |
For better syncing with this PR https://github.com/avo-hq/avo-3/pull/29, let's first build the feature where the cards sit on top of everything nomatter what with Second iteration add |
Description
Fixes #1072
Fixes #766
Pre-release: 2.11.3.pre.3
Docs
Example on how to use: https://github.com/avo-hq/avo/pull/791/files#diff-ca106bcd1c807c902c1f474e33c2833de1f9a0436f7346a9e884eb834e1c0e33R111-R121
This is still a work in progress. Todo:
Checklist:
Manual review steps
Description...
Manual reviewer: please leave a comment with output from the test if that's the case.