Skip to content

Add collapsible statblock preview to custom NPCs in Encounter Builder#338

Merged
HarmlessHarm merged 2 commits into
developfrom
feature/preview_custom_npc_in_encounter_builder
May 25, 2026
Merged

Add collapsible statblock preview to custom NPCs in Encounter Builder#338
HarmlessHarm merged 2 commits into
developfrom
feature/preview_custom_npc_in_encounter_builder

Conversation

@HarmlessHarm
Copy link
Copy Markdown
Collaborator

@HarmlessHarm HarmlessHarm commented May 25, 2026

Summary

  • Custom NPCs in the Encounter Builder now have the same collapsible statblock preview as SRD and Homebrew monsters
  • Clicking the chevron expands the row and renders the full statblock via ViewMonster
  • NPC name remains a router-link to the edit page
  • Full NPC data is fetched lazily on first expand (using the existing get_npc action) and cached to avoid repeat Firebase reads

Test plan

  • Open the Encounter Builder with custom NPCs listed
  • Click the chevron on a custom NPC row — statblock should expand below it
  • Click the chevron again — row should collapse
  • Verify the NPC name is still a clickable link to the edit page
  • Verify SRD and Homebrew expand behaviour is unchanged

Matches the existing SRD/Homebrew expand behaviour: chevron toggles a row
that renders the full statblock via ViewMonster. The NPC name stays a
router-link to the edit page. Data is fetched lazily on first expand and
cached to avoid repeat Firebase reads.
@HarmlessHarm HarmlessHarm force-pushed the feature/preview_custom_npc_in_encounter_builder branch from 7d8703a to 4fb746c Compare May 25, 2026 12:50
@sonarqubecloud
Copy link
Copy Markdown

@HarmlessHarm HarmlessHarm merged commit 8ef97ac into develop May 25, 2026
4 checks passed
@HarmlessHarm HarmlessHarm added the improvement Improvement to existing feature label May 25, 2026
@HarmlessHarm HarmlessHarm deleted the feature/preview_custom_npc_in_encounter_builder branch May 29, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement to existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant