Skip to content
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

Fix highest rank tooltip being misaligned on mobile #11613

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions resources/js/components/value-display.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ interface Props {
export default function ValueDisplay({ description, label, modifiers, value }: Props) {
return (
<div className={classWithModifiers(bn, modifiers)}>
<div className={`${bn}__label`}>{label}</div>
<div className={`${bn}__value`}>{value}</div>
<div style={{ width: 'max-content' }}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

this breaks description area (like in kudosu section). just add align-items: flex-start to the value-display class instead.

Copy link
Member Author

@Joehuu Joehuu Nov 1, 2024

Choose a reason for hiding this comment

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

That makes the hover/click area confined to the rank (bad for - and one digits as described in OP). I've moved the description out of the new div.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see...? Although might as well position it at the bottom left instead (with data-tooltip-position).

Also, inlining css is generally avoided.

<div className={`${bn}__label`}>{label}</div>
<div className={`${bn}__value`}>{value}</div>
</div>
{description != null && <div className={`${bn}__description`}>{description}</div>}
</div>
);
Expand Down