Skip to content

Feature/league monteregie/phase3 adjust section admin - #85

Merged
benoitmignault merged 36 commits into
feature/league-monteregie/phase3from
feature/league-monteregie/phase3-adjust-section-admin
Jul 2, 2026
Merged

Feature/league monteregie/phase3 adjust section admin#85
benoitmignault merged 36 commits into
feature/league-monteregie/phase3from
feature/league-monteregie/phase3-adjust-section-admin

Conversation

@benoitmignault

Copy link
Copy Markdown
Owner

This pull request introduces several improvements and refactorings across both the backend (SQL and PHP) and frontend (React and CSS) of the golf league application. The main focus is on enhancing mobile responsiveness, standardizing photo credit display based on device type, and improving database integrity and performance with new indexes and constraints.

Frontend improvements for mobile responsiveness and photo credit:

  • Added logic in HomePage.jsx, Dashboard.jsx, Login.jsx, and PlayerStats.jsx to dynamically display photo credits depending on whether the user is on a mobile device, updating the UI and event listeners accordingly. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

  • Updated CSS for admin and player stats pages to improve mobile layouts, including adjustments for photo credit positioning, dashboard layout, and button placement. [1] [2] [3]

Database schema enhancements:

  • Added foreign key constraints, unique keys, and indexes to the event_players, player_event_history, and round_results tables to improve referential integrity and query performance. Also standardized the use of ON UPDATE CASCADE for related foreign keys. [1] [2] [3] [4]

Backend logic update:

  • Modified add-player.php to assign a new player's previous_position based on the current total number of players, ensuring new players are added to the end of the ranking. [1] [2]

@benoitmignault benoitmignault self-assigned this Jul 2, 2026
Copilot AI review requested due to automatic review settings July 2, 2026 20:54
@benoitmignault benoitmignault added feature javascript Pull requests that update javascript code labels Jul 2, 2026
@benoitmignault
benoitmignault merged commit 01cb4af into feature/league-monteregie/phase3 Jul 2, 2026
2 checks passed
@benoitmignault
benoitmignault deleted the feature/league-monteregie/phase3-adjust-section-admin branch July 2, 2026 20:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the league Montérégie app to improve mobile responsiveness and standardize photo-credit display across key pages, while also tightening DB integrity/performance with new constraints and indexes.

Changes:

  • Frontend: add device-width detection to vary photo credit text and adjust layout/spacing for mobile (Home, Admin, Player Stats).
  • CSS: refine mobile layouts (admin/dashboard, player stats) and reposition photo credit / scroll-to-top UI.
  • Backend/DB: add indexes + foreign keys (with ON UPDATE CASCADE) and adjust player creation to initialize previous_position at the end of the ranking.

Reviewed changes

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

Show a summary per file
File Description
golf.benoitmignault.ca/league-monteregie/src/css/stats.css Adjusts player stats layout and replaces the former generic photo-credit styling with player-stats-specific styling.
golf.benoitmignault.ca/league-monteregie/src/css/index.css Tweaks homepage spacing, footer spacing, scroll-to-top positioning, and adds mobile photo-credit styling wrappers.
golf.benoitmignault.ca/league-monteregie/src/css/admin.css Improves admin mobile layout and adjusts photo-credit/scroll-to-top behavior on smaller screens.
golf.benoitmignault.ca/league-monteregie/src/components/stats/PlayerStats.jsx Adds mobile detection to switch photo-credit text; updates markup placement and heading styling.
golf.benoitmignault.ca/league-monteregie/src/components/HomePage.jsx Adds mobile detection to switch photo-credit text and moves credit display near the bottom of the page.
golf.benoitmignault.ca/league-monteregie/src/components/admin/Login.jsx Adds mobile detection to switch photo-credit text; keeps admin login credit consistent.
golf.benoitmignault.ca/league-monteregie/src/components/admin/Dashboard.jsx Adds mobile detection to switch photo-credit text and reorders scroll-to-top + credit.
api.golf.benoitmignault.ca/table_sql/round_results.sql Adds ON UPDATE CASCADE to FK constraints (integrity alignment).
api.golf.benoitmignault.ca/table_sql/player_event_history.sql Adds unique key + indexes and ON UPDATE CASCADE to improve integrity and query performance.
api.golf.benoitmignault.ca/table_sql/event_players.sql Adds unique key + indexes + foreign keys (with cascades) for integrity and performance.
api.golf.benoitmignault.ca/admin/add-player.php Sets new players’ previous_position based on current player count (end-of-ranking initialization).
Comments suppressed due to low confidence (1)

golf.benoitmignault.ca/league-monteregie/src/css/admin.css:208

  • .admin-photo-credit conserve bottom/right (et z-index) alors que position: fixed a été retiré. Sans position non-statique, bottom/right (et souvent z-index) n'ont pas d'effet, donc le placement risque d'être différent de l'intention (anciennement fixé en bas à droite). Soit remettre un positionnement explicite, soit supprimer ces propriétés pour éviter un style inopérant.
.admin-photo-credit {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    bottom: 60px;
    right: 24px;
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    text-shadow:
        0 1px 2px rgba(0,0,0,0.9),
        0 0 4px rgba(0,0,0,0.6);
    z-index: 5;
}

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

Comment on lines 723 to 730
.scroll-top {
position: fixed;
bottom: 30px;
bottom: 60px;
right: 30px;
width: 55px;
height: 55px;
bottom: 95px;
border: none;
Comment thread api.golf.benoitmignault.ca/admin/add-player.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants