Skip to content

Add NPC statblock view mode with PNG download#335

Merged
HarmlessHarm merged 8 commits intodevelopfrom
feat/issue-333__view-npc-statblock-download-png
Apr 4, 2026
Merged

Add NPC statblock view mode with PNG download#335
HarmlessHarm merged 8 commits intodevelopfrom
feat/issue-333__view-npc-statblock-download-png

Conversation

@HarmlessHarm
Copy link
Copy Markdown
Collaborator

@HarmlessHarm HarmlessHarm commented Mar 13, 2026

Summary

  • Add eye icon to NPC table to view statblock in a drawer (alongside existing edit icon)
  • Add "View" button to Edit NPC screen for existing NPCs
  • Reuse existing Monster.vue component and PNG export with 1/2 column support
  • Fall back to NPC name for download filename when URL is absent (custom NPCs)

Fixes #333

Test plan

  • Open NPC table, verify eye icon appears next to edit icon
  • Click eye icon, verify statblock opens in drawer
  • Test PNG download from drawer — verify filename uses NPC name
  • Open Edit NPC screen, verify "View" button appears for existing NPCs
  • Test "View" button opens statblock drawer from edit screen
  • Verify 1/2 column layout toggle works in download dialog

@HarmlessHarm
Copy link
Copy Markdown
Collaborator Author

  • Collapse npc actions wrong elipsis
  • Collapsed export action weird

Add eye icon to NPC table and View button to Edit NPC screen that open
the statblock in a drawer with PNG download support, reusing the existing
Monster component and export functionality. Fixes #333
- Move View button to BasicInfo card header and save section (always visible)
- Collapse NPC table action buttons into ellipsis menu with popup proxy
- Add header-right slot to BasicInfo.vue for parent-injected header actions
- Move View button to save section left of Back (no icon)
- View button in BasicInfo header stays right-aligned via slot
The popup proxy was shown on all screen sizes after the statblock view
feature was added. Now inline buttons (View, Edit, Export, Delete) are
shown on screens wider than 575px, and the ellipsis + popup proxy only
appears on smaller screens.
monster.saving_throws can be undefined for NPCs that haven't set any
saving throw proficiencies. Use optional chaining so it safely returns
undefined (falsy) instead of throwing.
@HarmlessHarm HarmlessHarm force-pushed the feat/issue-333__view-npc-statblock-download-png branch from 3b4b4b0 to b68d196 Compare March 21, 2026 11:34
Renders ExportUserContent as a transparent span inside q-item so
Quasar's clickable/close-popup behavior works correctly without
relying on a custom tag override. Removes unused .export-menu-item style.
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 4, 2026

@HarmlessHarm HarmlessHarm merged commit 2b82f3d into develop Apr 4, 2026
3 checks passed
@HarmlessHarm HarmlessHarm deleted the feat/issue-333__view-npc-statblock-download-png branch April 4, 2026 17:38
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