Skip to content

PM-5402: Stack high rating marker sooner#1972

Open
jmgasper wants to merge 1 commit into
devfrom
PM-5402-1
Open

PM-5402: Stack high rating marker sooner#1972
jmgasper wants to merge 1 commit into
devfrom
PM-5402-1

Conversation

@jmgasper

Copy link
Copy Markdown
Collaborator

What was broken
The prior PM-5402 fix only stacked the rating label after the marker reached 90% of the chart. QA still saw the tourist rating rendered inline and clipped at the right edge.

Root cause
The inline avatar and score need horizontal room to the right of the marker, so a percentage threshold that close to the edge was too conservative. The previous regression test used a shortened distribution that clamped 3664 to the chart end, so it did not cover a high score that sits before the final tenth of the rendered chart.

What was changed
Lowered the right-edge stacking threshold to 80% so high ratings switch to the stacked avatar-over-score layout before the inline badge can run out of space.

Any added/updated tests
Updated the MemberRatingInfoModal regression fixture so the 3664 score is tested against a wider distribution range and still applies the stacked marker layout.

Validation
Passed: yarn lint
Passed: yarn run build (completed with existing CRA build warnings)
Passed: yarn test:no-watch --runTestsByPath src/apps/profiles/src/member-profile/about-me/MemberRatingCard/MemberRatingInfoModal/MemberRatingInfoModal.spec.tsx
Not passed: yarn test:no-watch currently fails in unrelated work, engagements, and wallet-admin suites on dev-era issues outside this profiles change.

What was broken
The prior PM-5402 fix only stacked the rating label after the marker reached 90% of the chart. QA still saw the tourist rating rendered inline and clipped at the right edge.

Root cause
The inline avatar and score need horizontal room to the right of the marker, so a percentage threshold that close to the edge was too conservative. The previous regression test used a shortened distribution that clamped 3664 to the chart end, so it did not cover a high score that sits before the final tenth of the rendered chart.

What was changed
Lowered the right-edge stacking threshold to 80% so high ratings switch to the stacked avatar-over-score layout before the inline badge can run out of space.

Any added/updated tests
Updated the MemberRatingInfoModal regression fixture so the 3664 score is tested against a wider distribution range and still applies the stacked marker layout.
@jmgasper jmgasper requested a review from kkartunov as a code owner June 19, 2026 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant