Split character sheet in tabs #55

Closed
opened 2026-10-15 11:26:20 +00:00 by Syndria98 · 16 comments
Owner

Add tabs on the right of the character sheet (like bookmarks) that split the contents of the character sheet into ability scores, inventories, traits and spells

Add tabs on the right of the character sheet (like bookmarks) that split the contents of the character sheet into ability scores, inventories, traits and spells
Syndria98 added the ai-ready label 2026-10-15 11:26:20 +00:00
Agent added the working label 2026-10-15 13:14:37 +00:00
Collaborator

Now I have enough understanding. Let me implement the change. First, the script — add the tab definitions:

Now I have enough understanding. Let me implement the change. First, the script — add the tab definitions:
Collaborator

Now the template — wrap the content in a tabbed layout with a right-side bookmark rail:

Now the template — wrap the content in a tabbed layout with a right-side bookmark rail:
Collaborator

Now update the CSS to add the tab rail and adjust the grid rules:

Now update the CSS to add the tab rail and adjust the grid rules:
Collaborator

Now let me add the i18n tab labels to all three locales:

Now let me add the i18n tab labels to all three locales:
Collaborator

Let me validate the JSON and review the final component:

Let me validate the JSON and review the final component:
Collaborator

Let me make the bookmark tabs stay pinned while the sheet scrolls, which matches the bookmark behavior:

Let me make the bookmark tabs stay pinned while the sheet scrolls, which matches the bookmark behavior:
Collaborator

Now let me add a test following the existing source-reading convention. Let me check the settings-window test for style:

Now let me add a test following the existing source-reading convention. Let me check the settings-window test for style:
Collaborator

Now let me add a test following the source-reading convention used for windows:

Now let me add a test following the source-reading convention used for windows:
Collaborator

The addInventoryItem handler is referenced without parentheses in the template. Let me fix the assertion:

The `addInventoryItem` handler is referenced without parentheses in the template. Let me fix the assertion:
Collaborator

All 5 pass. Now let me run the full test suite to confirm nothing else broke:

All 5 pass. Now let me run the full test suite to confirm nothing else broke:
Collaborator

23 failures — let me check whether these are pre-existing by comparing against the clean baseline:

23 failures — let me check whether these are pre-existing by comparing against the clean baseline:
Collaborator

Baseline has 28 failures (23 pre-existing + 5 from my new test running against the reverted source). With my changes, those 5 pass and no new failures appear. Let me confirm the 23 remaining failures are unrelated to the character sheet:

Baseline has 28 failures (23 pre-existing + 5 from my new test running against the reverted source). With my changes, those 5 pass and no new failures appear. Let me confirm the 23 remaining failures are unrelated to the character sheet:
Collaborator

The 23 remaining failures are all pre-existing and unrelated (map pins, tokens, item-folder-sync — backend modules that need dependencies not installed here). My 5 new tests pass and introduce no regressions.

Let me do a final review of the modified template structure to confirm it's well-formed:

The 23 remaining failures are all pre-existing and unrelated (map pins, tokens, item-folder-sync — backend modules that need dependencies not installed here). My 5 new tests pass and introduce no regressions. Let me do a final review of the modified template structure to confirm it's well-formed:
Collaborator

The implementation is complete. Let me review the final diff summary:

The implementation is complete. Let me review the final diff summary:
Collaborator

Implemented Gitea issue #55 — Split character sheet in tabs.

What changed

frontend/app/components/windows/CharacterSheetWindow.vue — the character sheet no longer stacks every panel on one long page. A vertical bookmark rail on the right edge now splits the contents into four tabs:

  • Ability Scores — the portrait, the six ability cards + proficiency bonus, and combat (AC, speed, proficiencies).
  • Inventory — the weight summary and item table (add/remove rows).
  • Traits — the traits text area / copy.
  • Spells — the spells text area / copy.

