WIP: feat: Cosmetic title replaces clickable username on leaderboard #145
Draft
typosaurus
wants to merge 3 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: retoor:master
retoor:master
retoor:typosaurus/ticket-148
retoor:typosaurus/ticket-146
retoor:typosaurus/132-missing-notification-when-another-user-comments-on-a-post-th
retoor:typosaurus/112-expose-level-progress-percentage-in-profile-api-response
retoor:typosaurus/113-fix-badge-names-returning-null-in-profile-endpoint
retoor:typosaurus/138-fix-navigation-bar-link-icons-and-text-appearing-on-separate
retoor:typosaurus/ticket-138
retoor:typosaurus/ticket-135
retoor:typosaurus/ticket-132
retoor:typosaurus/ticket-110
retoor:typosaurus/ticket-116
retoor:typosaurus/ticket-113
retoor:typosaurus/ticket-114
retoor:typosaurus/ticket-111
retoor:typosaurus/ticket-112
retoor:typosaurus/ticket-106
retoor:typosaurus/ticket-104
retoor:typosaurus/ticket-84
retoor:typosaurus/ticket-93
retoor:typosaurus/ticket-73
retoor:typosaurus/ticket-89
retoor:typosaurus/ticket-85
retoor:typosaurus/ticket-86
retoor:typosaurus/ticket-88
retoor:typosaurus/ticket-105
retoor:typosaurus/ticket-95
retoor:typosaurus/ticket-102
retoor:typosaurus/ticket-91
retoor:typosaurus/ticket-90
retoor:typosaurus/ticket-87
retoor:typosaurus/ticket-72
retoor:typosaurus/ticket-81
retoor:typosaurus/ticket-83
retoor:typosaurus/ticket-78
retoor:typosaurus/ticket-74
retoor:typosaurus/ticket-82
retoor:typosaurus/ticket-97
retoor:typosaurus/ticket-99
retoor:typosaurus/ticket-68
retoor:typosaurus/ticket-66
retoor:typosaurus/ticket-75
retoor:typosaurus/ticket-61
retoor:typosaurus/ticket-44
retoor:typosaurus/ticket-57
retoor:typosaurus/ticket-48
retoor:typosaurus/ticket-64
retoor:typosaurus/ticket-94
retoor:typosaurus/ticket-103
retoor:typosaurus/ticket-26
retoor:typosaurus/ticket-71
retoor:typosaurus/ticket-7
retoor:typosaurus/ticket-70
retoor:typosaurus/ticket-10
retoor:typosaurus/ticket-65
retoor:typosaurus/ticket-69
retoor:typosaurus/ticket-67
retoor:typosaurus/ticket-76
retoor:typosaurus/ticket-21
retoor:production
3 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
| a8ba5dee81 |
feat(sveta): Add tests verifying username remains clickable with decorative title badge on leaderboard
Some checks failed
DevPlace CI / test (pull_request) Failing after 58m1s
|
|||
| 8dee1f2ffc |
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
|
|||
| 0b8ea359d9 |
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 |