Skip to content

Award XP outside of encounters#334

Merged
HarmlessHarm merged 5 commits intodevelopfrom
feat/issue-332__award-xp-outside
Mar 21, 2026
Merged

Award XP outside of encounters#334
HarmlessHarm merged 5 commits intodevelopfrom
feat/issue-332__award-xp-outside

Conversation

@HarmlessHarm
Copy link
Copy Markdown
Collaborator

@HarmlessHarm HarmlessHarm commented Mar 13, 2026

Summary

  • Enable the "Award XP" button on the campaign Players view by converting isXpAdvancement from a hardcoded false data property to a computed property that checks campaign.advancement !== "milestone"
  • Fix pre-existing bug in calcColspan that referenced undefined this.settings instead of this.userSettings.general
  • Use optional chaining for userSettings.general checks in both templateColumns and calcColspan

Fixes #332

Test plan

  • Verify "XP" button appears in campaign Players toolbar for XP-based campaigns
  • Verify "XP" button is hidden for milestone-based campaigns
  • Verify clicking "XP" opens the Award XP drawer with player selection
  • Verify XP can be awarded to individual, multiple, or all players
  • Verify XP bars update correctly after awarding
  • Verify no errors when userSettings.general is undefined

Split the actions array display into regular and bonus action sections
by filtering on an optional timing field. Bonus actions share the
existing actions[] array; timing: "bonus_action" routes items to a
separate UI section with its own header, add button, and draggable list.

- hk-npc-schema.json: allow timing field on action items
- npcs/Actions.vue: 5-entry config, filtered draggables, timing dropdown
- CardActions.vue: split entity.actions into two labeled sections
- Monster.vue: same split for compendium display
Enable the "Award XP" button on the campaign Players view by converting
isXpAdvancement from a hardcoded false to a computed property that checks
campaign.advancement !== "milestone". Also fix calcColspan referencing
undefined this.settings instead of this.userSettings.general, and use
optional chaining throughout both computed properties.

Refs #332
@HarmlessHarm HarmlessHarm requested a review from Lakeyzer March 13, 2026 16:45
Revert CardActions.vue, Monster.vue, Actions.vue, and hk-npc-schema.json
to develop state — these changes belong to the NPC bonus actions feature,
not to issue #332 (award XP outside encounters).
@HarmlessHarm
Copy link
Copy Markdown
Collaborator Author

Review comments:

  • Not blue button
  • two buttons not toggle for award XP (see add npc to encounter during combat)

@HarmlessHarm HarmlessHarm added feature New feature or request quality of Life and removed feature New feature or request labels Mar 21, 2026
@sonarqubecloud
Copy link
Copy Markdown

@HarmlessHarm HarmlessHarm merged commit fe5e581 into develop Mar 21, 2026
3 checks passed
@HarmlessHarm HarmlessHarm deleted the feat/issue-332__award-xp-outside branch March 21, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant