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

#988 Add color to Calculator #997

Merged
merged 13 commits into from
Dec 5, 2024

Conversation

DanielVajnagi
Copy link
Contributor

@DanielVajnagi DanielVajnagi commented Dec 1, 2024

Code reviewers

Second Level Review

Summary of issue

Add color picker to calculator

Summary of change

Added color field in model, created partial for picking color

image

CHECK LIST

  • СI passed
  • Сode coverage >=95%
  • PR is reviewed manually again (to make sure you have 100% ready code)
  • All reviewers agreed to merge the PR
  • I've checked new feature as logged in and logged out user if needed
  • PR meets all conventions

@DanielVajnagi DanielVajnagi self-assigned this Dec 1, 2024
@DanielVajnagi DanielVajnagi linked an issue Dec 1, 2024 that may be closed by this pull request
@DanielVajnagi DanielVajnagi changed the title Closes #988 Add color to Calculator #988 Add color to Calculator Dec 1, 2024
Copy link

codecov bot commented Dec 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.07%. Comparing base (a65394e) to head (dad62c1).
Report is 1 commits behind head on calculators-constructor.

Additional details and impacted files
@@                     Coverage Diff                     @@
##           calculators-constructor     #997      +/-   ##
===========================================================
+ Coverage                    87.06%   87.07%   +0.01%     
===========================================================
  Files                           68       68              
  Lines                         1059     1060       +1     
===========================================================
+ Hits                           922      923       +1     
  Misses                         137      137              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

<%= f.input :color, as: :color, label: 'Choose a Color for Calculator Page:',
input_html: {
class: 'form-control form-control-color p-2',
style: 'width: 7rem; height: 3.5rem;'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

інлайн стилі не гуд

@@ -35,6 +36,7 @@ class Calculator < ApplicationRecord
validates :en_name, :uk_name, presence: true
validates :en_name, :uk_name, length: { minimum: 3, maximum: 50 }
validates :slug, presence: true, uniqueness: true
validates :color, format: { with: /\A#[0-9a-fA-F]{6}\z/ }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а де тести?))

@DanielVajnagi DanielVajnagi merged commit 1df17d5 into calculators-constructor Dec 5, 2024
7 checks passed
@DanielVajnagi DanielVajnagi deleted the 988-add-calculator-color branch December 5, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for QA
Development

Successfully merging this pull request may close these issues.

Add a calculator's color
3 participants