fix: honor disableKillCount in playback UI (#87)#405
Merged
Conversation
The disableKillCount customize setting was exposed via the API but never consumed by the SolidJS frontend. Hide per-player kill counts in the units list, unit detail card, and stats leaderboard while keeping the per-side totals, matching v2.0 behavior. Also honor disableKillCount even when customize.enabled is false, since it is a privacy toggle rather than a branding option.
Coverage Report for ui
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a privacy toggle to hide kill counts and leaderboards, ensuring the disableKillCount setting is honored even when general customization is disabled. Changes include updates to the useCustomize hook, corresponding unit tests, and conditional rendering logic in the StatsTab and UnitsTab components. Feedback was provided regarding the UnitsTab.tsx file, noting that the SolidJS <Show> component requires a single child element and suggesting the use of fragments and classList for better style management.
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
disableKillCountcustomize setting was exposed via/api/v1/customizebut never consumed by the SolidJS frontend, so it had no visible effect.disableKillCounteven whencustomize.enabledis false, since it's a privacy toggle rather than a branding option (branding fields still requireenabled).Fixes OCAP2/OCAP#87
Test plan
npx vitest run src/hooks/__tests__/useCustomize.test.tsx(added new test for theenabled:false + disableKillCount:truepath)npx vitest run src/pages/recording-playback/(313 tests pass)npx tsc --noEmitcustomize.disableKillCount: true, verify unit row kill chips, detail card KILLS/DEATHS pills, and the leaderboard are hidden, while per-side totals in the Stats tab remain visible.