feat: keep AI vehicle labels visible in 'players' name mode#404
Merged
Conversation
Vehicle types are useful identifiers (T-72, BTR, etc.) even when you do not care about individual AI infantry names. In "players" mode the vehicle label is now shown for all vehicles regardless of crew, while infantry AI names stay hidden. "none" still hides everything.
Coverage Report for ui
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Contributor
There was a problem hiding this comment.
Code Review
This pull request modifies the Leaflet renderer to keep vehicle type labels and popups visible when the name display mode is set to 'players', including for AI-controlled vehicles. This allows for vehicle identification without showing names for all AI infantry. The changes include updates to the label drawing logic, the InternalMarkerHandle interface, and popup visibility checks, along with new unit tests. A review comment suggests refactoring a long object initialization for better readability.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
User feedback:
In
playersmode the map now shows vehicle labels (e.g. "T-72 (3)") regardless of crew, while AI infantry names stay hidden. Thenonemode still hides everything, so the existing "hide all labels" escape hatch is preserved.Behaviour matrix
allplayersnoneApplies to both the canvas renderer (default) and the DOM Leaflet renderer (
?renderer=domfallback).Test plan
npm test(1497 tests, includes 2 new ones for theplayers-mode vehicle case and thenonesuppression case)tsc --noEmitcleanplayersmode and disappear innonemode