-
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
ElapsedDaysをReactから素のJSに置き換えた #8371
base: main
Are you sure you want to change the base?
Conversation
@Ryooo-k |
@harada-webdev |
@Ryooo-k |
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.
@harada-webdev
確認いたしました!
何点かコメントしておりますのでご確認お願いいたしますー!
countProductsGroupedBy={countProductsGroupedBy} | ||
productDeadlineDay={productDeadlineDay} | ||
/> | ||
<div className="page-body__column is-sub" ref={elapsedDaysRef}></div> |
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.
元々のコードに合わせて、下記のようにした方が良いかなーと思いました!
<div className="page-body__column is-sub" ref={elapsedDaysRef}></div> | |
<nav className="page-body__column is-sub" ref={elapsedDaysRef}></nav> |
return span | ||
} | ||
|
||
const nav = document.createElement('nav') |
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.
こちらのコメントのようにすると、nav
は不要になりそうだと思いました。
const li = document.createElement('li') | ||
li.className = `page-nav__item ${additionalClass} ${activeClass( | ||
countProductsGroupedBy(elapsedDays) | ||
)}`.trim() |
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.
教えてください🙇ここのtrim()
がなぜ必要なのかがわからなかったです💦
Issue
概要
未アサインの提出物で表示されている、提出されてから何日経過しているかを示すナビゲーションメニューのコードを非Reactし、素のJSに置き換えました。
確認方法
main
ブランチでforeman start -f Procfile.dev
を実行して開発環境を立ち上げるkomagata
、パスワードtesttest
でログインするchore/replace-elapsed-days-with-vanilla-js
で表示されている内容と比較するために、ここでスクショを撮るchore/rewrite-elapsed-days-to-vanilla-js
に変更するi.
git fetch origin chore/rewrite-elapsed-days-to-vanilla-js
ii.
git checkout chore/rewrite-elapsed-days-to-vanilla-js
main
と変わっていないことを確認するScreenshot
未アサインの提出物ページ
rails db:seedして、提出時刻が最新に更新された提出物情報を入手した場合
※CSS確認用
提出してから3日以内の提出物しかない場合
提出してから4日以上の提出物しかない場合