fix(editors): keep the delete danger zone inside the main tab (#36) #43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/delete-inside-main-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?
Closes #36.
The Danger zone card sat below the tab strip, outside
<Tabs>, so it rendered on every tab — a character's Sprites, every record's History — where offering "Delete" makes no sense. Björn's report: it should live inside the main editing tab, the way the project's General page places it.Fix
Moved the danger zone card (and its
ConfirmDialog) from below</Tabs>into the first tab — Character, Location, Lore — after the section body.Tabsonly mounts the active tab's content (the same reason"Sprites arrive"isn't in the markup until you open that tab), so delete now shows on the main tab and nowhere else. The card picks up a top margin the tab panel doesn't provide between its children.ProjectWorkspacePage(the non-tabbed General page Björn cited as the correct shape) already places it right and is untouched.Verification
dotnet test Kagura.slnx→ 689 passing. A new test per editor (Delete_is_offered_only_on_the_main_tab…) asserts delete is present on the main tab and gone once History is active — so a regression back to the old placement fails loudly.Browser, both themes: on a character's History tab the page is just the history panel — no danger zone below it; switching back to the Character tab, the danger zone is there at the end.
🤖 Generated with Claude Code
Summary
Summary
Coverage
Kagura.BlazorAdapter - 85.8%
Kagura.Domain - 97.1%
D04ADFED3A21D401C2764A1D17367E35BEB556CBB3B4B0B74__NonSlugChars_0
Kagura.Infrastructure - 97.1%
n
Kagura.Kernel - 90%
Kagura.Server - 100%
Kagura.UI - 96.1%
Kagura.UseCases - 96.7%
🔮 fufu~ Jibril reviewed your code!
Oh? Oh~ A danger zone that haunted every single tab like a persistent ghost? Fufu~ that's exactly the kind of UI leak I love to hunt down. And this fix is delightful — clean, principled, and backed by understanding of the component contract. ♡
Verdict: ✅ Looks good to me~
I traced every claim in this PR against the source and it all checks out. Let me show you what I found~
The Tabs contract — I read
Tabs.razorand confirmed the lazy-mount claim. Line 25 wraps each panel content in@if (ReferenceEquals(tab, Active)), so inactive tab content is genuinely unmounted, not just hidden. Moving the danger zone into<Tab Title="Character">means it physically cannot render on the Sprites or History tabs. The reasoning in the PR body is not just plausible — it's verified against the actual component. Wonderful~Sibling consistency — All three editors (Character, Location, Lore) get the identical treatment: danger zone +
ConfirmDialogmoved inside the first tab, wrapped in<div class="editor__danger">. The CSS additions are byte-for-byte identical across all three.razor.cssfiles. Clean.The cited sibling —
ProjectWorkspacePage.razoris a non-tabbed flat page where the danger zone naturally sits at the end of the page, once. Correctly left untouched. ♪Tests — One new test per editor, each following the same shape: render → assert "Delete ..." present → click History tab → assert both "Danger zone" and the delete button text are gone. This directly exercises the regression path. If someone ever moves the card back below
</Tabs>, these tests fail loudly.✅ What I liked~
@*comments on the danger zone placement reference issue #36 and the General page precedent. Knowledge preserved in the markup! ♡editor__dangermargin fix is precisely scoped — you noticed the tab panel doesn't provide inter-child spacing and addressed it with a single CSS rule rather than a hacky inline style.Delete_is_offered_only_on_the_main_tab_...) — they read as documentation.Automated review by Jibril · 2026-07-10
CI/CD: passed for head SHA
589cf99(689 tests, 94.6% line / 85% branch coverage) · Local checks: skipped (CI green)