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

サイトのデザインと構成を変更 #123

Merged
merged 12 commits into from
Oct 26, 2023

Conversation

Myxogastria0808
Copy link
Member

@Myxogastria0808 Myxogastria0808 commented Oct 25, 2023

from #110
from #109

@vercel
Copy link

vercel bot commented Oct 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
qr-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 26, 2023 5:45pm

@puripuri2100 puripuri2100 self-requested a review October 25, 2023 16:12
@puripuri2100 puripuri2100 changed the title fix/#109-edit-site-design サイトのデザインと構成を変更 Oct 25, 2023
Copy link
Member

@puripuri2100 puripuri2100 left a comment

Choose a reason for hiding this comment

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

リファクタリングとデザインのモダン化の作業お疲れさまでした
かなり良く、ありがとうございます
一部あった修正してほしい箇所をコメントしました
対応よろしくお願いします @Myxogastria0808

next.config.js Outdated
@@ -2,6 +2,10 @@
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
//以下の記述は、安定してstyleのstyleを充てるのに必要なもの
Copy link
Member

Choose a reason for hiding this comment

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

styleのstyle

「styled-componentsのstyle」の間違いかな?

Copy link
Member Author

Choose a reason for hiding this comment

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

書き間違えました...
書き直しておきます。

@@ -24,12 +26,19 @@ const DrawerHeader = styled('div')(({ theme }) => ({

const Header = () => {
const [menuOpen, setMenuOpen] = useState(false)
//!変更したよ~~~~~~~~
Copy link
Member

Choose a reason for hiding this comment

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

gitでログとdiffが見られるのでコメントは削除して大丈夫

Copy link
Member Author

Choose a reason for hiding this comment

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

コメント消し忘れてました...
消しておきます。

@@ -24,12 +26,19 @@ const DrawerHeader = styled('div')(({ theme }) => ({

const Header = () => {
const [menuOpen, setMenuOpen] = useState(false)
//!変更したよ~~~~~~~~
const router = useRouter()
//!変更したよ~~~~~~~~
Copy link
Member

Choose a reason for hiding this comment

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

コメント削除

Copy link
Member Author

Choose a reason for hiding this comment

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

コメント消し忘れてました...
消しておきます。

Comment on lines 99 to 106
//! 変更 (Myxogastria0808)
window.location.href = '/spot'
//! 変更 (Myxogastria0808)
} catch (err) {
toast.error('削除に失敗')
//! 変更 (Myxogastria0808)
window.location.href = '/spot'
//! 変更 (Myxogastria0808)
Copy link
Member

Choose a reason for hiding this comment

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

コメントは削除して大丈夫
その代わりリダイレクトをかけないといけない理由が書いてあると良い

router.replace(`/spot`)

ではなく

window.location.href = '/spot'

になっているのは何か理由がある…? 揃えられるなら他と揃えておくと良いと思います

Copy link
Member Author

Choose a reason for hiding this comment

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

同一パスにリダイレクトするとき(上記のパターンでは /spot から /spotにリダイレクト)、router.replace()は、リダイレクトがかからないのですが、window.location.hrefだとリダイレクトがかけれるのでwindow.location.hrefを採用しています。
リダイレクトをかけている理由は、削除のボタンを押したときに、リダイレクトをしないと更新されないからです。
コメントは削除しておきます。

Copy link
Member

Choose a reason for hiding this comment

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

SystemButton/Button.stories.tsxファイルについて、ファイル名をSystemButton/SystemButton.stories.tsxに変更し、中身も合わせて書き替えるようにしてください

Copy link
Member Author

Choose a reason for hiding this comment

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

storybooksを使ったことがないので、ファイル内の変更箇所がわかりません...
申し訳ございません。
ファイル名だけ変更しました。

Copy link
Member

Choose a reason for hiding this comment

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

了解です
自分で巻き取っておきます

Comment on lines 140 to 142
//! 変更 (Myxogastria0808)
router.replace('/')
//! 変更 (Myxogastria0808)
Copy link
Member

Choose a reason for hiding this comment

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

コメントは削除して大丈夫
トップページにリダイレクトをかける理由(「物品検索ページに誘導するため」など)を書いておくと良いと思う

Copy link
Member Author

Choose a reason for hiding this comment

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

アドバイスありがとうございます。
コメント削除しておきます。

<>
<Header />
<Top />
<PrintingPage />
Copy link
Member

Choose a reason for hiding this comment

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

ページはregister-itemだけれどもここが<PrintingPage />になっているのはやや混乱があるので、どちらかに統一した方が良さそうです
個人的には、QRコード印刷よりも物品登録の方が主なので<RegisterItemPage />の方が良いと思います

Copy link
Member Author

@Myxogastria0808 Myxogastria0808 Oct 26, 2023

Choose a reason for hiding this comment

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

<RegisterItemPage />に変更しておきました。

Comment on lines 115 to 123
//! 変更 (Myxogastria0808)
router.replace(`/spot`)
//! 変更 (Myxogastria0808)
return result
} catch (err) {
toast.error('地点情報の編集に失敗')
router.replace(`/spot/list`)
//! 変更 (Myxogastria0808)
router.replace(`/spot`)
//! 変更 (Myxogastria0808)
Copy link
Member

Choose a reason for hiding this comment

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

コメントは削除して大丈夫

Copy link
Member Author

Choose a reason for hiding this comment

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

コメント削除しておきます。

@@ -36,7 +36,7 @@ const StyledMain = styled.main.withConfig({
/**
* 物品を登録できる
*/
const FixturesRegister = () => {
const SpotFixturesRegister = () => {
Copy link
Member

Choose a reason for hiding this comment

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

SpotRegisterで良いと思う

Copy link
Member Author

Choose a reason for hiding this comment

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

SpotRegisterに変更しました。

Comment on lines 90 to 98
//! 変更 (Myxogastria0808)
window.location.href = '/spot'
//! 変更 (Myxogastria0808)
return result
} catch (err) {
toast.error('地点の登録に失敗')
//! 変更 (Myxogastria0808)
window.location.href = '/spot'
//! 変更 (Myxogastria0808)
Copy link
Member

Choose a reason for hiding this comment

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

コメントは削除して大丈夫

router.replace(`/spot`)

に揃えた方が良いと思う

Copy link
Member Author

Choose a reason for hiding this comment

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

登録情報を地点情報一覧に反映するために必要なので、リダイレクトかけています。
同一パスにリダイレクトするとき(上記のパターンでは /spot から /spotにリダイレクト)、router.replace()は、リダイレクトがかからないのですが、window.location.hrefだとリダイレクトがかけれるのでwindow.location.hrefを採用しています。

@Myxogastria0808
Copy link
Member Author

一部、デザインの修正が残っていた箇所がありましたので、その修正が完了次第、pushします。

@puripuri2100
Copy link
Member

mainをmergeして良さそうなのでmergeします
深夜なので影響無さそうだし

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.

2 participants