feat: add projectile labels toggle to hide labels while keeping icons - #533
Merged
Conversation
Adds a 'Projectile labels' checkbox in the View Settings map layers panel that turns off projectile name labels (shooter/projectile) independently while keeping the icons visible. Hiding projectiles entirely was already available via the existing layer toggle. Implements projectileLabelsVisible on the renderer interface, wired through both the DOM (Leaflet) and default canvas renderers, plus i18n and tests. Refs OCAP2/OCAP#95
Coverage Report for ui
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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
Addresses OCAP2/OCAP#95.
Currently projectiles always show their shooter/projectile name label, with no way to keep the icons but hide the labels. This PR adds a "Projectile labels" checkbox in the View Settings Map layers panel.
Changes
ui/src/renderers/renderer.interface.ts— addprojectileLabelsVisible()/setProjectileLabelsVisible()toMapRenderer.ui/src/renderers/leaflet/leafletRenderer.ts(DOM renderer) — signal-backed state + popup open/close; projectile label gating now independent from the briefingmarkerDisplayMode.ui/src/renderers/leaflet/entityCanvasLayer.ts+canvasLeafletRenderer.ts(default canvas renderer) — skip drawing the label text when disabled, while still drawing the icon.ui/src/renderers/mockRenderer.ts— mirror accessor/setter.ui/src/pages/recording-playback/components/ViewSettings.tsx— checkbox UI.ui/src/i18n/locales.ts—layer_projectile_labelsin all 8 languages.ViewSettings.test.tsx,entityCanvasLayer.test.ts.Verification
tsc --noEmitcleanvitest run— 1623 tests pass (75 files)vite buildsucceeds