Repository navigation
feat(web): toggle localized input field languages - #1581
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
sven-n
left a comment
There was a problem hiding this comment.
Thanks, collapsing the translations makes the forms much shorter. Two problems, though:
-
A test breaks (built on current master):
CashShopCatalogPageTests.LocalizedNamesAreDisplayedSearchedAndEdited -> FailedWith the UI culture
zh-CN, the collapsed field only renders#Name_zh-CN, but the test (and an editor) also needs the neutral#Nameinput. Hiding the neutral text whenever the admin panel isn't in English is a usability problem, too: the base value is what every translation falls back to. I'd suggest collapsing to the neutral language plus the selected one (just one field when they're the same), and expanding to all of them. Either way, please make sure the existing tests pass. -
MonsterRespawnTest: the change is unrelated to this PR, and it doesn't work as intended.isMonsterOnMapis computed once, before the loop, while the monster is still dead and off the map, so it staysfalse, and the loop now always waits the full 10 seconds before the final asserts. If you want to fix a flaky respawn test, please re-evaluate the condition inside the loop, e.g.while ((!monster.IsAlive || !map.GetNpcsInRange(SpawnPoint, 1).Contains(monster)) && DateTime.UtcNow < deadline)
and best put that in a separate PR.
Also note that it will conflict in Web/Shared/Properties/Resources.Designer.cs once #1548 is merged, so please rebase then.
Generated by Claude Code
sven-n
left a comment
There was a problem hiding this comment.
Thanks, both points are addressed. Collapsed fields now show the neutral language plus the selected one (or one field when they're the same), so CashShopCatalogPageTests.LocalizedNamesAreDisplayedSearchedAndEdited passes again, and the unrelated MonsterRespawnTest change is reverted.
I built it on current master and ran the tests (all except the slow initialization tests). The only failure was HuntingGroundIsPickedOnTheOwnFloorAsync, a bot test which is flaky on master too and unrelated.
Note: the PR also adds the generated size tests of the lucky coin packets to ServerToClientPacketTests.cs, probably regenerated by your build. They're correct (the packets are on master), but they're unrelated to this change. Next time, please leave regenerated files out unless the PR needs them.
Generated by Claude Code
Summary
Add the option to expand or collapse the language fields.
Expanded
Collapsed