Refactor BumperPlaceholders and BumperFacts for improved logic and readability
ci / build-backend (push) Successful in 2m15s
ci / build-frontend (push) Successful in 1m7s
ci / tests (push) Successful in 2m33s
ci / sonar (push) Successful in 10m26s

Updated the BumperPlaceholders class to streamline token extraction from texts, enhancing performance and clarity. Modified BumperFacts to initialize slot titles with an empty array instead of a dictionary for better consistency. Renamed methods in BumperResolver for clarity, and refactored GridScheduleGenerator to simplify return logic. Additionally, improved the BumperLinesEditor component by implementing a keyed list for better state management and user experience.
This commit is contained in:
Leonid Pershin
2026-07-27 23:04:15 +03:00
parent 3d2ae20368
commit 1afe01aed8
12 changed files with 159 additions and 113 deletions
@@ -100,7 +100,7 @@ public sealed class BumperResolver(
variant.Id,
linesJson,
posterShowId,
Signature(template, variant.Id, linesJson, posterShowId)
ComputeSignature(template, variant.Id, linesJson, posterShowId)
)
)
);
@@ -210,7 +210,7 @@ public sealed class BumperResolver(
/// и пары шоу в ней нет намеренно: одинаковая заставка на трёх каналах рендерится один раз, а
/// <c>{channel}</c> в тексте разводит их сам собой.
/// </summary>
private static string Signature(
private static string ComputeSignature(
BumperTemplate template,
Guid variantId,
string linesJson,