Add NPC groups feature#330
Merged
HarmlessHarm merged 14 commits intodevelopfrom Mar 21, 2026
Merged
Conversation
- Add NPC groups Firebase service and Vuex store module - Add group CRUD management dialog (NpcGroupManager) - Add group assignment in NPC editor via multi-select - Display group membership as chips in NPC table - Add group filter dropdown to NPC list - Cascade group cleanup when deleting a group - Sync groups field to search_npcs for client-side filtering
Groups are user-specific and should not be transferred between accounts. Strip groups during export to keep JSON clean, and during import to avoid AJV schema validation errors.
…ey helper Add toggle to filter custom NPCs by campaign in the encounter entity picker. Extract shared campaignGroupKey() utility to replace hardcoded 'campaign__' prefix across 4 files. Fix router-link using wrong key property (col.key → props.key).
- Add aria-labels to icon-only anchors in NpcGroupManager - Rename npcGroupServices to PascalCase (NpcGroupServices) - Remove redundant try/catch blocks that only rethrow - Replace nested ternary with if/return in visibleColumns
Collaborator
Author
On card_width < 600 the Groups/Export/Generate/Import buttons are replaced by a single ellipsis button with a q-popup-proxy dropdown, positioned after the New NPC button via a new actions-after slot in ContentHeader. Also render the New NPC router-link as a button element for consistent sizing.
Replaces inline campaign toggle and group select with a Filter button matching the SRD pattern. Extends hk-filter with a type="npc" branch (groups, types, CR range) and applies filters client-side in filteredCustomNpcs.
Slider now uses 34 positions mapping to actual CR values so the first ticks display 0, 1/8, 1/4, 1/2 before hitting 1. Labels and stored filter values both reflect the correct CR numbers.
…hips - Languages, Environment, and Groups each on their own row - Environment and Groups side-by-side on sm+ screens - Add bottom-slots to unvalidated fields for consistent spacing - Fix Groups chips showing [object Object] with emit-value + map-options
- Use some() instead of every() in Entities.vue group filter (OR semantics, consistent with Npcs.vue) - Use campaignGroupKey() helper in BasicInfo.vue instead of hardcoded campaign__ prefix
Collaborator
Author
|
Review Comments:
|
- Remove duplicate Groups card from EditNpc (already in BasicInfo) - Replace [Campaign] text prefix with a neutral-4 pill badge in dropdown options - Campaign group chips use dark prop to distinguish when selected - NPC list table chips also reflect campaign groups distinctly - Environment select uses non-dense chips via selected-item slot
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Changes
NpcGroupManagercomponent for creating, editing, and deleting groupsnpc_groups.js) and Vuex store module (npcGroups.js)campaignGroupKey()utility function