refactor(locations): give background Variations their own tab, aligned with a character's Outfits #97
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/location-variations-tab"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A small structural alignment requested after testing: background Variations were tucked under the Backgrounds tab beside the base image. Now they're their own tab on the location editor — mirroring how a character's Outfits sit apart from its Base Appearance.
What changed
LocationEditorPage(Id="variations",Icon="list_alt"— the same icon as Outfits) holding the variations grid. The Backgrounds tab is now just the base image and its tags; its stale "variants arrive in the next slices" hint now points readers to the Variations tab.?tab=variations(was?tab=backgrounds).Verification
Browser-verified the full routing (you asked me to double-check the new links):
…/locations/{id}?tab=variationsactivates the Variations tab directly.Tests updated for the four-tab strip (
Location, Backgrounds, Variations, History) and the new deep-link target. Full suite green (1155) on top of the newly-merged expressions work (#95).🤖 Generated with Claude Code
Summary
Summary
Coverage
Kagura.BlazorAdapter - 90.1%
Kagura.Domain - 93.5%
D04ADFED3A21D401C2764A1D17367E35BEB556CBB3B4B0B74__NonSlugChars_0
Kagura.Infrastructure - 98.3%
n
on
Kagura.Kernel - 90%
Kagura.Server - 90.9%
Kagura.UI - 96.3%
Kagura.UseCases - 96.3%
🔮 fufu~ Jibril reviewed your code!
Oh? Oh! A tab-extraction refactor — Variations stepping out from under Backgrounds' shadow to stand on their own, just like a character's Outfits beside their Base Appearance. Structurally elegant. I approve of the symmetry~ ♪
Verdict: ✅ Looks good to me~
I read all four changed files in full, plus the sibling
CharacterEditorPageand theTabscomponent internals. Everything lines up cleanly. No bugs, no smells, no dead links. Let me show you what I checked~🔍 What I scrutinized (and it survived~)
Deep-link consistency — The breadcrumb in
LocationVariantEditorPage.razornow points to?tab=variations, and the new<Tab>declaresId="variations". TheTabscomponent'sQueryValue/Slugmachinery matches tab byId(falling back to a title slug), so?tab=variationsresolves exactly to this tab. I grepped the whole repo — zero remainingtab=backgroundsreferences. No dangling links~ ♡Structural alignment with the sibling —
CharacterEditorPageis the reference pattern:Base Appearancetab (base image + identity) →Outfitstab (derived grid,Icon="list_alt"). This PR makesLocationEditorPageread:Backgroundstab (base image + base tags) →Variationstab (derived grid,Icon="list_alt"). Same icon, same shape, same ordering relative toHistory. Fufu~ this is exactly right.No content lost in the move — The
<LocationVariants>component moved wholesale from the Backgrounds section into the new tab; the base image (<LocationBackground>) and base<TagAuthoring>stayed on Backgrounds. Nothing was accidentally dropped. The stale hint ("variants arrive in the next slices") was correctly rewritten to point at the Variations tab rather than a future deliverable.Tab-mounting semantics — The
Tabscomponent only renders the active panel's content (inactive tabs are unmounted). TheLocationVariantseffects load on init, so moving it behind its own tab means the variants fetch now happens on first open of the Variations tab rather than on page load. That's a minor behavioral change — arguably a nice lazy-load win — andLocationVariantsTests.cscovers the component independently, so coverage is intact.Test parity with the established pattern — The test updates mirror exactly how
CharacterEditorPageTestshandles the Outfits tab: the four-tab assertion list is updated (Location, Backgrounds, Variations, History), the tab-countWaitForAssertionbumps 3→4, and the deep-link target assertion is updated. The Variations content (theLocationVariantsgrid) has its own dedicated test file (LocationVariantsTests.cs), just as Outfits content does. This is consistent with the project convention — I won't demand an extra click-the-tab test here when the sibling doesn't have one either.✅ What I liked~
@* Variations are their own tab — a grid of backgrounds derived from the base image, like a character's Outfits ... *@) explicitly names the sibling pattern being mirrored. Future readers won't have to guess why the tabs are split. ♡jumps straight to the location's Variations tab) — many PRs fix the code but leave the prose stale. This one didn't.LocationEditorPagesits at 87.8%/70.8% (unchanged tier). I confirmed the changed files are actually exercised by the suite.A clean, well-tested, convention-following refactor. You may merge~ fufu ♡
Automated review by Jibril · 2026-07-12
CI/CD: passed (1155 tests, 96.3% line / 83.3% branch) for head SHA
25f5c3d· Local checks: skipped (CI current and green)