Item modifications #63

Closed
opened 2026-10-15 13:31:55 +00:00 by Syndria98 · 16 comments
Owner
  • Make that on the item tabs, the quantity is not listed. That should be only for the actors inventory.
  • On the sidebar entries, remove the text indicating the type, and rarity and quantity. Instead, color the text of the entry depending on the quality:
  • Common: white
  • Uncommon: green
  • Rare: blue
  • Very rare: purple
  • Orange: legendary
- Make that on the item tabs, the quantity is not listed. That should be only for the actors inventory. - On the sidebar entries, remove the text indicating the type, and rarity and quantity. Instead, color the text of the entry depending on the quality: - Common: white - Uncommon: green - Rare: blue - Very rare: purple - Orange: legendary
Syndria98 added the ai-ready label 2026-10-15 13:31:55 +00:00
Agent added the working label 2026-10-15 14:20:27 +00:00
Collaborator

Let me check how the Foundry module pushes item edits back, and look at the other tests and locales for context.

Let me check how the Foundry module pushes item edits back, and look at the other tests and locales for context.
Collaborator

The picture is clear now. Let me check the remaining locale lines and then implement.

The picture is clear now. Let me check the remaining locale lines and then implement.
Collaborator

Now I'll implement the changes. First the sidebar:

Now I'll implement the changes. First the sidebar:
Collaborator

Continuing with the template change in the items section:

Continuing with the template change in the items section:
Collaborator

Now the scoped styles in the sidebar, next to the item row styles:

Now the scoped styles in the sidebar, next to the item row styles:
Collaborator

Now the item create/edit window — quantity is no longer listed or editable there either:

Now the item create/edit window — quantity is no longer listed or editable there either:
Collaborator

Now drop the two dead locale keys (campaigns.item.quantity, quantity-short) in all three locales — the actor inventory has its own campaigns.character-sheet.quantity key which stays:

Now drop the two dead locale keys (`campaigns.item.quantity`, `quantity-short`) in all three locales — the actor inventory has its own `campaigns.character-sheet.quantity` key which stays:
Collaborator

Update the existing item-window test that still expects quantity:

Update the existing item-window test that still expects quantity:
Collaborator

Now add a dedicated test for the issue:

Now add a dedicated test for the issue:
Collaborator

Now run the test suite:

Now run the test suite:
Collaborator

25 failures — let me check which ones and whether they're related to my change:

25 failures — let me check which ones and whether they're related to my change:
Collaborator

Some failures may be pre-existing. Let me verify the baseline by stashing:

Some failures may be pre-existing. Let me verify the baseline by stashing:
Collaborator

Same 25 failures before and after — all pre-existing. Let me confirm the failure sets are identical and that my touched tests pass:

Same 25 failures before and after — all pre-existing. Let me confirm the failure sets are identical and that my touched tests pass:
Collaborator

Dependencies aren't installed (consistent with the repo's no-install test approach). Final review of the changed files:

Dependencies aren't installed (consistent with the repo's no-install test approach). Final review of the changed files:
Collaborator

Done. Here's a summary of the change for issue #63:

Changes

Quantity gone from item surfaces (only the actors' inventory keeps it):

  • frontend/app/components/windows/ItemSheetWindow.vue — removed the Quantity fact from the item sheet (weight stays), and the now-unused quantity from normalizeItem.
  • frontend/app/components/windows/CreateCampaignEntryWindow.vue — removed the quantity input from the item create/edit form and from the payload. The backend defaults quantity to 1 on create and leaves it untouched on update, so Foundry sync (which owns quantity) keeps working untouched.
  • frontend/i18n/locales/{en,es,ca}/campaigns.json — dropped the dead campaigns.item.quantity / quantity-short strings (the character sheet's own campaigns.character-sheet.quantity column label stays).

Sidebar entries colored by rarity (frontend/app/components/partials/ContentSidebar.vue):

  • Removed the category · rarity · Qty N meta line from item rows (itemSummary helper deleted).
  • The item name now carries a rarity-common|uncommon|rare|very-rare|legendary class via a small rarityClass helper; anything else (artifact) keeps the default text color.
  • Colors follow the theme convention: five rarity-* keys added to both maps in frontend/app/assets/css/colors.scss (dark: white / #1eff00 green / #2f81f7 blue / #a855f7 purple / #ff8000 orange, the classic rarity palette; light: darkened equivalents so they stay readable), styled through var(--color-rarity-*).

Tests:

  • New tests/item-rarity-entry.test.js (6 tests) covering the removed meta text, the rarity→class mapping, the per-rarity color rules, both theme maps carrying the colors, quantity surviving only in the character sheet's inventory, and the locales no longer holding the dead keys.
  • Updated tests/item-sheet-window.test.js, which asserted the window rendered form.quantity, to instead assert it renders no quantity.

Verification

npm test (run, not just claimed): 224 tests, 199 pass. The 25 failures are pre-existing — I verified the failing set on HEAD (stash/rerun/diff) is identical to the one after my change (map pins/tokens, item-folder-sync, and one stale v-for="row in itemRows" markup assertion from the earlier folder-tree refactor). My new file and the updated test all pass; none of the failures touch these changes.

Done. Here's a summary of the change for issue #63: ## Changes **Quantity gone from item surfaces** (only the actors' inventory keeps it): - `frontend/app/components/windows/ItemSheetWindow.vue` — removed the Quantity fact from the item sheet (weight stays), and the now-unused `quantity` from `normalizeItem`. - `frontend/app/components/windows/CreateCampaignEntryWindow.vue` — removed the quantity input from the item create/edit form and from the payload. The backend defaults `quantity` to 1 on create and leaves it untouched on update, so Foundry sync (which owns quantity) keeps working untouched. - `frontend/i18n/locales/{en,es,ca}/campaigns.json` — dropped the dead `campaigns.item.quantity` / `quantity-short` strings (the character sheet's own `campaigns.character-sheet.quantity` column label stays). **Sidebar entries colored by rarity** (`frontend/app/components/partials/ContentSidebar.vue`): - Removed the `category · rarity · Qty N` meta line from item rows (`itemSummary` helper deleted). - The item name now carries a `rarity-common|uncommon|rare|very-rare|legendary` class via a small `rarityClass` helper; anything else (artifact) keeps the default text color. - Colors follow the theme convention: five `rarity-*` keys added to **both** maps in `frontend/app/assets/css/colors.scss` (dark: white / `#1eff00` green / `#2f81f7` blue / `#a855f7` purple / `#ff8000` orange, the classic rarity palette; light: darkened equivalents so they stay readable), styled through `var(--color-rarity-*)`. **Tests**: - New `tests/item-rarity-entry.test.js` (6 tests) covering the removed meta text, the rarity→class mapping, the per-rarity color rules, both theme maps carrying the colors, quantity surviving only in the character sheet's inventory, and the locales no longer holding the dead keys. - Updated `tests/item-sheet-window.test.js`, which asserted the window rendered `form.quantity`, to instead assert it renders no quantity. ## Verification `npm test` (run, not just claimed): 224 tests, 199 pass. The 25 failures are **pre-existing** — I verified the failing set on HEAD (stash/rerun/diff) is identical to the one after my change (map pins/tokens, item-folder-sync, and one stale `v-for="row in itemRows"` markup assertion from the earlier folder-tree refactor). My new file and the updated test all pass; none of the failures touch these changes.
Collaborator

Implementation is ready for review: #69

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

No dependencies set.

Reference: Syndria98/dragonroll#63