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

Textarea for formula #973

Merged
merged 21 commits into from
Dec 4, 2024
Merged

Conversation

DanielVajnagi
Copy link
Contributor

@DanielVajnagi DanielVajnagi commented Nov 24, 2024

Code reviewers

Second Level Review

Summary of issue

Add textarea field for formula

Summary of change

textarea added and script to autoresize it

image

ZeroWaste.-.Google.Chrome.2024-11-26.21-58-53.mp4

Testing approach

test pass locally
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

Copy link

codecov bot commented Nov 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.74%. Comparing base (f934abb) to head (9e63cbb).
Report is 20 commits behind head on calculators-constructor.

Additional details and impacted files
@@                   Coverage Diff                    @@
##           calculators-constructor     #973   +/-   ##
========================================================
  Coverage                    86.74%   86.74%           
========================================================
  Files                           68       68           
  Lines                         1056     1056           
========================================================
  Hits                           916      916           
  Misses                         140      140           

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

@DanielVajnagi DanielVajnagi mentioned this pull request Nov 24, 2024
8 tasks
@DanielVajnagi DanielVajnagi linked an issue Nov 24, 2024 that may be closed by this pull request
Comment on lines 1 to 9
document.addEventListener('input', function (event) {
if (event.target && event.target.classList.contains('resize-auto') && event.target.tagName === 'TEXTAREA') {
const textarea = event.target;
textarea.style.overflow = 'hidden';
textarea.style.resize = 'none';
textarea.style.height = 'auto';
textarea.style.height = (textarea.scrollHeight) + 'px';
}
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

юзай для цього стімулус контроллер

Copy link
Collaborator

Choose a reason for hiding this comment

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

Досі актуально

Copy link
Collaborator

Choose a reason for hiding this comment

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

Або навіть видали

@@ -7,4 +7,5 @@ import "@fortawesome/fontawesome-free";
import "@rails/request.js";
import "@rails/actioncable";
import "turbo_streams/toast";
import "@oddcamp/cocoon-vanilla-js"
import "@oddcamp/cocoon-vanilla-js";
import "resize_textarea";
Copy link
Collaborator

Choose a reason for hiding this comment

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

тобі на всіх пейджах потрібен цей скріпт?

@@ -7,4 +7,4 @@ import "@fortawesome/fontawesome-free";
import "@rails/request.js";
import "@rails/actioncable";
import "turbo_streams/toast";
import "@oddcamp/cocoon-vanilla-js"
import "@oddcamp/cocoon-vanilla-js"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Нема строки в кінці файлу

Comment on lines 1 to 9
document.addEventListener('input', function (event) {
if (event.target && event.target.classList.contains('resize-auto') && event.target.tagName === 'TEXTAREA') {
const textarea = event.target;
textarea.style.overflow = 'hidden';
textarea.style.resize = 'none';
textarea.style.height = 'auto';
textarea.style.height = (textarea.scrollHeight) + 'px';
}
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

Досі актуально

Comment on lines 1 to 9
document.addEventListener('input', function (event) {
if (event.target && event.target.classList.contains('resize-auto') && event.target.tagName === 'TEXTAREA') {
const textarea = event.target;
textarea.style.overflow = 'hidden';
textarea.style.resize = 'none';
textarea.style.height = 'auto';
textarea.style.height = (textarea.scrollHeight) + 'px';
}
});
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 a316685 into calculators-constructor Dec 4, 2024
7 checks passed
@DanielVajnagi DanielVajnagi deleted the textarea-formula-field branch December 4, 2024 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

For a formula field, a field of type TextArea
3 participants