-
Notifications
You must be signed in to change notification settings - Fork 72
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
ユーザー個別ページ > 回答一覧をVue.js化した #4319
Conversation
5a18fff
to
35a24ad
Compare
@aim2bpg |
@eatplaynap さん、レビュー依頼ありがとうございます。 |
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.
@eatplaynap さん、動作確認していたらコンフリクトが起きていることに気付きました。
まずは、手元で下記を実行してコンフリクトを解消されてください🙏
$ git pull --rebase origin main
39758da
to
2bbdb15
Compare
@aim2bpg |
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.
@eatplaynap さん、コンフリクト解消ありがとうございます😄
確認したところ、HTMLのVue.js化でインデントがずれていたり、classが違っていたりしますので、デベロッパーツールで対応をとりながら確認した方が良さそうです。今回.vueファイルを新規作成しており、間違っていても今後なかなか気付きにくい部分ですので、今後のためにも今回きちんと合わせ込みしておいた方が良いと思いました(ここは他の機能でもバグがあったので、間違いやすい部分なのかなと個人的には思っています😅 )。
こちらで確認した際の画面を貼っておきますのでご参考ください。
左がステージング環境(Vue.js化前)、右が開発環境(Vue.js化後)です。
app/javascript/users-answers.vue
Outdated
usersAnswer: UsersAnswer | ||
}, | ||
props: { | ||
usersPath: { type: String, default: '', required: false } |
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.
usersPath: { type: String, default: '', required: false } | |
usersPath: { type: String, default: null, required: false } |
ここのdefault値はnull
とした方が良いようです。
理由は、#4293 (comment) を参照ください。
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.
すみません、もう一点ありました。。
default値の設定見直しもお願いいたします🙏
2bbdb15
to
fc9fbab
Compare
@aim2bpg
|
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.
@eatplaynap さん、確認しました。
- もう1箇所変換できてないところがありました👀(下記のスクショ参照、左:ステージング環境、右:開発環境)。
- 今回、目視で気付けたところは再発防止の観点でテストを入れておきましょう💪
バグ関連の修正はテストもセットと考えておいた方が良いと思います(駒形さんから過去にご指摘受けました)。 - 今回、Vue.js化したことで不要となるファイルやコードはなかったでしょうか。もし、不要であれば削除しておきましょう✨
ex. /app/views/users/answers/_answer.html.slim, /app/controllers/users/answers_controller.rbの@answers
629d777
to
3eec19a
Compare
@aim2bpg
|
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.
@eatplaynap さん、確認しました。
さきほどは気付かなかったのですが、回答日時が変換前(左)が更新日時に対して、変換後(右)が作成日時となっているようです。
あと、question.vueが書き変わっていたのが原因不明というのが気持ち悪い感じがしています。
この辺でRebase時のコンフリクト解消か何かで書き変わっていたりしないでしょうか?おそらく、Files changedに現れない差分かなと思って、レビューできているか心配してます🤔
もし、単純に1箇所だけ誤って書き換えてた〜とかで、クリアとなっていれば余計な心配かもしれません🙏
5063c04
to
e89b551
Compare
@aim2bpg 回答一覧の日付についてステージング環境の回答一覧の日付を自分の実装したものと見比べたところ、そもそも仕様を勘違いしていたことに気づきました。 修正前: 回答に紐づく質問の作成日時が表示される 上記の変更に伴い、jbuilderで渡していた
|
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.
@eatplaynap さん、修正ありがとうございます。question.vueの変更についても了解しました👍
下記の1点を修正いただければ、 私はOKです🙆♀️チームリーダーレビューに進められてください👍
@garammasala29 さんの方でVue.js化された質問ページの方のselectedTagのdefault値の設定を修正しておきましょう。
本PRのスコープ外となりますが、動作確認中にコンソールにワーニングが出るのが気になりましたもので😅
→ こちらは、開発MTGでスコープ外とのことでしたので、私の方でIssue #4473 に登録しました🙏
@garammasala29 さんの修正とも直接関係なく、元々内在したものでした。早合点して失礼しました🙇🏻♂️
Co-authored-by: Masaki Komagata <komagata@gmail.com>
47b5060
to
539f2e9
Compare
@komagata |
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.
確認しました、OKですー🙆♂️
Issue概要
Issueのdescriptionに書いてある通り、下記3点を修正しテストを追加しました。
user名の回答
→user名
)参考にしたIssue
変更後
確認手順
feature/convert-users-answers-to-vuejs
をローカルに取り込むbin/setup
を実行rails s
でサーバーを立ち上げる4.rails c
でコンソールを開き、下記手順で回答データを作成bin/rails db:seed
でfixtureデータを作成するkomagata
でログイン後、ユーザー個別ページから回答タブをクリックし、Vue化された回答一覧画面を確認する※4で
rails c
を行っている理由は、#4438 でのバグでdb/fixtures/answers.yml
が機能していないことが発覚し、rails db:seed
でfixtureが作れないためです。こちらも私の方で対応予定ですが、こちらのバグが解消されmainに反映されるまでは、お手数ですが上記手順でデータを作成いただき、ページャーのご確認をお願いいたします:pray:
2022/3/23 #4447 での修正がマージされたのでfixtureを作成しました。