Skip to content

refactor: solid personal bests modal (@d1rshan)#8009

Open
d1rshan wants to merge 26 commits into
monkeytypegame:masterfrom
d1rshan:refactor/solid-pb-modal
Open

refactor: solid personal bests modal (@d1rshan)#8009
d1rshan wants to merge 26 commits into
monkeytypegame:masterfrom
d1rshan:refactor/solid-pb-modal

Conversation

@d1rshan
Copy link
Copy Markdown
Contributor

@d1rshan d1rshan commented May 23, 2026

  • migrates personal best modal to solidjs, also updates the ux - now all rows show mode2 (dimmed).
  • also fixes ux issues in personal bests modal #7998 (adds overflow-y-contain class to AnimatedModal)
  • renames the PbTable to PbCard in UserProfile.tsx since it is not really a table.

@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label May 23, 2026
Comment thread frontend/src/ts/components/modals/PbTablesModal.tsx Outdated
Comment thread frontend/src/ts/components/modals/PbTablesModal.tsx Outdated
Comment thread frontend/src/ts/components/modals/PbTablesModal.tsx Outdated
@d1rshan
Copy link
Copy Markdown
Contributor Author

d1rshan commented May 27, 2026

Hey @Miodec, what do you think of showing mode2 on every row with full opacity on the first row of each group and lower opacity on the rest? (or maybe showing it on hover)

like this (ie showing on every row with lower opacity):
image

If neither works for you, I can keep the current behaviour. The reason I'm asking is that the Table component makes the existing sticky approach bit awkward without modifying it or using a raw <table>.

@d1rshan d1rshan marked this pull request as ready for review June 3, 2026 07:03
Copilot AI review requested due to automatic review settings June 3, 2026 07:03
@github-actions github-actions Bot added the waiting for review Pull requests that require a review before continuing label Jun 3, 2026
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

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 PbTables modal id and SolidJS modal component (PbTablesModal) built on AnimatedModal + 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.

Comment thread frontend/src/ts/components/modals/PbTablesModal.tsx
Comment thread frontend/src/ts/components/modals/PbTablesModal.tsx
Comment thread frontend/src/ts/components/modals/PbTablesModal.tsx
Comment thread frontend/src/ts/components/modals/PbTablesModal.tsx Outdated
@d1rshan d1rshan marked this pull request as draft June 3, 2026 07:13
@github-actions github-actions Bot removed the waiting for review Pull requests that require a review before continuing label Jun 3, 2026
@d1rshan d1rshan marked this pull request as ready for review June 3, 2026 08:06
@github-actions github-actions Bot added the waiting for review Pull requests that require a review before continuing label Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff waiting for review Pull requests that require a review before continuing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ux issues in personal bests modal

4 participants