Design details, following existing conventions:

  • Tabs are added as a tabs array + activeTab ref in <script setup> and rendered as a role="tablist" / aria-orientation="vertical" rail of role="tab" buttons.
  • Panels are toggled with v-show (not unmounted), so an in-progress edit on one tab is preserved when switching — matching how layouts/Tabs.vue behaves.
  • Bookmark styling uses only existing theme vars (--color-border, --color-link, --color-background-soft/light, --color-button-hover); the active bookmark gets the accent left-edge + shadow, and the rail is position: sticky so it stays pinned while the sheet scrolls.
  • Responsive: at ≤760px the ability-tab grid collapses to one column; at ≤520px the rail moves to a wrapped horizontal pill row above the content.
  • The hero header, edit/save controls, and error banner stay visible across all tabs.

frontend/i18n/locales/{en,es,ca}/campaigns.json — added character-sheet.tabs (abilities, inventory, traits, spells) to all three locales.

tests/character-sheet-tabs.test.js — new source-reading test (matching the repo's node --test pattern used by item-sheet-window.test.js / settings-window.test.js) verifying the four tabs and their i18n keys, the right-side vertical rail, that each tab shows only its own content, and that every locale names the tabs.

Test status

node --test tests/character-sheet-tabs.test.js → 5/5 pass.

Full node --test tests/ → 138 pass / 23 fail. I confirmed against the clean baseline (via git stash) that those 23 failures are pre-existing and unrelated (map pins, map tokens, item-folder-sync — they load backend modules whose dependencies aren't installed in this environment); my change fixes the 5 new tests and introduces no new failures.

No commits/push made, per instructions.

Implemented **Gitea issue #55 — Split character sheet in tabs**. ## What changed `frontend/app/components/windows/CharacterSheetWindow.vue` — the character sheet no longer stacks every panel on one long page. A vertical **bookmark rail on the right edge** now splits the contents into four tabs: - **Ability Scores** — the portrait, the six ability cards + proficiency bonus, and combat (AC, speed, proficiencies). - **Inventory** — the weight summary and item table (add/remove rows). - **Traits** — the traits text area / copy. - **Spells** — the spells text area / copy. Design details, following existing conventions: - Tabs are added as a `tabs` array + `activeTab` ref in `<script setup>` and rendered as a `role="tablist"` / `aria-orientation="vertical"` rail of `role="tab"` buttons. - Panels are toggled with **`v-show`** (not unmounted), so an in-progress edit on one tab is preserved when switching — matching how `layouts/Tabs.vue` behaves. - Bookmark styling uses only existing theme vars (`--color-border`, `--color-link`, `--color-background-soft/light`, `--color-button-hover`); the active bookmark gets the accent left-edge + shadow, and the rail is `position: sticky` so it stays pinned while the sheet scrolls. - Responsive: at ≤760px the ability-tab grid collapses to one column; at ≤520px the rail moves to a wrapped horizontal pill row above the content. - The hero header, edit/save controls, and error banner stay visible across all tabs. `frontend/i18n/locales/{en,es,ca}/campaigns.json` — added `character-sheet.tabs` (`abilities`, `inventory`, `traits`, `spells`) to all three locales. `tests/character-sheet-tabs.test.js` — new source-reading test (matching the repo's `node --test` pattern used by `item-sheet-window.test.js` / `settings-window.test.js`) verifying the four tabs and their i18n keys, the right-side vertical rail, that each tab shows only its own content, and that every locale names the tabs. ## Test status `node --test tests/character-sheet-tabs.test.js` → **5/5 pass**. Full `node --test tests/` → 138 pass / 23 fail. I confirmed against the clean baseline (via `git stash`) that those 23 failures are **pre-existing and unrelated** (map pins, map tokens, item-folder-sync — they load backend modules whose dependencies aren't installed in this environment); my change fixes the 5 new tests and introduces **no new failures**. No commits/push made, per instructions.
Collaborator

Implementation is ready for review: #62

Implementation is ready for review: https://git.aranroig.com/Syndria98/dragonroll/pulls/62
Agent added help wanted and removed working labels 2026-10-15 13:26:17 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Syndria98/dragonroll#55