-
-
Notifications
You must be signed in to change notification settings - Fork 270
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: discreet information #3592
base: main
Are you sure you want to change the base?
Conversation
Code Climate has analyzed commit 7722766 and detected 0 issues on this pull request. View more on Code Climate. |
} | ||
) | ||
}, | ||
data: Avo::BaseAction::DATA_ATTRIBUTES, |
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 🐶
[Corrected] Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash.
This PR has been marked as stale because there was no activity for the past 15 days. |
self.discreet_information = [ | ||
{ | ||
tooltip: -> { sanitize("Product is <strong>#{record.status}</strong>", tags: %w[strong]) }, | ||
icon: -> { "heroicons/outline/#{record.status == :new ? "arrow-up-right" : "arrow-down-right"}" } |
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 🐶
[Corrected] Style/TernaryParentheses: Use parentheses for ternary expressions with complex conditions.
spec/dummy/app/models/product.rb
Outdated
def status | ||
return :new if id.nil? | ||
return :new if id.even? | ||
return :updated if id.odd? |
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 🐶
[Corrected] Style/RedundantReturn: Redundant return detected.
self.discreet_information = [ | ||
{ | ||
tooltip: -> { sanitize("Product is <strong>#{record.status}</strong>", tags: %w[strong]) }, | ||
icon: -> { "heroicons/outline/#{record.status == :new ? "arrow-trending-up" : "arrow-trending-down"}" } |
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 🐶
[Corrected] Style/TernaryParentheses: Use parentheses for ternary expressions with complex conditions.
Description
This PR brings the ability to add some discreet information to your records' Show and Edit pages.
Checklist:
Screenshots & recording
Manual review steps
Manual reviewer: please leave a comment with output from the test if that's the case.