-
Notifications
You must be signed in to change notification settings - Fork 11
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
base: calculators-constructor
Are you sure you want to change the base?
Textarea for formula #973
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
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'; | ||
} | ||
}); |
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.
юзай для цього стімулус контроллер
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.
Досі актуально
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.
Або навіть видали
app/javascript/application.js
Outdated
@@ -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"; |
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.
тобі на всіх пейджах потрібен цей скріпт?
app/javascript/application.js
Outdated
@@ -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" |
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.
Нема строки в кінці файлу
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'; | ||
} | ||
}); |
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.
Досі актуально
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'; | ||
} | ||
}); |
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.
Або навіть видали
Code reviewers
Second Level Review
Summary of issue
Add textarea field for formula
Summary of change
textarea added and script to autoresize it
ZeroWaste.-.Google.Chrome.2024-11-26.21-58-53.mp4
Testing approach
test pass locally
CHECK LIST