Delete dead validated_form.js (the case contact form it targeted was redesigned)

オープン 初心者向け
#7,307 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
75/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript, jquery
領域
frontend

調査の方向性

まず grep -rn component-validated-form app/views app/components を実行し、このクラスを描画しているものがないことを確認してください。次に [email protected] として /case_contacts/new の走行マイル数の警告を確認し、結果を PR の説明に記録してください。app/javascript/src/validated_form.js と app/javascript/tests/validated_form.test.js を削除し、app/javascript/application.js からその require を取り除いてください。npm run test と bundle exec rspec spec/system/case_contacts の両方が成功すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Difficulty: Intermediate Help Wanted javascript

What

app/javascript/src/validated_form.js (about 290 lines, jQuery) adds client-side warnings to forms with the class .component-validated-form, for example "you entered miles driven for an in-person contact". No view renders .component-validated-form any more: the redesigned case contact form (app/views/case_contacts/form/details.html.erb + case_contact_form_controller.js) replaced it. So the script exits on its first line.

Checklist

  • Confirm grep -rn component-validated-form app/views app/components returns nothing
  • Check whether the new case contact form still warns when miles driven is entered for a contact that is not in person. Try it at /case_contacts/new as [email protected]. Put what you find in the PR description. If the warning is gone, that's fine for this PR; open a follow-up issue describing it
  • Delete app/javascript/src/validated_form.js and app/javascript/__tests__/validated_form.test.js
  • Remove require('./src/validated_form') from app/javascript/application.js
  • npm run test passes, and so does bundle exec rspec spec/system/case_contacts

Before you start

  • Comment here to be assigned. Setup is bin/setup, then bin/dev. Logins are in the README.
  • JS tests: npm run test. Lint: bin/lint.
  • Part of #7301 (removing jQuery). Keep this PR to just this file.
主要言語
Ruby
スター
382
フォーク
547
平均マージ
2日 22時間
マージ済み PR(30日)
46

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rubyforgood/casa のほかの issue

rubyforgood/casa の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。