More modifications to the character sheet #64
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?
Now let me make the backend changes (the sheet needs places to keep hit points and hit dice):
Now the styles:
I've implemented both changes. Here's what landed:
Tabs on the window border
frontend/app/components/windows/CharacterSheetWindow.vue<nav class="sheet-tabs">left the sheet body and is now a child of the window wrapper, mounted on the frame:position: absolute; left: 100%against the right border, so the bookmarks hang off the edge of the window like real tabs and stay put while the sheet body scrolls underneath.TAB_RAIL_WIDTH) so the rail has room inside the viewport; below 760px the rail folds into a horizontal strip inside the frame, where there is nothing to overflow into..sheet-layout/.sheet-contentwrappers went away with it.Everything consulted at a glance, under the image
.vitals-panelsits directly under the portrait in its own.character-column: armor class and speed (moved out of the old combat panel), plus the proficiency bonus (moved out of the ability scores panel) and the initiative bonus, in a 2×2 block.current / maxread out over a track that fills to the percentage of its maximum (red for hit points, the accent for hit dice), and both halves are editable inputs in edit mode.proficiencies-panel, heading + text.Backend, so the bars are not decoration
ActorgainedhitPoints { current, max }andhitDice { current, max }(defaults 10/10 and 1/1)./actor/updatetakes both through a smallbarPoolhelper: half a pair keeps the half it did not send, andcurrentnever passes the maximum it ends up with.Object.assignnever resets the pools — note that the module does not carry Foundry's own hit points over; say the word if you want that mapped too.initiative,hit-points,max-hit-points,hit-dice,max-hit-diceadded toen,esandca.Tests
tests/character-sheet-portrait-column.test.js(9 tests): rail mounted on the frame outside the body, the four readouts under the portrait and gone from where they were, both bars bound to their own clamped percentage, initiative from the DEX modifier, pool defaults from the level, model + route clamping, locales.tests/character-sheet-tabs.test.jsupdated for the new rail placement and the renamed panel; its other assertions are untouched.npm testhere: 202 pass, 25 fail — those same 25 (folder,map pins,tokens,item windowstub-loading tests) fail on the base commit too in this checkout; my change adds no failures and no new ones among them.Implementation is ready for review: #70