feat(scoreboard): dev mode can configure the board without signing in
Creator (2026-10-30): in dev mode the "Show the scoreboard" option must always be available. The block's gate becomes CanUseScoreboard = IsConnected || IsDevelopmentBuild. Signed-out Release still shows the inert block with its "sign in" line; a DEBUG build is fully usable, so the strip can be toggled and previewed before there is an account. IsConnected raises it, so signing in flips it live. Guard: ScoreboardPropertiesTests now asserts the CanUseScoreboard gate (enabled AND hint), and the VM surface list includes it.
This commit is contained in:
@@ -17,13 +17,13 @@ public class ScoreboardPropertiesTests
|
||||
// Gated on the selected layer being a scoreboard.
|
||||
Assert.Contains("SelectedElement.IsScoreboard", panel);
|
||||
|
||||
// Signed out: the whole block is inert (the board is fed by the signed-in channel), with a
|
||||
// one-line explanation. Signing in re-enables it through the ordinary IsConnected raise.
|
||||
// Signed out: the block is inert with a one-line explanation — EXCEPT in a DEBUG build, where
|
||||
// CanUseScoreboard is true so the strip can be previewed without an account.
|
||||
var block = panel[panel.IndexOf("Scoreboard config", System.StringComparison.Ordinal)..];
|
||||
block = block[..block.IndexOf("<!-- Countdown config -->", System.StringComparison.Ordinal)];
|
||||
Assert.Contains("IsEnabled=\"{Binding IsConnected}\"", block);
|
||||
Assert.Contains("IsEnabled=\"{Binding CanUseScoreboard}\"", block);
|
||||
Assert.Contains("Sign in to YouTube to use the scoreboard.", block);
|
||||
Assert.Contains("InverseBoolToVis", block);
|
||||
Assert.Contains("CanUseScoreboard, Converter={StaticResource InverseBoolToVis}", block);
|
||||
|
||||
// The master switch sits in the same panel: off hides the strip and stops the polling.
|
||||
Assert.Contains("ScoreboardEnabled", panel);
|
||||
@@ -57,7 +57,7 @@ public class ScoreboardPropertiesTests
|
||||
{
|
||||
"ScoreboardTextColor", "ScoreboardBackgroundColor", "ScoreboardBackgroundOpacity",
|
||||
"ScoreboardFontSize", "ScoreboardColorOptions", "ScoreboardShowSubscribers",
|
||||
"ScoreboardEnabled",
|
||||
"ScoreboardEnabled", "CanUseScoreboard",
|
||||
})
|
||||
Assert.NotNull(type.GetProperty(name));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user