Repository navigation
feat(profile): proper pages for skins, drinks and custom items - #216
Conversation
A skin's page now shows the skin in the editor's 3D viewer, fed the
owner's own files through a new owner-only GET
/skins/submissions/{id}/files/{filename}, instead of the staff review
sheet with its debug captions. Armour sets switch between sets and show
their inventory icons; books switch covers.
A drink's page shows the potion, the in-game tooltip and the recipe:
ingredients, brewing steps and effects. Drinks with their own texture
now show it on their card and page through GET
/drinks/submissions/{id}/texture.
Custom items are cards like Skins and Drinks, and open inside the tab
(?tab=items&item=<character>/<kit key>) instead of the character's kit
list. GET /profile sends each item's kit_id so the page finds its kit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to This change adds item detail pages for skins, drinks and custom items, backed by owner-only asset endpoints. The visible evidence shows no concrete merge-blocking risk, and tests cover the main access-control paths.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the item page Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The skin page showed the staff review sheet, a server-rendered PNG with
id=… kind=…captions baked in. Clicking a custom item left Profile for the character's bare kit list, which doesn't show the item at all. This PR gives all three item types the same page: a large stage on the left; the name, review state, in-game tooltip and details on the right.Skins. The stage is the editor's 3D viewer (
ModelPreview/ArmorPreviewwith a newstagemode: transparent, fills its box, no upload controls) and opens on the item itself. It's fed the owner's own files through a new owner-onlyGET /skins/submissions/{id}/files/{filename}(.png/.jsononly, nevermeta.json,review_sheet.pngorname_preview.png). Armour sets switch between their sets and show the four inventory icons. Books switch between unsigned and signed. The wardrobe thumbnail stands in while files load or if the viewer fails.Drinks. Large potion, tooltip with lore, then ingredients (catalogue names), brewing steps (cook, distil, age in barrel), effects and colour. Drinks with their own texture had a hanger on their card; the new owner-only
GET /drinks/submissions/{id}/texturereturns the upload, else the shareddrink_texturesfile it reuses.Custom items. Cards like Skins and Drinks, opening inside the tab at
?tab=items&item=<character>/<kit key>. The page shows the character and kit, the state, the tooltip (kit lore, a gap, then the player's lines) and Edit item while the kit is still claimable.GET /profilenow sendskit_idon each item.Removed:
skins/StatusCard,drinks/StatusCard,ProfileCustomItemsListand the frontendgetReviewSheet. The backend review-sheet route stays for staff and Discord.Tests: backend
test_skin_owner_files.pyand twoowner_drink_texturetests; frontendownerFiles.test.tsand a Profile test that opens a custom item and returns with Back. Full suites pass: frontend 2179, backendsrc/api+src/characters+ drinks 677. I checked it in a local lab with real skin and drink files copied from the server: staff, armour set, book on a phone, drinks list and page, custom items list and page.Docs: TF-Minecraft/Docs#189
🤖 Generated with Claude Code