♻️ refactor(game): organize components and migrate to path aliases (v2.3.3) #9
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.
♻️ Refactor organize components and migrate to path aliases
Description
Summary
Refactors the game components architecture by organizing components into logical folders and migrating all relative imports to TypeScript path aliases (
@/features/game/...).Changes
🏗️ Components Organization
Created folder structure:
components/game/- Game-specific components (role-card, flash-button, timer-controls, timer-control-button, item-toggle)components/room/- Room/lobby components (room-info, user-list, mobile-user-list, mobile-user-list-drawer)components/status/- Status components (connection-status, game-info-display)components/controls/- Control components (game-controls)components/- Direct components (loading-spinner, summoner-input)Removed unnecessary folders:
components/ui/- Movedloading-spinnerto rootcomponents/input/- Movedsummoner-inputto root🔄 Import Migration
../,../../) with TypeScript path aliases (@/features/game/...)features/game/to use consistent import pathsTechnical Details
Files Modified:
Components:
components/game/flash-button.component.tsx- Updated importscomponents/game/role-card.component.tsx- Updated importscomponents/game/timer-controls.component.tsx- Updated importscomponents/game/timer-control-button.component.tsx- Updated importscomponents/game/item-toggle.component.tsx- Updated importscomponents/room/room-info.component.tsx- Updated importscomponents/room/user-list.component.tsx- Updated importscomponents/room/mobile-user-list.component.tsx- Updated importscomponents/room/mobile-user-list-drawer.component.tsx- Updated importscomponents/status/connection-status.component.tsx- Updated importscomponents/status/game-info-display.component.tsx- Updated importscomponents/controls/game-controls.component.tsx- Updated importscomponents/loading-spinner.component.tsx- Updated importscomponents/summoner-input.component.tsx- Updated importsScreens:
screens/game-multiplayer.screen.tsx- Updated importsscreens/game-solo.screen.tsx- Updated importsContexts:
contexts/game.context.tsx- Updated importsHooks:
hooks/use-flash-cooldown.hook.ts- Updated importshooks/use-audio.hook.ts- Updated importshooks/use-game-timer.hook.ts- Updated importshooks/use-fetch-live-game.hook.ts- Updated importsConstants:
constants/game.constants.ts- Updated importsBarrel Exports:
components/game/index.ts- Createdcomponents/room/index.ts- Createdcomponents/status/index.ts- Createdcomponents/controls/index.ts- Createdcomponents/index.ts- UpdatedBenefits
✅ Better Organization: Components grouped by functionality
✅ Consistent Imports: All imports use path aliases
✅ IDE Support: Better autocomplete and refactoring
✅ Maintainability: Easier to navigate and understand codebase
✅ Scalability: Easier to add new components in the right place
Testing
Version
2.3.2→2.3.3Breaking Changes
None
Ready to merge 🚀