Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
fix analytics v1.0.0 (#166)
Browse files Browse the repository at this point in the history
* Update dependency next to v12.2.1

* Update devDependencies

* Update dependency eslint-plugin-storybook to v0.6.0

* Update dependency jest-extended to v3

* Update dependency next to v12.2.2

* Update devDependencies

* ✨ style-dictionaryをTailwind CSSに対応させた

* 👷 5eb51f5 に伴ってCIを変更した。

動作するか未検証

* 🔧 scripts/ をeslintからignoreした。tailwind.config内のwildcardが冗長だったので修正

* 🎨 コードを整形した

* 🍱 協賛企業の情報を載せるファイルを作成した

現在は協賛する企業がわからないため空白

* ➕ yamlパーサを追加した

* 🔨 yarn@3.2.1の更新

* 🏷️ yamlパーサのparse関数の返り値をジェネリックにした

* 🔥 gitkeepの削除

* 🏷️ modelを追加

* 💩 yamlをパースする関数とfieldの配列からRYamlの配列を返す関数を定義

改良の余地はあり。方法はわからず

* ✅ api.tsのテストを追加

* 🤖 auto-fixable format by github-actions

* ✨ ワイルドカードを修正

* 👷 fix CI

* 🚚 テストの位置を移動させた

* 🔥 ファイルを削除した

* ✨ 冗長な表現を省略

* ✨ Storybookの設定を変更した

babelの設定を読み込むようにし、next/routeへの対応を行った

* ➕ jestを追加しvitestを削除した

* 🔥 vitestのglobal typeを削除した

* ✨ test用のtest、storiesを変更した

* 🔧 jest用のconfigを作成した

* 🤖 auto-fixable format by github-actions

* 🚚 rename test section

* 📸 update snapshot

* 🚑️ fix lock file

* ✨ Atomic Desingに則したコードになっているかをテストするマッチャーを作成

詳しい動作はコードを確認してください

* ➕ @babel/preset-envを追加した。

これを用いていい感じにtranspileする

* 🚑️ .babelrc.jsの名前をbabel.config.jsに変更し、それに合わせてjest.config.jsの内容を変更した

それらしきissueを探したが見つからなかったが、確かに.babelrc.jsだと読み込まれない。

* Update devDependencies

* ✨ Atomic Designに沿った実装かをチェックするマッチャーの適用

動作確認あり。

* 🤖 auto-fixable format by github-actions

* 🚚 ディレクトリの階層を変更した

* [figma] first site tokens

* 🚑️ 落ちていたCIを修正

npm scriptsに登録した。

* generate scss by style-dictionary

* 👷 CIを修正

skip ciのメッセージを追加

* 🤖 auto-fixable format by github-actions

* 💩 修正漏れを治した

もうね、眠いんですよ。

* [skip ci] generate json by style-dictionary

* Update Yarn to v3.2.2

* [skip ci] auto-fixable format by github-actions

* Update devDependencies

* Update devDependencies

* Update dependencies (non-major)

* 🚑️ NextJSが12.2.3にあがったことによる、ESLintのルールが変わったためそれに対応する修正

詳細はchangelog見てください。NextJSの

* fix: fix test message

* 🚧 wip

* ✨ webフォントの追加及び最適化 (#104)

Zen Kurenaidoかわいいですね

* ✨ webフォントの追加及び最適化 (#104) (#106)

Zen Kurenaidoかわいいですね

* APIのリファクタリング (#107)

* 🔥 定数を置いておくファイルの削除

使わない実装に変更した

* ➕ ts-patternの追加

* ♻️ 汚いAPIの実装を修正

主に型周りを整備した

* [skip ci] auto-fixable format by github-actions

* 📌 バージョンを固定する

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* APIのリファクタリング (#107) (#108)

* ✨ webフォントの追加及び最適化 (#104)

Zen Kurenaidoかわいいですね

* APIのリファクタリング (#107)

* 🔥 定数を置いておくファイルの削除

使わない実装に変更した

* ➕ ts-patternの追加

* ♻️ 汚いAPIの実装を修正

主に型周りを整備した

* [skip ci] auto-fixable format by github-actions

* 📌 バージョンを固定する

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* 🔍️ langを日本語に変更した

なんでenだったんだ???

* ➕ Storybook似必要な依存を追加した

a11yを確認できるアドオンと、emotionのキャッシング

* ✨ フォントをtwin.macroで読み込める形で追加した

IEやSafariでも対応している。はず。

* ✨ Storybookの設定を変更した

静的ファイルを置くディレクトリを指定した

* ✨ 設定したフォントや、twin.macroようにチューニングされたreset cssを読み込ますようにした

unocssを採用する可能性あり

* ✨ typographyコンポーネントを作成した

ダークモード非対応

* 🩹 storiesに値の変更はいらないと感じたので削除した

あくまでカタログ

* 📸 スナップショットの更新

実装が変わったため

* レイアウトコンポーネントの追加 (#111)

* ♻️ 型定義の修正が漏れていたため修正

* 🚚 ファイル名を変更した

定数を置いておくファイルの削除に伴い修正するのを忘れていたため

* ✨ レイアウトコンポーネントの追加

_app.tsxへの対応は別ブランチで対応予定

* [skip ci] auto-fixable format by github-actions

* ♿️ roleを追加した

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* 🚑️ コンフリクトの修正

* レイアウトコンポーネントの追加 (#111) (#112)

* ✨ webフォントの追加及び最適化 (#104)

Zen Kurenaidoかわいいですね

* APIのリファクタリング (#107)

* 🔥 定数を置いておくファイルの削除

使わない実装に変更した

* ➕ ts-patternの追加

* ♻️ 汚いAPIの実装を修正

主に型周りを整備した

* [skip ci] auto-fixable format by github-actions

* 📌 バージョンを固定する

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* レイアウトコンポーネントの追加 (#111)

* ♻️ 型定義の修正が漏れていたため修正

* 🚚 ファイル名を変更した

定数を置いておくファイルの削除に伴い修正するのを忘れていたため

* ✨ レイアウトコンポーネントの追加

_app.tsxへの対応は別ブランチで対応予定

* [skip ci] auto-fixable format by github-actions

* ♿️ roleを追加した

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* ✨ レイアウトコンポーネントを読み込ませる

_app.tsxとpreview.js

* ✅ テストコードを更新した

表示内容の変更

* fix: fix test message (#115)

* Merge commit (#114)

* ✨ webフォントの追加及び最適化 (#104)

Zen Kurenaidoかわいいですね

* APIのリファクタリング (#107)

* 🔥 定数を置いておくファイルの削除

使わない実装に変更した

* ➕ ts-patternの追加

* ♻️ 汚いAPIの実装を修正

主に型周りを整備した

* [skip ci] auto-fixable format by github-actions

* 📌 バージョンを固定する

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* レイアウトコンポーネントの追加 (#111)

* ♻️ 型定義の修正が漏れていたため修正

* 🚚 ファイル名を変更した

定数を置いておくファイルの削除に伴い修正するのを忘れていたため

* ✨ レイアウトコンポーネントの追加

_app.tsxへの対応は別ブランチで対応予定

* [skip ci] auto-fixable format by github-actions

* ♿️ roleを追加した

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* fix: fix test message

* 🔧 Storybookの設定を変えた

背景色を高専祭のHPの色に

* 📸 snapshotの更新

layoutコンポーネントを毎回使うとテストが落ちるバグの修正

* ⚡️ 整形

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* Update devDependencies (#117)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency next to v12.2.4 (#116)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* buttonコンポーネントを実装 (#120)

* Merge pull request #100 from suzuka-kosen-festa/renovate/dependencies (#103)

* [figma] first site tokens

* generate scss by style-dictionary

* 🤖 auto-fixable format by github-actions

* [skip ci] generate json by style-dictionary

* Update Yarn to v3.2.2

* [skip ci] auto-fixable format by github-actions

* Update devDependencies

* Update devDependencies

* Update dependencies (non-major)

* 🚑️ NextJSが12.2.3にあがったことによる、ESLintのルールが変わったためそれに対応する修正

詳細はchangelog見てください。NextJSの

* fix: fix test message

Co-authored-by: Shoma Kobayashi <60056125+shoma3571@users.noreply.github.com>
Co-authored-by: re-taro <re-taro@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com>

* 🏷️ buttonコンポーネントを<button />以外で使用できるようにする

<a />などの型を使えるようにした

* 🏷️ ButtonPropertiesの追加

boxStyles: button自身のスタイル
textStyles: 内部のテキストに対するスタイル
ref: refは今回なし
as: as={'a'}などで型をオーバーライド

* ✨ Tailwindに初期サイトのトークンを読み込ませる

extendsしているので名前がかぶるとコチラが優先される

* 🚧 wip

* Merge branch 'feature/#63' into dev (#118)

* [figma] first site tokens

* generate scss by style-dictionary

* 🤖 auto-fixable format by github-actions

* [skip ci] generate json by style-dictionary

* Update Yarn to v3.2.2

* [skip ci] auto-fixable format by github-actions

* Update devDependencies

* Update devDependencies

* Update dependencies (non-major)

* 🚑️ NextJSが12.2.3にあがったことによる、ESLintのルールが変わったためそれに対応する修正

詳細はchangelog見てください。NextJSの

* fix: fix test message

* 🚧 wip

* ✨ webフォントの追加及び最適化 (#104)

Zen Kurenaidoかわいいですね

* ✨ webフォントの追加及び最適化 (#104) (#106)

Zen Kurenaidoかわいいですね

* APIのリファクタリング (#107)

* 🔥 定数を置いておくファイルの削除

使わない実装に変更した

* ➕ ts-patternの追加

* ♻️ 汚いAPIの実装を修正

主に型周りを整備した

* [skip ci] auto-fixable format by github-actions

* 📌 バージョンを固定する

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* APIのリファクタリング (#107) (#108)

* ✨ webフォントの追加及び最適化 (#104)

Zen Kurenaidoかわいいですね

* APIのリファクタリング (#107)

* 🔥 定数を置いておくファイルの削除

使わない実装に変更した

* ➕ ts-patternの追加

* ♻️ 汚いAPIの実装を修正

主に型周りを整備した

* [skip ci] auto-fixable format by github-actions

* 📌 バージョンを固定する

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* 🔍️ langを日本語に変更した

なんでenだったんだ???

* ➕ Storybook似必要な依存を追加した

a11yを確認できるアドオンと、emotionのキャッシング

* ✨ フォントをtwin.macroで読み込める形で追加した

IEやSafariでも対応している。はず。

* ✨ Storybookの設定を変更した

静的ファイルを置くディレクトリを指定した

* ✨ 設定したフォントや、twin.macroようにチューニングされたreset cssを読み込ますようにした

unocssを採用する可能性あり

* ✨ typographyコンポーネントを作成した

ダークモード非対応

* 🩹 storiesに値の変更はいらないと感じたので削除した

あくまでカタログ

* 📸 スナップショットの更新

実装が変わったため

* レイアウトコンポーネントの追加 (#111)

* ♻️ 型定義の修正が漏れていたため修正

* 🚚 ファイル名を変更した

定数を置いておくファイルの削除に伴い修正するのを忘れていたため

* ✨ レイアウトコンポーネントの追加

_app.tsxへの対応は別ブランチで対応予定

* [skip ci] auto-fixable format by github-actions

* ♿️ roleを追加した

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* 🚑️ コンフリクトの修正

* レイアウトコンポーネントの追加 (#111) (#112)

* ✨ webフォントの追加及び最適化 (#104)

Zen Kurenaidoかわいいですね

* APIのリファクタリング (#107)

* 🔥 定数を置いておくファイルの削除

使わない実装に変更した

* ➕ ts-patternの追加

* ♻️ 汚いAPIの実装を修正

主に型周りを整備した

* [skip ci] auto-fixable format by github-actions

* 📌 バージョンを固定する

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* レイアウトコンポーネントの追加 (#111)

* ♻️ 型定義の修正が漏れていたため修正

* 🚚 ファイル名を変更した

定数を置いておくファイルの削除に伴い修正するのを忘れていたため

* ✨ レイアウトコンポーネントの追加

_app.tsxへの対応は別ブランチで対応予定

* [skip ci] auto-fixable format by github-actions

* ♿️ roleを追加した

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* ✨ レイアウトコンポーネントを読み込ませる

_app.tsxとpreview.js

* ✅ テストコードを更新した

表示内容の変更

* fix: fix test message (#115)

* Merge commit (#114)

* ✨ webフォントの追加及び最適化 (#104)

Zen Kurenaidoかわいいですね

* APIのリファクタリング (#107)

* 🔥 定数を置いておくファイルの削除

使わない実装に変更した

* ➕ ts-patternの追加

* ♻️ 汚いAPIの実装を修正

主に型周りを整備した

* [skip ci] auto-fixable format by github-actions

* 📌 バージョンを固定する

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* レイアウトコンポーネントの追加 (#111)

* ♻️ 型定義の修正が漏れていたため修正

* 🚚 ファイル名を変更した

定数を置いておくファイルの削除に伴い修正するのを忘れていたため

* ✨ レイアウトコンポーネントの追加

_app.tsxへの対応は別ブランチで対応予定

* [skip ci] auto-fixable format by github-actions

* ♿️ roleを追加した

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* fix: fix test message

* 🔧 Storybookの設定を変えた

背景色を高専祭のHPの色に

* 📸 snapshotの更新

layoutコンポーネントを毎回使うとテストが落ちるバグの修正

* ⚡️ 整形

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* Update devDependencies (#117)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency next to v12.2.4 (#116)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: Shoma Kobayashi <60056125+shoma3571@users.noreply.github.com>
Co-authored-by: re-taro <re-taro@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com>

* 🔧 tailwindの設定を変更した

* 🏷️ buttonコンポーネントのモデルを作成

* ✨ design tokenに対応したスタイルに変更した

コンフリクト原因

* ✨ contextの修正

テスト内容がややわかりにくい文面になっていた、またそれに対応してsnapshotも更新される

* ✨ buttonコンポーネントを実装

型定義が曖昧だがこうするしかなかった。他にいい方法があったらリファクタリングする

* ✨ storiesの追加

button以外に変換するとスタイルがずれるバグを確認

* ✅ testを追加

* 📸 snapshotを更新

* ⚡️ 整形

* ✨ フォントをboldにした

見づらかったので

* 📸 snapshotを更新した

* ✨ storiesのタイトルを付けないことで統一

test用途が多いため冗長と判断

* 🚑️ anchor buttonにした際などにUIが崩れるバグを修正

inline blockにしてあげたら世界は救われる

* ✨ 付与するロールの変更

anchor buttonはa11yの観点から[role=button]であるべきと判断

* 📸 snap shot の更新

* ⚡️ 整形

* ✅ テストの修正

snap shotテストに用いていたnodeがmainでtreeがmain mainになっていてだめになっていた

* ✏️ typoを治す

なんで空白無いんだ愚か者

Co-authored-by: Shoma Kobayashi <60056125+shoma3571@users.noreply.github.com>
Co-authored-by: re-taro <re-taro@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com>

* anchor textコンポーネントを実装した (#125)

* 🩹 testにhref属性の指定を忘れていたので指定した

href="#"

* ✨ anchor textコンポーネントを実装した

textコンポーネントをselect可能にしたもの. p to a

* ✨ Storybookを設定

* ✅ testの設定

* [skip ci] auto-fixable format by github-actions

* ♻️ ディレクトリ名が分かりづらかったため命名し直した

* 📸 snap shotの修正

* 🚚 ファイルの命名規則を守っていなかったため修正

何故気づかない?

* 📸 snapshotを更新

名前変更に伴うもの

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* 著作者がすべて @re-taro になっていたものを、 @suzuka-kosen-festa に変更 (#127)

* 🚚 著作者がすべて @re-taro になっていたものを、 @suzuka-kosen-festa に変更

中央集権型糸川

* 📸 snapshotを更新した

* 🔍️ seo対応  (#128)

* 🍱 faviconやPWA対応用の画像の追加

pwa自体はまだ未対応なため別PRで対応します

* 🤡 headタグをレンダリングするためのmockを作成

vercel/next.js#11060 (comment)

* 🏷️ describeの文章を変更

* 🔍️ seo対応

domainが未定だったためとりあえずで設定されている

* 📸 snapshotの更新

おそらくコンフリクトする

* ✅ headタグのsnapshotを作成するtest

* ✨ 導入してみる

* [skip ci] auto-fixable format by github-actions

* ⚡️ 整形

* 🐛 fragmentを暗黙的に用いることを禁止する

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* Update devDependencies (#131)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency next to v12.2.5 (#130)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* headingコンポーネントを実装した (#133)

* ✨ headingコンポーネントを実装した

textコンポーネント同様スマホ自体でどう動くかは未定義

* ✨ storiesへ追加

* ✅ testの追加

* 📸 snapshotの追加

* [skip ci] auto-fixable format by github-actions

* chore: 整形

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* デザインに合った横幅に変えた (#132)

* ✨ デザインに合った横幅に変えた

* 📸 snapshotを更新した

* ✨ 魔法の力でfont-sizeを完全にレスポンシブにした

スマホサイズが小さすぎる可能性があるが実機で見るまではわからない

* 📸 snapshotを更新

* ⚡️ 整形

* 🔍️ tab-indexの追加とそれにともなってsnapshotを更新

* ✨ underlineを不要とし、削除

* mapセクションの実装 (#138)

* 📦️ @types/google.mapsを追加

* ✨ mapコンポーネントを実装

GOOGLE_MAP_API_KEYは @re-taro に聞いてください

* ✨ storiesの追加

* ✅ testの追加

* 📸 snapshotの追加

* 🔥 remove keep file

* ⚡️ 整形

* ✨ mapセクションの実装

位置調整などは最後までできるようにしてあります

* ✨ storiesの追加

* ✅ testの追加

* 📸 snapshotの追加

* [skip ci] auto-fixable format by github-actions

* ⚡️ 整形

* 🐛 誤って削除していた型情報を修正

* 👷 GOOGLE_MAP_API_KEYを追加

chromatic上でGoogle Mapを確認するため

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* Footerの作成 (#123)

* Update: yarn.lockを更新

* Add: footer用ファイルを生成した

* Update: Text&footerタグを適用

* Update: コンポーネントをexport

* Update: 不要だったので外した

* Update: 余白の追加 #60

* Update: 不要なreturnの削除#60

* Update: textコンポーネントの適用 #60

* Create: .storiesの追加 #60

* Update: 表記の変更#60

* Create: テストの追加 #60

* Create: スナップショットファイルの追加#60

* Update: Footerを下部に固定 #60

* Update: footerを横に引き伸ばし #60

* Update: 枠内の余白を調整 #60

* Update: 不要なpropの削除

Co-authored-by: Rintaro Itokawa <me@re-taro.dev>

* Update: 不要なpropの削除 #60

* Update テストの追加 #60

* Update: 位置固定を削除 #60

* fix: 構文の変更#60

* fix: テストの修正 #60

* Update: layoutに組み込み #60

* Fix: パスの指定とインポートの順番を修正

* Delete: atomsに移動する

* Create: footerを移動

* Update: atomsからインポートに変更

* Update: 不要なimportの削除

* Update: organismsに戻した

* Update: import場所を変更

* Fix: テストを修正

* Update: roleを付与 #60

* Update: テストの追加 #60

* Update: スナップショットの更新 #60

* Update: リンクテキストに変更 #60

* Update: snapshotsの更新 #60

* ✅ testをキャッシュ無しで走らせるようにする

動作が遅くなるが仕方がない

* 🔥 keepファイルを削除

* ✨ storiesを修正

argsをObjectに分ける

* 📸 snapshotを更新する

* ♻️ footerをリファクタリング

依存を薄くする

* [skip ci] auto-fixable format by github-actions

* 🚑️ propertiesをもたせるのを忘れていました

**切腹**

* 🔍️ linkに対してつけるべきオプションをつけ忘れた

target={"_blank"}のときはnoopener noreferrerをつける

* 👷 CIを更新した

できる限り厳密に環境を再現したかったから

* 👷 CIの引数を修正

* 🚧 wip

* 📝 ドキュメントの削除

* ⏪️ revert

* 🚑️ ubuntuだと発生するバグのようだ

* 🐛 愚かな糸川は変える場所を間違えてた

1ac1551

* ✅ testを修復した

cacheを恨む

* ✅ testを更新した

roleセレクタが曖昧だった

* [skip ci] auto-fixable format by github-actions

* FIx: ubuntuに戻した

* Fix: argsの修正

* Fix: AnchorTextを呼び出す際の引数の追加

* Update: snapshotの更新

* Fix: propの順番を変更

* Update: snapshotを更新

* Update: snapshotの更新

* Update: paddingを可変に

* Update: 行の高さを揃えた

* Fix: 空白があったので消した

* Update: snapshotの更新

* ✨ paddingの修正

paddingは比率を合わせるため100vwをcalcで良い感じに調整してください。またpadding top bottomさえ指定されていたら良かったので変更しました

* 📸 snapshotを更新

Co-authored-by: Rintaro Itokawa <me@re-taro.dev>
Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* mobileの文字サイズを大きくした (#142)

* ♻️ mobileの文字サイズを大きくした

SEO的に12pxを切るのは好ましくない

* [skip ci] auto-fixable format by github-actions

* ⚡️ 整形

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* heroセクションの実装 (#140)

* 🍱 heroセクションで使う背景画像とRe:ROADのロゴを追加

ファイルサイズは極限まで落としました

* 🔧 next exportを用いるため、next/imageが使えない

「このエラーうざいな、粛清」

* ✨ heroセクションの実装

CSS芸をしているためレビューお願いします

* ✨ storiesを追加

* ✅ testを追加

* 📸 snapshotの追加

* 🚚 optionsの名前を変更した

一つしか無いので局所名でいい

* ✨ layoutにheroを追加

* ⚡️ 整形

* ⚗️ logoの縦横を決定してFCPを上げた

* [skip ci] auto-fixable format by github-actions

* ⚡️ 整形

* ✨ font-sizeの変更

それに伴うsnapshotの更新

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* 今年のテーマ「Re:ROAD」についてのセクションの実装 (#144)

* ✨ 今年のテーマ「Re:ROAD」についてのセクションの実装

* ✨ storiesの追加

* ✅ testを追加

* 📸 snapshotの追加

* ⚡️ 整形

* 鈴鹿高専についてのセクションの実装 (#143)

* Update: about-sectionのpropertiesを追加

* Create: about-sectionを実装

* Create: storiesの追加

* Create: テストの追加

* Create: snapshotの追加

* Fix: 愚かな誤変換を討伐

* Fix: Buttonの愚かな改悪を修正

* Fix: 不要なインポートを削除

* Update: snapshotの更新

* Update: snapshotの更新

* Fix: option名を変更

* 🚑️ mergeを間違えた

HeroSectionPropertiesが吹き飛んでいた

* Update: propertiesとchildrenの型の修正

* Update: Button内のテキストであることを明示

* Update: 不要なcssの削除

* Update: snapshotの更新

* Update: テストの追加

Co-authored-by: Rintaro Itokawa <me@re-taro.dev>

* お問い合わせセクションの実装 (#145)

* ✨ お問い合わせセクションの実装

* ✨ storiesの追加

* ✅ testの追加

* 📸 snapshotの追加

* [skip ci] auto-fixable format by github-actions

* ⚡️ 整形

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* Update devDependencies (#147)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* snsセクションを実装  (#150)

* ✨ hero sectionはセクションだがコンテンツモデル的にheaderと同格と判断

section -> header

* ✨ twitterの埋め込みの作成

* 🔧 lintのsecretsになりうる箇所へのエラーを廃止

* ✨ storiesの追加

* ✅ testの追加

* 📸 snapshotの追加

* ✨ snsセクションを実装

Instagramは @re-taro に権限が与えられていなかったため実装不可能

* ✨ storiesの追加

* ✅ testの追加

* 📸 snapshotの追加

* 協賛企業セクションの実装 (#149)

* Update: Propertiesの追加

* Create: sponsor-sectionの実装

* Create: テストを追加

* Create: storiesを追加

* Create: snapshotを追加

* Fix: 型用意されてるの使わないとか愚か?

* Update: sponsorsを配列に変更

* Update: 企業一覧をリストで再実装

* Update] snapshotの更新

* Update: 不要な要素の削除

* Update: リストの書き方を変更

* Update: 汚染を破壊

* Update: テストの追加

* Fix: テストの内容を修正

* Update: snapshotの更新

* Update: 整形

* Update: snapshotの更新

* PWA対応 (#152)

* Add: next-pwaを導入

* Update: PWA用の設定を追加

* Update: issueの解決されているversionを使う

* Update: ignoreの更新

* Fix: next-pwaのバージョンを下げた

* Create: manifestを生やした

* Update: Headの中身を戻した

* Remove: manifestを統一

* Update: manifest変更に伴いパスの変更

* Update: snapshotの更新

* Update: manifestをseoに戻した

* Update: manifestのパスを変更

* Update: snapshotの更新

* Update: manifestは読み込まれたので消した

* Update: 重複しているmetaの削除

* Update: snapshotの更新

* β版のUIの作成 (#153)

* ✨ space-yを指定

それに伴ってsnapshotを更新

* Twitterコンポーネントのレスポンシブ化及びFCPの改善

width: 300px以下のスマホへの動作保証はありません。

* ✨ β版のUIの作成

* 👷 chromaticへの登録をstoriesの変更ではなくcomponents自体の変更時に発火させるようにした

storiesの変更時というのはあまり本質的じゃない

* ✨ anchor textを統一した

* ✨ 余分なwidth: screenを消去した

* [skip ci] auto-fixable format by github-actions

* ✨ URLを更新した

* ⚡️ 整形

Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* Update Yarn to v3.2.3 (#154)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* 🔧 buildコマンドを更新した (#159)

* Update devDependencies to v29 (major) (#157)

* Update devDependencies to v29

* update: add babel dependence

* [skip ci] auto-fixable format by github-actions

* format code

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Rintaro Itokawa <me@re-taro.dev>
Co-authored-by: re-taro <re-taro@users.noreply.github.com>

* Update dependencies (non-major) (#156)

* Update dependencies (non-major)

* feat: Cloudflareを用いた最適化への対応

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Rintaro Itokawa <me@re-taro.dev>

* feat: Google tag managerを埋め込むためのscriptやセレクタを実装した (#165)

* chore: @types/gtag.jsを追加

* feat: Google tag managerを埋め込むためのscriptやセレクタを実装した

* chore: 住所をセレクタブルにした

* chore: Google tag managerを_app.tsxで読み込んだ

* chore: Buttonイベントの取得

* chore: snapshotの更新

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: re-taro <re-taro@users.noreply.github.com>
Co-authored-by: Shoma Kobayashi <60056125+shoma3571@users.noreply.github.com>
Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: Shunta Yamagiwa <62200647+Sansai-snct@users.noreply.github.com>
  • Loading branch information
6 people committed Sep 9, 2022
1 parent badf809 commit 5b86ec4
Show file tree
Hide file tree
Showing 9 changed files with 91 additions and 4 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"@testing-library/react": "13.3.0",
"@testing-library/user-event": "14.4.3",
"@types/google.maps": "3.49.2",
"@types/gtag.js": "^0.0.11",
"@types/node": "17.0.21",
"@types/react": "18.0.17",
"@types/react-dom": "18.0.6",
Expand Down
10 changes: 9 additions & 1 deletion src/components/organisms/about-section/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react";
import tw from "twin.macro";
import { sendTransitionToOutsideOfHomepage } from "../../../infrastructures/gtm";
import { AboutSectionProperties } from "../../../models";
import { Button } from "../../atoms/button";
import { Heading } from "../../atoms/heading";
Expand All @@ -11,7 +12,14 @@ const AboutSection: React.FC<AboutSectionProperties> = ({ buttonText, children,
<AboutSectionContainer aria-label={"鈴鹿高専について"}>
<Heading>{title}</Heading>
<Text>{children}</Text>
<Button as="a" href={link} target={"_brank"} rel={"noopener noreferrer"} role={"button"}>
<Button
as="a"
href={link}
target={"_brank"}
rel={"noopener noreferrer"}
role={"button"}
onClick={() => sendTransitionToOutsideOfHomepage("go_to_the_homepage_of_our_college_of_technology")}
>
{buttonText}
</Button>
</AboutSectionContainer>
Expand Down
10 changes: 9 additions & 1 deletion src/components/organisms/contact-section/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react";
import tw from "twin.macro";
import { sendTransitionToOutsideOfHomepage } from "../../../infrastructures/gtm";
import { ContactSectionProperties } from "../../../models";
import { Button } from "../../atoms/button";
import { Heading } from "../../atoms/heading";
Expand All @@ -11,7 +12,14 @@ const ContactSection: React.FC<ContactSectionProperties> = ({ buttonText, title,
<ContactSectionContainer aria-label={"お問い合わせ"} {...rest}>
<Heading>{title}</Heading>
<Text>{children}</Text>
<Button as={"a"} href={link} target={"_blank"} rel={"noopener noreferrer"} role={"button"}>
<Button
as={"a"}
href={link}
target={"_blank"}
rel={"noopener noreferrer"}
role={"button"}
onClick={() => sendTransitionToOutsideOfHomepage("jump_to_inquiry_form")}
>
{buttonText}
</Button>
</ContactSectionContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports[`(components) organisms/map-section take snap shot 1`] = `
class="twin-takigz-MapBox eo5dcy0"
>
<p
class="twin-n0izib-Text-MapSection epv4mo00"
class="twin-x4zvw-Text-MapSection epv4mo00"
>
510-0294 三重県鈴鹿市白子町
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/map-section/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const MapSection: React.FC<MapSectionProperties> = ({ center, children, label, t
<MapSectionContainer aria-label={"アクセス"} {...rest}>
<Heading>{title}</Heading>
<MapBox>
<Text css={tw`whitespace-pre-wrap`}>&#12306;{children}</Text>
<Text css={tw`whitespace-pre-wrap select-text`}>&#12306;{children}</Text>
<Map center={center} title={label} zoom={zoom} />
</MapBox>
</MapSectionContainer>
Expand Down
45 changes: 45 additions & 0 deletions src/infrastructures/gtm/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import Script from "next/script";
import type { FC } from "react";
import type { GoogleTagManagerId, GoogleTagManagerProperties, SendTransitionToOutsideOfHomepage } from "./type/model";

const isGoogleTagManagerId = (value: unknown): value is GoogleTagManagerId => {
if (typeof value !== "string") {
return false;
}

const startPosition = 0;

const endPosition = 4;

return value.slice(startPosition, endPosition) === "GTM-";
};

export const googleTagManagerId = (): GoogleTagManagerId => {
if (isGoogleTagManagerId(process.env.NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID)) {
return process.env.NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID;
}
return "GTM-";
};

export const GoogleTagManager: FC<GoogleTagManagerProperties> = ({ id }) => (
<Script
id="gtm"
strategy="afterInteractive"
dangerouslySetInnerHTML={{
__html: `
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','${id}');
`,
}}
/>
);

export const sendTransitionToOutsideOfHomepage = (label: SendTransitionToOutsideOfHomepage): void => {
window.dataLayer.push({
event: "transition_to_outside_of_homepage",
transition_to_outside_of_homepage_trigger: label,
});
};
15 changes: 15 additions & 0 deletions src/infrastructures/gtm/type/model.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export type GoogleTagManagerId = `GTM-${string}`;

export type GoogleTagManagerProperties = {
id: GoogleTagManagerId;
};

export type SendTransitionToOutsideOfHomepage =
| "jump_to_inquiry_form"
| "go_to_the_homepage_of_our_college_of_technology";

declare global {
interface Window {
dataLayer: Record<string, unknown>[];
}
}
2 changes: 2 additions & 0 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import type { NextPage } from "next";
import type { AppProps } from "next/app";
import React from "react";
import { Layout } from "../components/templates/layout";
import { GoogleTagManager, googleTagManagerId } from "../infrastructures/gtm";
import { GlobalStyles } from "../styles/global";

const App: NextPage<AppProps> = ({ Component, pageProps }) => (
<CacheProvider value={cache}>
<GlobalStyles />
<GoogleTagManager id={googleTagManagerId()} />
<Layout>
<Component {...pageProps} />
</Layout>
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6123,6 +6123,13 @@ __metadata:
languageName: node
linkType: hard

"@types/gtag.js@npm:^0.0.11":
version: 0.0.11
resolution: "@types/gtag.js@npm:0.0.11"
checksum: fe3f0550f609a903fd23b2b7eae2771ad6c9f314c7458320759e8e328b2c148b7d3bff0462d05e3ffe6e800dbd4dfacf174cbeb29796b31813a8bb2fbecca1cc
languageName: node
linkType: hard

"@types/hast@npm:^2.0.0":
version: 2.3.4
resolution: "@types/hast@npm:2.3.4"
Expand Down Expand Up @@ -21770,6 +21777,7 @@ __metadata:
"@testing-library/react": 13.3.0
"@testing-library/user-event": 14.4.3
"@types/google.maps": 3.49.2
"@types/gtag.js": ^0.0.11
"@types/node": 17.0.21
"@types/react": 18.0.17
"@types/react-dom": 18.0.6
Expand Down

0 comments on commit 5b86ec4

Please sign in to comment.