活動状況ページのソート順を改善(最新の活動日付を優先)#1786
Merged
Merged
Conversation
活動状況ページで、より新しい日付を使ってソートするように修正しました。 これにより、実際に活発な道場がリストの下の方(レビュー不要)に正しく配置されます。 変更前の問題: - 古いイベント履歴がある場合、それが優先されて上位に表示 - 例:和歌山道場は2025年のnote日付があるのに、2017年のイベント履歴で上位表示 変更内容: - latest_event_at、note_date、created_at の中から最も新しい日付を使用 - アクティブな道場、非アクティブな道場の両方に適用 効果: - 和歌山:2017年 → 2025年でソート(正しくリスト下部へ) - つくば:2026年でソート(さらに下部へ) - レビューが必要な古い道場が上位に、活発な道場が下位に正しく配置
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 概要
活動状況ページ(/dojos/activity)のソート順を改善し、実際に活発な道場が正しくリストの下部(レビュー不要)に配置されるようにしました。
🔍 問題の詳細
発見された問題
和歌山道場が活発にもかかわらず、リストの上位に表示されていました:
原因
現在のソートロジックは以下の優先順位で日付を選択:
✅ 解決策
実装内容
より新しい日付を使用してソートするように修正:
改善後の動作
📊 効果
🧪 テスト
💡 レビューポイント
📚 補足
この修正により、実際の活動状況がより正確に反映され、レビューが必要な道場(古い活動日付)が上位に、活発な道場(新しい活動日付)が下位に正しく配置されるようになります。