refactor to astro app #1

Closed
opened 2025-06-05 11:48:48 +02:00 by froxxxy · 14 comments
Owner
No description provided.
Author
Owner

Commit 79831f8 pushed:

  • Initialized Astro project structure with essential config and starter files.
  • Added .cursor as a submodule (with additional unstaged changes present).
  • Removed obsolete files from the previous project setup to avoid conflicts and ensure a clean slate.
  • This commit lays the groundwork for all future development in the new architecture.

Refs #1

**Commit [`79831f8`](https://gitea.schwenk.online/froxxxy/bscscore/commit/79831f82f95c6e7902d25d37774ea0f915811969) pushed:** - Initialized Astro project structure with essential config and starter files. - Added `.cursor` as a submodule (with additional unstaged changes present). - Removed obsolete files from the previous project setup to avoid conflicts and ensure a clean slate. - This commit lays the groundwork for all future development in the new architecture. _Refs #1_
Author
Owner

Commit 501e064 pushed:

  • Added PWA-related files: LICENSE, favicon.ico, icon-192.png, icon-512.png, manifest.json, service-worker.js in public/
  • Deleted legacy favicon.svg
  • Major update to src/pages/index.astro: implements full responsive UI, PWA manifest, service worker registration, and touch/mobile optimizations
  • Added/updated .gitea to track current Gitea issue for workflow compliance

Purpose: Implements PWA support and refactors the main page for the Astro app, aligning with the migration and refactor described in issue #1.

This commit references and advances this issue. See commit for full details.

Commit [501e064](https://gitea.schwenk.online/froxxxy/bscscore/commit/501e064711d195f969fa55941d6d1163facefc73) pushed: - Added PWA-related files: LICENSE, favicon.ico, icon-192.png, icon-512.png, manifest.json, service-worker.js in public/ - Deleted legacy favicon.svg - Major update to src/pages/index.astro: implements full responsive UI, PWA manifest, service worker registration, and touch/mobile optimizations - Added/updated .gitea to track current Gitea issue for workflow compliance Purpose: Implements PWA support and refactors the main page for the Astro app, aligning with the migration and refactor described in issue #1. This commit references and advances this issue. See commit for full details.
Author
Owner

Refactor complete: migrated to full Astro component architecture.

Summary of changes:

  • Extracted all major UI sections into Astro components: NewGame, GameList, GameDetail, GameHistory, Modals, FullscreenToggle.
  • Created MainLayout.astro for global structure and meta tags.
  • Moved all component-specific JS and CSS into their respective .astro files.
  • Cleaned up index.astro to use the new layout and components.
  • Removed obsolete global index.js and index.css files.

Impact:

  • Dramatically improved code organization, maintainability, and scalability.
  • Enables true component-based development and easier future enhancements.
  • Reduces risk of style/logic conflicts and improves developer experience.

Commit: 4816e39c

This fully resolves the migration and refactor described in this issue. 🎉

Refactor complete: migrated to full Astro component architecture. **Summary of changes:** - Extracted all major UI sections into Astro components: `NewGame`, `GameList`, `GameDetail`, `GameHistory`, `Modals`, `FullscreenToggle`. - Created `MainLayout.astro` for global structure and meta tags. - Moved all component-specific JS and CSS into their respective `.astro` files. - Cleaned up `index.astro` to use the new layout and components. - Removed obsolete global `index.js` and `index.css` files. **Impact:** - Dramatically improved code organization, maintainability, and scalability. - Enables true component-based development and easier future enhancements. - Reduces risk of style/logic conflicts and improves developer experience. **Commit:** [4816e39c](https://gitea.schwenk.online/froxxxy/bscscore/commit/4816e39cf78121c596661f5ceae593ee0d8fa2e4) This fully resolves the migration and refactor described in this issue. :tada:
Author
Owner

Commit de07d6e pushed

Summary:

  • Refactored monolithic index.astro into modular Astro components for each screen and modal.
  • Moved all styles to src/styles/index.css.
  • Moved all JS logic to src/scripts/index.js and public/scripts/index.js.
  • Updated event wiring, removed inline handlers, and ensured best practices for maintainability.
  • All components and scripts are now integrated and functional.

Impact:

  • Codebase is now maintainable, modular, and follows Astro best practices.
  • All previous functionality is preserved.

This commit references this issue (Refs #1) and is directly related to the refactor request.

### Commit [`de07d6e`](https://gitea.schwenk.online/froxxxy/bscscore/commit/de07d6e7a26f58a989a56ae359053044fe7fc515) pushed **Summary:** - Refactored monolithic `index.astro` into modular Astro components for each screen and modal. - Moved all styles to `src/styles/index.css`. - Moved all JS logic to `src/scripts/index.js` and `public/scripts/index.js`. - Updated event wiring, removed inline handlers, and ensured best practices for maintainability. - All components and scripts are now integrated and functional. **Impact:** - Codebase is now maintainable, modular, and follows Astro best practices. - All previous functionality is preserved. _This commit references this issue (Refs #1) and is directly related to the refactor request._
Author
Owner

Commit 8384d08 migrates the UI from Astro/vanilla JS to a modular Preact component architecture, removing all legacy code and aligning the project with modern best practices.

Summary of changes:

  • Replaced all .astro components with .jsx Preact components and added corresponding CSS modules.
  • Updated index.astro to use the new App Preact component; removed legacy script and Astro imports.
  • Deleted obsolete .astro component files and main JS logic (src/scripts/index.js, public/scripts/index.js).
  • Updated astro.config.mjs for Preact integration.
  • Updated package.json and package-lock.json to include @astrojs/preact and preact.
  • Updated tsconfig.json for Preact JSX support.
  • Refactored index.css to keep only global resets and utility styles.

This commit addresses and references this issue. If further modularization or cleanup is needed, please specify.

Commit [8384d08](https://gitea.schwenk.online/froxxxy/bscscore/commit/8384d0839360f0b117c928fcfeeb692d1ae4b6c3) migrates the UI from Astro/vanilla JS to a modular Preact component architecture, removing all legacy code and aligning the project with modern best practices. **Summary of changes:** - Replaced all `.astro` components with `.jsx` Preact components and added corresponding CSS modules. - Updated `index.astro` to use the new `App` Preact component; removed legacy script and Astro imports. - Deleted obsolete `.astro` component files and main JS logic (`src/scripts/index.js`, `public/scripts/index.js`). - Updated `astro.config.mjs` for Preact integration. - Updated `package.json` and `package-lock.json` to include `@astrojs/preact` and `preact`. - Updated `tsconfig.json` for Preact JSX support. - Refactored `index.css` to keep only global resets and utility styles. This commit addresses and references this issue. If further modularization or cleanup is needed, please specify.
Author
Owner

Commit b44b013 refactors the filter bar and button styling for the game list view.

Summary of changes:

  • Moved the filter button bar (Alle, Aktiv, Abgeschlossen) from App.jsx to GameList.jsx for better separation of concerns and modularity.
  • Updated GameList.jsx to accept filter and setFilter props, rendering and controlling the filter bar internally.
  • Moved .new-game-button styles to the global stylesheet (index.css) for consistent styling of the "Neues Spiel" button.
  • Ensured filter button styles remain in GameList.module.css and are only used in the game list.
  • Cleaned up related CSS and props for clarity and maintainability.

This improves UI consistency and code maintainability. If further UI or logic changes are needed, please specify.

Commit [b44b013](https://gitea.schwenk.online/froxxxy/bscscore/commit/b44b013f586739082514e76d129dbe346a5cab44) refactors the filter bar and button styling for the game list view. **Summary of changes:** - Moved the filter button bar (Alle, Aktiv, Abgeschlossen) from `App.jsx` to `GameList.jsx` for better separation of concerns and modularity. - Updated `GameList.jsx` to accept `filter` and `setFilter` props, rendering and controlling the filter bar internally. - Moved `.new-game-button` styles to the global stylesheet (`index.css`) for consistent styling of the "Neues Spiel" button. - Ensured filter button styles remain in `GameList.module.css` and are only used in the game list. - Cleaned up related CSS and props for clarity and maintainability. This improves UI consistency and code maintainability. If further UI or logic changes are needed, please specify.
Author
Owner

Commit incoming: Refactored the New Game screen for modern, card-like, dark-themed UI. Removed select dropdowns for previous players, now only datalist+input for player names. Updated paddings, backgrounds, borders, and font sizes for a visually consistent, modern look. See commit details for exact changes.

Commit incoming: Refactored the New Game screen for modern, card-like, dark-themed UI. Removed select dropdowns for previous players, now only datalist+input for player names. Updated paddings, backgrounds, borders, and font sizes for a visually consistent, modern look. See commit details for exact changes.
Author
Owner

Commit c845b0c pushed:

  • Refactored New Game screen to modern, card-like, dark-themed layout
  • Removed select dropdowns for previous players, now only datalist+input for player names
  • Updated paddings, backgrounds, borders, and font sizes for a visually consistent, modern look
  • No logic changes, only markup and style

This addresses the UI/UX requirements for the new game screen. Refs #1.

Commit [`c845b0c`](https://gitea.schwenk.online/froxxxy/bscscore/commit/c845b0cb51551a15db30342823468870ac4a732e) pushed: - Refactored New Game screen to modern, card-like, dark-themed layout - Removed select dropdowns for previous players, now only datalist+input for player names - Updated paddings, backgrounds, borders, and font sizes for a visually consistent, modern look - No logic changes, only markup and style This addresses the UI/UX requirements for the new game screen. Refs #1.
Author
Owner

UI/UX improvement: New Game screen now supports:

  • Prefilling all fields with the last created game's values when entering the screen
  • A 'Felder leeren' (Clear All) button at the top of the form to instantly reset all fields to default values

This makes repeated game entry much faster and more user-friendly. See commit for details. Commit incoming.

UI/UX improvement: New Game screen now supports: - Prefilling all fields with the last created game's values when entering the screen - A 'Felder leeren' (Clear All) button at the top of the form to instantly reset all fields to default values This makes repeated game entry much faster and more user-friendly. See commit for details. Commit incoming.
Author
Owner

Commit d81c375 pushed:

  • New Game form is now prefilled with the last created game's values
  • Added 'Felder leeren' (Clear All) button at the top to reset all fields
  • Improves speed and UX for repeated game entry

Refs #1.

Commit [`d81c375`](https://gitea.schwenk.online/froxxxy/bscscore/commit/d81c375f1e6aefed9040fa0133df6fcebc705040) pushed: - New Game form is now prefilled with the last created game's values - Added 'Felder leeren' (Clear All) button at the top to reset all fields - Improves speed and UX for repeated game entry Refs #1.
Author
Owner

Commit 7cb79f5 fixes the following:

  • Modal overlay now works globally and always overlays the app
  • GameCompletionModal is rendered outside the main container for proper overlay
  • Modal content and buttons are styled using CSS modules
  • Player score layout, color, and button styling on the game detail screen improved
  • Global .modal and .modal.show classes added to index.css

This resolves the modal and game screen styling issues. Please review and close if resolved.

Fixes #1

Commit [7cb79f5](https://gitea.schwenk.online/froxxxy/bscscore/commit/7cb79f5ee3ab1c2d4106f64dfdba020fdff20e0f) fixes the following: - Modal overlay now works globally and always overlays the app - GameCompletionModal is rendered outside the main container for proper overlay - Modal content and buttons are styled using CSS modules - Player score layout, color, and button styling on the game detail screen improved - Global .modal and .modal.show classes added to index.css This resolves the modal and game screen styling issues. Please review and close if resolved. Fixes #1
Author
Owner

Refactor completed and committed in 209df5d9f2.

  • Refactored all components in src/components for Astro, Preact, and general best practices (arrow functions, JSDoc, accessibility, key usage, memoization, etc.)
  • Refactored src/pages/index.astro to use semantic HTML and remove layout elements
  • Cleaned up src/styles/index.css for deduplication and global-only rules

This brings the codebase in line with modern best practices and improves maintainability, accessibility, and clarity.

View commit on Gitea

Fixes #1

Refactor completed and committed in 209df5d9f29374a6a8ea4958f86a7c1d9f28b26c. - Refactored all components in `src/components` for Astro, Preact, and general best practices (arrow functions, JSDoc, accessibility, key usage, memoization, etc.) - Refactored `src/pages/index.astro` to use semantic HTML and remove layout elements - Cleaned up `src/styles/index.css` for deduplication and global-only rules This brings the codebase in line with modern best practices and improves maintainability, accessibility, and clarity. [View commit on Gitea](https://gitea.schwenk.online/froxxxy/bscscore/commit/209df5d9f29374a6a8ea4958f86a7c1d9f28b26c) Fixes #1
Author
Owner

Refactor completed and committed in d1379985f3.

  • Consolidated all modal-related styles into Modal.module.css; ValidationModal.module.css is now deprecated
  • All main action/navigation buttons in NewGame and GameDetail use global .btn/.nav-buttons utility classes
  • Removed duplicate utility classes from component CSS files
  • Fixed .fullscreenToggle class naming for consistency
  • Cleaned up component CSS to only contain component-specific styles
  • Updated GameCompletionModal to use shared modal styles

This ensures DRY, maintainable, and consistent styling across the app.

View commit on Gitea

Refs #1

Refactor completed and committed in d1379985f3a8ce02cad56cb29d715cf84ab47882. - Consolidated all modal-related styles into Modal.module.css; ValidationModal.module.css is now deprecated - All main action/navigation buttons in NewGame and GameDetail use global .btn/.nav-buttons utility classes - Removed duplicate utility classes from component CSS files - Fixed .fullscreenToggle class naming for consistency - Cleaned up component CSS to only contain component-specific styles - Updated GameCompletionModal to use shared modal styles This ensures DRY, maintainable, and consistent styling across the app. [View commit on Gitea](https://gitea.schwenk.online/froxxxy/bscscore/commit/d1379985f3a8ce02cad56cb29d715cf84ab47882) Refs #1
Author
Owner

Commit 429d479 pushed:

  • Implemented score increment functionality directly on the score display in GameDetail.jsx.
  • Deleted obsolete ValidationModal.module.css to finalize style consolidation.

This commit resolves all outstanding tasks for the refactor and adds the requested feature enhancement. Closing the issue.

Commit [`429d479`](https://gitea.schwenk.online/froxxxy/bscscore/commit/429d479) pushed: - Implemented score increment functionality directly on the score display in `GameDetail.jsx`. - Deleted obsolete `ValidationModal.module.css` to finalize style consolidation. This commit resolves all outstanding tasks for the refactor and adds the requested feature enhancement. Closing the issue.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: froxxxy/bscscore#1