feat: #92 RankBarコンポーネントにランク画像表示を実装#99
Merged
Neon-straySheep merged 1 commit intodevelopfrom Feb 21, 2026
Merged
Conversation
スキルツリー左側のRankBarコンポーネントで、ランク番号(数字)の代わりに ランク画像(rank_tree_0.png~rank_tree_9.png)を表示するように変更。 【変更理由】 - 既存の画像アセットが未使用だった - ユーザー体験向上のため視覚的な表現を強化 【技術的な実装】 - Next.js Image コンポーネントを使用して最適化 - tierIndex(0-9)を基に画像パスを動的生成 - レトロピクセル感を維持するため imageRendering を設定
Contributor
Author
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.

RankBarコンポーネントにランク画像表示を実装
Issue: #92
📝 変更内容の概要
スキルツリー画面左上の
RankBarコンポーネントにおいて、ランク番号(数字)の代わりにランク画像(rank_tree_0.png~rank_tree_9.png)を表示するように実装しました。変更ファイル
frontend/src/features/skill-tree/components/RankBar.tsxImageコンポーネントをインポートfrontend/src/features/dashboard/types/index.tsRank型にrankNumber?: numberフィールドを追加(将来の拡張性のため)frontend/src/features/dashboard/api/mock.tsrankNumberを追加(テスト用)🔧 技術的な意思決定とトレードオフ
採用したアプローチ
Next.js Image コンポーネントの使用
<img>タグより若干重い(ただし最適化のメリットが上回る)動的パス生成(テンプレートリテラル使用)
却下した代替案
1. 静的import + switch文でマッピング
2. RankBadgeコンポーネントの再利用
🧪 テスト戦略と範囲
テスト済み項目
get_errorsで確認済み)/images/ranks/rank_tree_${0-9}.png)意図的にテストしていないこと
onErrorハンドラーで数字表示にフォールバック📸 動作確認の証拠
変更前(数字表示)
開発者ツールで確認した要素:
変更後(画像表示)
確認方法:
npm run dev)/dashboard)またはスキルツリー画面(/skills)にアクセス🔐 セキュリティ考慮事項
tierIndexはMath.min(Math.floor(progress * 10), 9)で0-9に制限されているため、パストラバーサルのリスクなし📋 チェックリスト
🚀 今後の改善案(Optional)
onErrorハンドラーで数字表示に戻すpriorityプロパティを使用して、初回表示を高速化関連Issue/PR
Closes #92