logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Namespace Serenity.Localization.Installation.Settings.Editor.Hub.Components

    Classes

    SerenityHubCardStyles

    USS class name constants shared by every Hub card factory, so Slice 6's stylesheet has one stable set of selectors to target instead of each card type inventing its own naming. Follows a BEM-style convention: block (serenity-hub-card), elements (__part), and modifiers (--variant).

    SerenityHubFavoriteToggle

    Corner favorite-toggle star shared by every catalog-backed card factory (SerenityHubToolCard, SerenityHubValidatorCard, SerenityHubOpenToolCard), so the StopPropagation + icon-refresh wiring exists in exactly one place instead of being triplicated (UX feedback batch 9b, following on from batch 9's SerenityHubToolCard-only star). Owns its own root element; a card factory adds Root as its last child and forwards clicks to Toggle().

    Public (not internal) because the test assembly has no InternalsVisibleTo — the same forced widening the view helper classes document.

    SerenityHubMetricCard

    Renders a single SerenityHubStatusRow as a metric card on Home: state, title, message, and — when the row carries a deep link — a hint label into the tool that can fix it. Clicking anywhere on such a card follows that deep link; a card without one renders no hint and stays non-interactive (spec §3, UX feedback #4 — one interaction model, no per-card button).

    SerenityHubOpenToolCard

    Validate-view open-tool card (spec §5.2, design ADR-4a): title and description, opened by clicking anywhere on the card (UX feedback #4 — one interaction model, no per-card button). Deliberately carries no Run button, cached result, or "last run" timestamp — the tool owns its own execution/UX and cannot be reduced to a headless cached report. Carries an optional corner favorite-toggle star (UX feedback batch 9b, extending batch 9's tool-card-only star for consistency): every real open-tool entry gets one, but the constructor tolerates a null favorites the same way SerenityHubValidatorCard does.

    SerenityHubRelativeTimeFormatter

    Formats a UTC timestamp as a short human-readable relative string ("just now", "5 min ago", "2 h ago", "3 d ago") for report-card and metric-card "last run" displays. Pure and side-effect free so it can be unit tested without a validation cache or a running editor.

    SerenityHubToolCard

    Generic catalog-entry card: icon, title, description, click-to-launch, and a favorite-toggle star in the top-right corner (UX feedback batch 9, fix 3; toggle wiring extracted to SerenityHubFavoriteToggle in batch 9b so the Validate view's cards can reuse it). Used by the Create, Browse, and Advanced views, and by Home's recents/favorites rows, which render every entry exactly as the catalog defines it (spec §1, §6) — no view hardcodes its own tool list.

    SerenityHubValidatorCard

    Validate-view report card (spec §5.1, design ADR-4a): shows the last cached result summary and run timestamp for one validator kind. Clicking anywhere on the card runs only that validator and updates only its own cached entry (UX feedback #4 — one interaction model, no per-card button). Never runs on construction — opening the Validate view must not trigger a scan. Carries an optional corner favorite-toggle star (UX feedback batch 9b, extending batch 9's tool-card-only star for consistency): pass favorites for real catalog entries, or omit it (null) for a synthesized card with no backing catalog entry — see SerenityHubValidateView's Catalog Staleness card, which has no launchable menu path and therefore must never be favoritable.

    In this article
    © 2026 Serenity. All Rights Reserved