refactor: solid personal bests modal (@d1rshan)#8009
Conversation
|
Hey @Miodec, what do you think of showing like this (ie showing on every row with lower opacity): If neither works for you, I can keep the current behaviour. The reason I'm asking is that the |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR migrates the “Personal Best Tables” modal from the legacy HTML/CSS + imperative DOM approach to the SolidJS modal system using AnimatedModal and DataTable.
Changes:
- Added a new
PbTablesmodal id and SolidJS modal component (PbTablesModal) built onAnimatedModal+DataTable. - Introduced a small state module to pass the selected PB mode into the modal (
pbTablesMode+showPbTablesModal). - Removed legacy pb tables modal implementation and its associated HTML/CSS.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/ts/states/pb-tables-modal.ts | Adds modal state (selected mode) and a typed show helper for the PB tables modal. |
| frontend/src/ts/states/modals.ts | Registers the new PbTables modal id in the centralized modal id union. |
| frontend/src/ts/modals/pb-tables.ts | Removes the legacy imperative modal implementation (DOM building via insertAdjacentHTML). |
| frontend/src/ts/components/pages/profile/UserProfile.tsx | Updates the profile page to open the new modal via showPbTablesModal. |
| frontend/src/ts/components/modals/PbTablesModal.tsx | Implements the new PB tables modal UI using AnimatedModal and DataTable. |
| frontend/src/ts/components/modals/Modals.tsx | Mounts the new PbTablesModal in the global modals component. |
| frontend/src/ts/components/common/AnimatedModal.tsx | Adds overscroll-y-contain to improve scroll behavior inside modals. |
| frontend/src/styles/popups.scss | Removes legacy modal-specific styles for #pbTablesModal. |
| frontend/src/html/popups.html | Removes the legacy pbTablesModal dialog markup. |

PbTabletoPbCardinUserProfile.tsxsince it is not really a table.