Item modifications #63
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Let me check how the Foundry module pushes item edits back, and look at the other tests and locales for context.
The picture is clear now. Let me check the remaining locale lines and then implement.
Now I'll implement the changes. First the sidebar:
Continuing with the template change in the items section:
Now the scoped styles in the sidebar, next to the item row styles:
Now the item create/edit window — quantity is no longer listed or editable there either:
Now drop the two dead locale keys (
campaigns.item.quantity,quantity-short) in all three locales — the actor inventory has its owncampaigns.character-sheet.quantitykey which stays:Update the existing item-window test that still expects quantity:
Now add a dedicated test for the issue:
Now run the test suite:
25 failures — let me check which ones and whether they're related to my change:
Some failures may be pre-existing. Let me verify the baseline by stashing:
Same 25 failures before and after — all pre-existing. Let me confirm the failure sets are identical and that my touched tests pass:
Dependencies aren't installed (consistent with the repo's no-install test approach). Final review of the changed files:
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-unusedquantityfromnormalizeItem.frontend/app/components/windows/CreateCampaignEntryWindow.vue— removed the quantity input from the item create/edit form and from the payload. The backend defaultsquantityto 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 deadcampaigns.item.quantity/quantity-shortstrings (the character sheet's owncampaigns.character-sheet.quantitycolumn label stays).Sidebar entries colored by rarity (
frontend/app/components/partials/ContentSidebar.vue):category · rarity · Qty Nmeta line from item rows (itemSummaryhelper deleted).rarity-common|uncommon|rare|very-rare|legendaryclass via a smallrarityClasshelper; anything else (artifact) keeps the default text color.rarity-*keys added to both maps infrontend/app/assets/css/colors.scss(dark: white /#1eff00green /#2f81f7blue /#a855f7purple /#ff8000orange, the classic rarity palette; light: darkened equivalents so they stay readable), styled throughvar(--color-rarity-*).Tests:
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.tests/item-sheet-window.test.js, which asserted the window renderedform.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 stalev-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.Implementation is ready for review: #69