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

feature: discreet information #3592

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

Conversation

adrianthedev
Copy link
Collaborator

Description

This PR brings the ability to add some discreet information to your records' Show and Edit pages.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Screenshots & recording

CleanShot 2025-01-17 at 15 43 34@2x

Manual review steps

  1. Step 1
  2. Step 2

Manual reviewer: please leave a comment with output from the test if that's the case.

Copy link

codeclimate bot commented Jan 17, 2025

Code Climate has analyzed commit 7722766 and detected 0 issues on this pull request.

View more on Code Climate.

}
)
},
data: Avo::BaseAction::DATA_ATTRIBUTES,
Copy link
Contributor

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.

@adrianthedev adrianthedev self-assigned this Jan 20, 2025
Copy link
Contributor

github-actions bot commented Feb 5, 2025

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

@github-actions github-actions bot added the Stale label Feb 5, 2025
@Paul-Bob Paul-Bob removed the Stale label Feb 5, 2025
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"}" }
Copy link
Contributor

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.

def status
return :new if id.nil?
return :new if id.even?
return :updated if id.odd?
Copy link
Contributor

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants