List / Recommendation でコンテスト種別を指定する#1530
Merged
Merged
Conversation
- `import { React }` (名前付き) を `import React` (デフォルト) に修正。
React はデフォルトエクスポートのため名前付きインポートはビルドが通らず、
実行時も React が undefined になり描画がクラッシュする。
- ListTable のカテゴリフィルタで `classifyContest` に
`Contest | undefined` を渡していた問題を、ガード済みの `row.contest` を
直接渡すよう修正(不要な contestMap ルックアップも削除)。
- Recommendation の `CategoryOptions` を手書きの重複から正準の
`ContestCategories` 由来へ変更し、AWC など新カテゴリの取りこぼしを解消。
- ListPage の merge-like トグルを URL params 連携にし、他フィルタと
同様に共有可能にした(未使用だった FilterParams.mergeLikeContest を活用)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
概要
#1504 (@hotman78) を取り込み、最新の
mainをマージしたうえで/review-branchのレビュー指摘を反映したもの。List ページと Recommendation でコンテスト種別(カテゴリ)によるフィルタを追加する。関連 Issue: #1492 / 元 PR: #1504
レビュー指摘の対応(このPRで修正済み)
import { React }(名前付き)→import React(デフォルト)に修正。React はデフォルトエクスポートのため、名前付きインポートはtsc/react-scripts buildが失敗し、実行時もReactが undefined で描画がクラッシュしていた。(ProblemList.tsx,RecommendController.tsx)ListTableのカテゴリフィルタでclassifyContest()にContest | undefinedを渡していた。ガード済みのrow.contestを直接渡すよう修正し、不要なcontestMapルックアップを削除。CategoryOptionsが手書きの重複(AWC など新カテゴリが欠落)だったため、正準のContestCategories由来に変更し List と一致させた。FilterParams.mergeLikeContestを活用)。残課題(フォローアップ候補・本PRでは未対応)
classifyContestのデフォルトproblemCount=100による分類のずれ(既存の制約。フィルタ文脈で実問題数を渡すのが望ましい)。RecommendController.tsxの merge-like スイッチのラベルに、隣の実験トグルからコピペしたrole="img" aria-label="experimental"が残っており、アクセシビリティ上不正確。スクリーンショット
元 PR #1504 を参照。
🤖 Generated with Claude Code