Conversation
- マイグレーション追加: 既存の空タイトル投稿(5件)に「無題」を設定
- Post モデルから `set_default_title` コールバックを削除
- タイトルは必須化されたため、自動補完は不要
- タイトルバリデーション: presence: true, length: { maximum: 100 }
この変更は「文通」らしさを強調するUI改善の第一歩です。
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- `rails active_storage:install` を実行 - Post モデルに `has_one_attached :thumbnail` を追加 - 次のステップで投稿フォームに画像アップロード機能を実装予定 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- 投稿フォームに thumbnail ファイルアップロードフィールドを追加 - PostsController の strong parameters に :thumbnail を追加 - タイトルと本文のラベルに「必須」を明記 - タイトルのプレースホルダーとヒントテキストを更新 (自動補完機能は削除済みのため) 次のステップでカード型グリッドレイアウトを実装します。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
投稿一覧を「チャット風」から「文通・書簡風」のデザインに刷新: - 2カラムグリッド(PC)/ 1カラム(スマホ)のレスポンシブレイアウト - カード型デザイン: - サムネイル画像(16:9)または絵文字プレースホルダー(📮) - タイトルを大きく表示(line-clamp-2) - 著者のアバターと表示名、投稿日時 - 本文プレビュー(line-clamp-3) - ホバー時にシャドウ効果 これにより1つ1つの投稿が「手紙」としての重みを持ち、 タイトルと画像で内容が想像できるようになりました。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Tailwind の aspect-[16/9] クラスは Slim で角括弧が属性として 解釈されるため、インラインスタイル aspect-ratio: 16/9 に変更 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
VerificationError発生時もCRLなしで再試行するように修正。 Google::Auth::IDTokens.verify_oidc 内部で発生するSSLエラーが VerificationErrorとしてラップされるケースに対応。 これにより開発環境でのGoogle認証失敗問題を解決。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
便箋に書かれた手紙のような落ち着いた雰囲気を演出: - コンテンツエリアのpadding: 2rem → 4rem(2倍) - 本文の行間: line-height 2.0(1.5倍) - タイトルと本文の余白を拡大(mb-12) - サムネイル画像表示を追加 - 著者情報のアバターサイズとフォントを調整 - 前後ナビゲーションの余白を拡大、ホバーアニメーション追加 - 全体的に余白を増やし、ゆったりとした読書体験を提供 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
## ヘッダー簡素化 - ロゴ + ユーザーアイコンのみの激シンプルデザイン - ドロップダウンメニュー実装(Stimulus使用) - ユーザー名・アイコン表示 - マイページリンク - ログアウトボタン - クリック外側で自動的に閉じる ## Post詳細ページの前後チラ見せ - 前回の投稿を上部にチラ見せ(グレー背景) - 今回の投稿をメインで強調表示 - 次の投稿を下部にチラ見せ(グレー背景) - チラ見せカードにサムネイル・タイトル・本文抜粋を表示 - ボーダーが連結して一体感のあるデザイン 交換日記の連続性が視覚的にわかりやすくなりました! 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
## ヘッダー簡素化 - ロゴ「oobun」を画面左端に配置(コンテナ幅に依存しない) - 右上の要素をすべて削除し、激シンプルなデザインに ## ユーザーアイコンを左下固定 - position: fixed で左下に配置 - アイコンサイズ: 12x12(大きめ) - 白いボーダーと影を追加して目立つように ## ドロップダウンメニュー - アイコンのすぐ上に表示 - アイコンと4px重なる配置で一体感を演出 - メニュー内容: - ユーザー名・@username表示 - マイページリンク - ログアウトボタン - クリック外側で自動的に閉じる(Stimulus実装) ## ログインボタン - 左下固定に統一 - 丸みのある白背景ボタン コンテンツに集中できるミニマルなUIになりました! 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- ヘッダーのborder-bottomを削除してシンプルに - スレッド戻るリンク「←」をヘッダー内に配置 - content_for :back_linkでページごとにカスタマイズ可能に 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- 前回/次回投稿をメインコンテンツ内に統合(チラ見せ表示) - 通常時opacity 70%、ホバーで100%表示でメイン投稿を引き立てる - レスポンシブ対応: スマホp-8、PCp-16でパディング調整 - ページ上部のナビゲーションリンクをヘッダーに移動 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Summary of ChangesHello @sugiwe, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! このプルリクエストは、ユーザーエクスペリエンスを大幅に向上させるための広範なUI/UX改善を含んでいます。投稿のコンテンツ管理を強化するためにタイトル必須化とサムネイル機能が導入され、投稿一覧と詳細ページのデザインが刷新されました。特に、投稿詳細ページは「手紙」のような読書体験を提供するよう再設計され、全体的なナビゲーションとヘッダーも使いやすさを考慮して見直されています。 Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
このプルリクエストは、投稿詳細ページのUIを「手紙らしい」デザインにリニューアルし、全体的なユーザーエクスペリエンスを向上させるための素晴らしい改善です。Postモデルの拡張、カード型レイアウトの導入、レスポンシブ対応など、多岐にわたる変更が実装されています。コード全体として、意図が明確でよく構造化されています。いくつか、保守性をさらに高めるための提案をさせていただきました。主に、インラインスタイルをTailwind CSSのユーティリティクラスに置き換えることに関するものです。また、認証エラーのハンドリングについて、より安全な実装を検討する余地があるかもしれません。これらの変更は、アプリケーションの品質をさらに高めるものと信じています。素晴らしいお仕事です!
| rescue Google::Auth::IDTokens::VerificationError => e | ||
| Rails.logger.warn "Google ID token verification failed: #{e.message}" | ||
| nil | ||
| # CRL エラーの可能性があるため、CRL なしで再試行 | ||
| verify_google_id_token_without_crl(credential) |
| - else | ||
| .w-full.h-full.flex.items-center.justify-center.text-gray-400.text-sm = current_user.display_name[0] | ||
| / ドロップダウンメニュー(上に表示) | ||
| .absolute.w-48.bg-white.rounded-lg.shadow-lg.border.border-gray-200.py-2.hidden data-dropdown-target="menu" style="left: 10px; bottom: calc(100% - 4px)" |
There was a problem hiding this comment.
インラインスタイル style="left: 10px; bottom: calc(100% - 4px)" が使用されています。このプロジェクトではTailwind CSSが全面的に採用されているようですので、スタイルの一貫性と保守性を高めるために、インラインスタイルではなくTailwindのユーティリティクラスを使用することが推奨されます。Tailwind CSSのJITコンパイラ機能を使えば、left-[10px]やbottom-[calc(100%-4px)]のように任意の値でクラスを生成できます。
.absolute.w-48.bg-white.rounded-lg.shadow-lg.border.border-gray-200.py-2.hidden.left-[10px].bottom-[calc(100%-4px)] data-dropdown-target="menu"
| h1.text-2xl.font-semibold.text-gray-900.mb-4 = @post.title | ||
| / ヘッダー(タイトル・著者) | ||
| header.mb-12 | ||
| h1.text-2xl.font-semibold.text-gray-900.mb-6 style="line-height: 1.5" = @post.title |
|
|
||
| .text-sm.text-gray-800.leading-relaxed.whitespace-pre-wrap = @post.body | ||
| / 本文(手紙の内容) | ||
| .text-base.text-gray-800.whitespace-pre-wrap style="line-height: 2.0" = @post.body |
app/views/threads/show.html.slim
Outdated
| span.text-xs.text-gray-500 = "@#{post.user.username}" | ||
| = link_to thread_post_path(@thread.slug, post), class: "block border border-gray-200 rounded-lg overflow-hidden hover:shadow-lg transition-shadow group" do | ||
| / サムネイル画像 | ||
| .bg-gray-100.flex.items-center.justify-center.overflow-hidden style="aspect-ratio: 16/9" |
CRL関連エラーのみをフォールバックするよう条件分岐を追加し、 トークンの有効期限切れやオーディエンス不一致などの 本来失敗すべき認証が成功してしまうセキュリティリスクを解消。 - crl_related_error? メソッドを追加してエラーメッセージパターンをチェック - CRL関連エラーのみ CRLなしで再試行するよう修正 - その他の検証エラーは nil を返して認証失敗とする 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
コードの一貫性と保守性を高めるため、すべてのインラインスタイルを Tailwind CSSのユーティリティクラスに置き換え。 - application.html.slim: left/bottom → .left-[10px].bottom-[calc(100%-4px)] - threads/posts/show.html.slim: line-height → .leading-9, .leading-loose - threads/show.html.slim: aspect-ratio → .aspect-video 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Slimの`.`省略記法と`data=`ハッシュ記法を同じ行で併用すると
パースエラーが発生する問題を修正。
- `.class` 記法から `div class="..."` 明示記法に変更
- `data={"controller" => "dropdown"}` 形式に統一
- invite機能と同じ記述スタイルに揃える
これにより、ドロップダウンメニューが正常に動作するようになった。
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Summary
主な変更内容
1. Postモデルの拡張
2. Thread詳細ページ
3. Post詳細ページ
4. ヘッダー・ナビゲーション
Test plan
🤖 Generated with Claude Code