Skip to content

Fix issue 430#1297

Merged
itsalaidbacklife merged 7 commits intocuttle-cards:mainfrom
Bhcfg:fix-issue-430
Dec 2, 2025
Merged

Fix issue 430#1297
itsalaidbacklife merged 7 commits intocuttle-cards:mainfrom
Bhcfg:fix-issue-430

Conversation

@Bhcfg
Copy link
Copy Markdown
Contributor

@Bhcfg Bhcfg commented Nov 19, 2025

Fixes #430

Summary

Created a reusable BaseOverlay component to consolidate duplicate overlay styles that were previously duplicated across multiple files.

Changes

  • Created src/components/BaseOverlay.vue - A reusable overlay component with consistent styling and slots for header and content
  • Refactored src/routes/game/components/GameUnavailableOverlay.vue to use BaseOverlay
  • Refactored src/routes/game/components/GameOverlays.vue to use BaseOverlay (7 overlays converted)
  • Removed duplicate CSS from both files (36 lines of duplicate code)

Issue number

Please check the following

  • Do the tests still pass?
  • Is the code formatted properly?
  • No new features requiring new tests
  • No documentation changes needed

Please describe additional details for testing this change

The BaseOverlay component consolidates styling from existing overlays. All overlay functionality remains the same, only the implementation changed. To test:

  1. Start a game and trigger various overlays (waiting for game to start, opponent actions, etc.)
  2. Verify overlays display correctly with cream background and chocolate text
  3. Check that all overlay interactions work as before

- Created src/components/BaseOverlay.vue with shared overlay styles
- Refactored GameUnavailableOverlay.vue to use BaseOverlay
- Refactored GameOverlays.vue to use BaseOverlay
- Removed duplicate CSS from both files

Fixes cuttle-cards#430
Copilot AI review requested due to automatic review settings November 19, 2025 15:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses code duplication by creating a reusable BaseOverlay component that consolidates overlay styling previously duplicated across multiple game overlay components.

  • Created a centralized BaseOverlay component with consistent styling and slot-based content injection
  • Refactored 8 existing overlays to use the new BaseOverlay component
  • Removed 36 lines of duplicate CSS code from two files

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/components/BaseOverlay.vue New reusable overlay component with header slot and consistent styling
src/routes/game/components/GameUnavailableOverlay.vue Refactored to use BaseOverlay, removing duplicate CSS
src/routes/game/components/GameOverlays.vue Converted 7 overlays to use BaseOverlay, removing duplicate CSS

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/BaseOverlay.vue Outdated
Comment thread src/components/BaseOverlay.vue Outdated
Bhcfg and others added 2 commits November 24, 2025 20:20
Copilot AI review requested due to automatic review settings December 2, 2025 14:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Contributor

@itsalaidbacklife itsalaidbacklife left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

Comment thread src/components/BaseOverlay.vue Outdated
Copilot AI review requested due to automatic review settings December 2, 2025 15:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI review requested due to automatic review settings December 2, 2025 18:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@itsalaidbacklife itsalaidbacklife added frontend Requires changes to the frontend (vue) client dev experience Improvements to the code base that make it easier/better/more enjoyable to contribute to Cuttle version-patch An update that warrants a bumping the project's patch version (e.g. 4.0.0 => 4.0.1) labels Dec 2, 2025
@itsalaidbacklife itsalaidbacklife merged commit 9c2b9f1 into cuttle-cards:main Dec 2, 2025
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev experience Improvements to the code base that make it easier/better/more enjoyable to contribute to Cuttle frontend Requires changes to the frontend (vue) client version-patch An update that warrants a bumping the project's patch version (e.g. 4.0.0 => 4.0.1)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DevEx]: Define generic BaseOverlay component to apply consistent styles to overlays throughout the app

3 participants