WIP: feat: Cosmetic title replaces clickable username on leaderboard #158
Draft
typosaurus
wants to merge 4 commits from
typosaurus/134-cosmetic-title-replaces-clickable-username-on-leaderboard into master
pull from: typosaurus/134-cosmetic-title-replaces-clickable-username-on-leaderboard
merge into: :master
:master
:typosaurus/169-implement-links-to-the-official-ios-app-in-the-web-app
:typosaurus/162-add-non-color-indicator-to-vote-button-state
:typosaurus/132-missing-notification-when-another-user-comments-on-a-post-th
:typosaurus/134-cosmetic-title-replaces-clickable-username-on-leaderboard
:typosaurus/157-add-badge-earned-info-to-user-profile-badges-api-response
:typosaurus/ticket-150
:typosaurus/ticket-152
:typosaurus/ticket-148
:typosaurus/ticket-146
:typosaurus/112-expose-level-progress-percentage-in-profile-api-response
:typosaurus/113-fix-badge-names-returning-null-in-profile-endpoint
:typosaurus/138-fix-navigation-bar-link-icons-and-text-appearing-on-separate
:typosaurus/ticket-138
:typosaurus/ticket-135
:typosaurus/ticket-132
:typosaurus/ticket-110
:typosaurus/ticket-116
:typosaurus/ticket-113
:typosaurus/ticket-114
:typosaurus/ticket-111
:typosaurus/ticket-112
:typosaurus/ticket-106
:typosaurus/ticket-104
:typosaurus/ticket-84
:typosaurus/ticket-93
:typosaurus/ticket-73
:typosaurus/ticket-89
:typosaurus/ticket-85
:typosaurus/ticket-86
:typosaurus/ticket-88
:typosaurus/ticket-105
:typosaurus/ticket-95
:typosaurus/ticket-102
:typosaurus/ticket-91
:typosaurus/ticket-90
:typosaurus/ticket-87
:typosaurus/ticket-72
:typosaurus/ticket-81
:typosaurus/ticket-83
:typosaurus/ticket-78
:typosaurus/ticket-74
:typosaurus/ticket-82
:typosaurus/ticket-97
:typosaurus/ticket-99
:typosaurus/ticket-68
:typosaurus/ticket-66
:typosaurus/ticket-75
:typosaurus/ticket-61
:typosaurus/ticket-44
:typosaurus/ticket-57
:typosaurus/ticket-48
:typosaurus/ticket-64
:typosaurus/ticket-94
:typosaurus/ticket-103
:typosaurus/ticket-26
:typosaurus/ticket-71
:typosaurus/ticket-7
:typosaurus/ticket-70
:typosaurus/ticket-10
:typosaurus/ticket-65
:typosaurus/ticket-69
:typosaurus/ticket-67
:typosaurus/ticket-76
:typosaurus/ticket-21
:production
4
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
28ac44927c |
Merge branch 'master' into typosaurus/134-cosmetic-title-replaces-clickable-username-on-leaderboard
DevPlace CI / test (pull_request) Failing after 1h2m14s
|
||
|
|
768a128700 |
feat(sveta): Add tests verifying username remains clickable with decorative title badge on leaderboard
DevPlace CI / test (pull_request) Failing after 1h6m27s
|
||
|
|
5fc1aa9791 |
feat(nadia): Fix frontend rendering to show username as clickable link with decorative title
Outcome: done
Changed: devplacepy/static/css/game.css:249-274
Verified by: `node --check devplacepy/static/js/GameFarm.js` — syntax clean; `python3 -c` CSS brace check — 101/101 balanced, OK. Full test suite not runnable due to Python 3.11 environment (project requires 3.12+); changes are JS/CSS only.
Findings: The JS template (title inside anchor, `${entry.username}${titleHtml}`) was already committed in a6fd91b and is correct. The uncommitted CSS change adds `min-width: 80px` to `.game-lb-name` so the anchor never shrinks to 0px in the 280px sidebar. `.game-lb-title` is restyled as `display: inline-block` with `max-width: 100px; overflow: hidden; text-overflow: ellipsis;` for independent truncation inside the anchor, styled as italic accent badge. The title leading space (`" <span..."`) provides visual separation without CSS margin. No other leaderboard rendering sites exist — all boards share this single JS template path.
Open: none
Confidence: high — root cause confirmed by investigation sibling (flex asymmetry at 280px); JS fix already committed; CSS guards directly resolve the collapse and ensure the title is always decorative, never a replacement.
Typosaurus-Run: b99050b08d5a4dc996c2175d228fe8cf
Typosaurus-Node: 9516bca3c9914bcdab26ec17b52dfa07
Typosaurus-Agent: @nadia
Refs: #134
|
||
|
|
2ce43bc578 |
feat(nadia): Fix data layer to always return username and title
Outcome: done Changed: none Verified by: `python -m py_compile devplacepy/services/game/store/farm.py && python -m py_compile devplacepy/services/game/store/era.py` — both pass (0 exit code) Findings: - `leaderboard()` at farm.py:113-148 returns both `username` and `title` as separate fields in every entry. - `_entry()` at farm.py:149-165 returns both `username` and `title` — all boards using `_ranked_entries()` (prestige, harvests_week, fair_play) inherit both fields. - `leaderboard_raid_efficiency()` at farm.py:226-268 uses `_entry()` and includes both `username` and `title`. - `leaderboard_time_to_kernel()` at farm.py:195-213 uses `_entry()` and includes both `username` and `title`. - `leaderboard_era()` at era.py:131-166 returns both `username` and `title` as separate fields. - No leaderboard function returns `title` as `username` or omits either field — the data layer is fully correct and requires no changes. - Root cause is CSS flex layout (`game.css:81`): `.game-lb-name` (`flex: 1; min-width: 0; overflow: hidden`) shrinks to 0px while `.game-lb-title` (`flex-shrink: 0`) does not shrink. Fix belongs in CSS/template layer. Open: CSS/template fix delegated to a separate leaf node (add `min-width` to `.game-lb-name` or `flex-shrink: 1` to `.game-lb-title`, or restructure template to place title within/before the anchor) Confidence: high - every leaderboard function was read and confirmed to return both `username` and `title` as separate fields; none require changes Typosaurus-Run: b99050b08d5a4dc996c2175d228fe8cf Typosaurus-Node: ad2242c5c3b448eda7073b97d6e565ae Typosaurus-Agent: @nadia Refs: #134 |