Skip to content

Implement dark mode with medieval grey/brown theme as default for web client#32

Merged
dmccoystephenson merged 5 commits intomainfrom
copilot/implement-dark-mode-default
Feb 16, 2026
Merged

Implement dark mode with medieval grey/brown theme as default for web client#32
dmccoystephenson merged 5 commits intomainfrom
copilot/implement-dark-mode-default

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 16, 2026

  • Implement dark mode for web app
  • Replace purple theme with grey/brown medieval color scheme per user feedback
  • Move login.html inline styles to shared style.css (reviewer feedback)
  • Move .user-info inline styles to style.css (reviewer feedback)
  • Remove redundant clearRect() in canvas drawing (reviewer feedback)
  • Update canvas colors for medieval theme
  • Scope global label styles to .form-group label to avoid layout interference with .policy-section flex rows (reviewer feedback)
  • Run code review and CodeQL checks

Screenshots

Game Page (Medieval Theme):
Medieval Game Page

Login Page (Medieval Theme):
Medieval Login Page


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement dark mode as the default setting for web app Implement dark mode as default theme for web client Feb 16, 2026
@dmccoystephenson dmccoystephenson marked this pull request as ready for review February 16, 2026 00:38
Copy link
Copy Markdown

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

Updates the web client’s UI styling so dark mode becomes the default theme across the login and game pages.

Changes:

  • Updated global stylesheet colors (backgrounds, text, panels, inputs/selects, scrollbar track) for a dark theme.
  • Updated login.html inline styles to match the dark theme.
  • Updated game.html to use a dark user-info bar and to explicitly paint a dark canvas background before drawing.

Reviewed changes

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

File Description
web-client/src/main/resources/templates/login.html Dark-themed inline CSS for the login page (background, container, inputs, error state).
web-client/src/main/resources/templates/game.html Darker user-info bar and canvas background fill to avoid bright flashes/transparent clears.
web-client/src/main/resources/static/css/style.css Dark default styling for the main game UI, including panels, form controls, and canvas container.
Comments suppressed due to low confidence (1)

web-client/src/main/resources/static/css/style.css:81

  • In style.css, headings now use the new accent color #7b8cff, but .info-section still uses the old accent #667eea for its left border. Consider updating this border color (or centralizing accents via a CSS variable) so the theme stays consistent and avoids mixed accent colors.
.info-section {
    background: #2a2a3d;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

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

Comment on lines 5 to 25
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
color: #e0e0e0;
}

.login-container {
background: white;
background: #1e1e2f;
padding: 40px;
border-radius: 15px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
max-width: 400px;
width: 90%;
}
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

login.html duplicates most of the global theme styling (body/container/error/button colors) instead of reusing the shared stylesheet used by game.html. This will make future theme changes require editing both files and increases the risk of visual drift; consider linking /css/style.css here and moving the login-specific rules into the shared CSS (or a small login-only CSS file).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Moved all login page inline styles to the shared style.css and replaced the inline <style> block with a <link> to /css/style.css. Login-specific layout overrides (flexbox centering, no padding) are kept in a minimal inline <style> tag. See fb4fee8.

Comment on lines 11 to 13
<div class="user-info" style="text-align: center; margin-bottom: 20px; padding: 10px; background: #2a2a3d; border-radius: 8px;">
<p style="margin: 5px 0;"><strong>Player:</strong> <span id="currentUsername">Loading...</span></p>
<button onclick="logout()" style="background: #dc3545; color: white; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-weight: bold;">Logout</button>
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

The .user-info element uses a class but still relies on a long inline style attribute for layout and background color. Moving these styles into style.css (e.g., .user-info { ... }) will keep them consistent with the rest of the page theme and reduce inline-style maintenance.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Moved all .user-info inline styles into style.css (including .user-info, .user-info p, and .user-info .logout-button rules). The HTML now uses just class references with no inline style attribute. See fb4fee8.

Comment on lines 297 to 298
// Clear canvas
ctx.clearRect(0, 0, canvas.width, canvas.height);
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

drawMap() now does clearRect() immediately followed by a full-canvas fillRect(). Since the fillRect() overwrites every pixel, the clearRect() is redundant work each frame; removing it would slightly reduce per-frame drawing cost.

Suggested change
// Clear canvas
ctx.clearRect(0, 0, canvas.width, canvas.height);
// Clear canvas by drawing background

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed the redundant clearRect() call since the fillRect() overwrites every pixel. Updated the comment to "Fill canvas with background color" for clarity. See 91cb4db.

@dmccoystephenson
Copy link
Copy Markdown
Member

@copilot abandon purple theme, go for grey and brown for a medieval look

Copilot AI and others added 2 commits February 16, 2026 00:53
… to shared CSS, move user-info inline styles to CSS, remove redundant clearRect

Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 16, 2026

@copilot abandon purple theme, go for grey and brown for a medieval look

Replaced the purple theme with a grey/brown medieval color scheme in fb4fee8. Key colors: dark brown backgrounds (#1a1510, #2b2520, #352f28), gold accents for headings (#c9a96e), warm tan borders (#8b7355), parchment-toned text (#d4cfc8), and earthy brown buttons (#6b5a3e).

Medieval Game Page
Medieval Login Page

Copilot AI changed the title Implement dark mode as default theme for web client Implement dark mode with medieval grey/brown theme as default for web client Feb 16, 2026
Copy link
Copy Markdown

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


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

Comment on lines +240 to +244
label {
display: block;
margin-bottom: 8px;
color: #d4cfc8;
font-weight: bold;
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

The global label { display: block; margin-bottom: 8px; ... } rule will also apply to the game page policy controls (.policy-section is a flex row). This can introduce unintended vertical spacing / layout changes there. Consider scoping these label styles to the login form (e.g., .login-container label or .form-group label) or explicitly overriding in .policy-section label (e.g., margin-bottom: 0;).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Scoped the label rule to .form-group label so it only applies within login form groups and won't interfere with .policy-section flex layout. See 9e97ac5.

@dmccoystephenson
Copy link
Copy Markdown
Member

@copilot address comment

…icy-section flex layout

Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 16, 2026

@copilot address comment

Addressed in 9e97ac5 — scoped label styles to .form-group label to prevent layout interference with the policy controls flex rows.

@dmccoystephenson dmccoystephenson merged commit e41b7fc into main Feb 16, 2026
3 checks passed
@dmccoystephenson dmccoystephenson deleted the copilot/implement-dark-mode-default branch February 16, 2026 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants