-
-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: improve 'Claimed' column UX in datatable #2986
base: master
Are you sure you want to change the base?
feat: improve 'Claimed' column UX in datatable #2986
Conversation
@@ -34,7 +34,16 @@ private function buildBaseQuery( | |||
?User $user = null, | |||
?int $targetId = null, | |||
): Builder { | |||
$query = Game::with(['system']) | |||
$query = Game::query() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
query()
is just here to move with()
to the next line so line indentation makes sense.
{hasActiveOrInReviewClaims && row.original.game.claimants ? ( | ||
<div className="flex items-center gap-1.5"> | ||
<LuCheck className="size-4" /> | ||
<span className="sr-only">{strings.t_yes}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR makes an improvement to the "Claimed" column and is a soft preparation for migrating the various claims table pages to React, namely with the new component shown in the screenshots below.
Before
After
The game list query now returns the active claimants for the game. In the column itself, a new component called
UserAvatarStack
is used.As the name implies, this component stacks user avatars:
The column's sort order logic is unchanged: it's a simple yes or no. Mobile is unaffected by these changes.