Skip to content

Logic Model Canvas: core domain, wizard, WorkStructure integration#3275

Open
gloriafolaron wants to merge 24 commits intofeature/phase-0-modernizationfrom
feature/logic-model-canvas
Open

Logic Model Canvas: core domain, wizard, WorkStructure integration#3275
gloriafolaron wants to merge 24 commits intofeature/phase-0-modernizationfrom
feature/logic-model-canvas

Conversation

@gloriafolaron
Copy link
Contributor

Summary

  • Adds the Logic Model Canvas core domain (Phase 1) with stage-flow board, custom modal, and reusable stageflow components
  • Adds Phase 2 plugin hooks and language keys for StrategyPro plugin UI (health badges, narrative strip, card modal, exports)
  • Adds WorkStructure core domain with structure registry, mapping service, and cross-structure relationship support
  • Wires WorkStructure into the Logic Model Wizard — routing picker and entity generation now driven by registered structures (Project, Strategy, Program) instead of hardcoded mappings
  • Fixes HTMX target inheritance bugs, modal sizing, Blade compilation errors, and view namespace issues

Key changes

  • app/Domain/Logicmodelcanvas/ — new core domain (controllers, services, repository, templates)
  • app/Domain/WorkStructure/ — new core domain (models, repository, services, registry)
  • app/Domain/Goalcanvas/ — Blade compilation fixes, SlimSelect icon rendering
  • app/Plugins submodule updated (StrategyPro wizard, routing picker, entity tree, structure registration)

Test plan

  • Load Logic Model Canvas board — verify stages render correctly
  • Open card modal — verify fields, save/close, HTMX partials
  • Open "Create Work from Canvas" wizard — verify 4 steps load
  • Review step: verify 3 routing options (Current Project, New Project, New Program)
  • Select different routing options — entity tree should show/hide sections dynamically
  • Generate work with "Current Project" — milestones, tasks, goals created
  • Generate work with "New Project" — new project created with all entities
  • Verify modal is centered and nav buttons stay visible (sticky)

🤖 Generated with Claude Code

gloriafolaron and others added 24 commits February 19, 2026 18:13
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements a five-stage causal chain board (Inputs → Activities →
Outputs → Outcomes → Impact) extending the Canvas base domain.
Creates the core domain that the StrategyPro plugin depends on,
with STAGES/TEMPLATES constants and getItemsByStage() method.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extract stageflow Blade components (card, item, styles) into
  app/Views/Templates/components/stageflow/ for reuse across
  blueprint boards
- Refactor Logic Model template to use sf- components instead of
  inline lm- CSS (~450 lines removed)
- Fix stage click switching: self-init in JS module to avoid race
  condition with jQuery.ready and lazy-loaded ES modules
- Visual design: equal-width stages, active distinguished by shadow
  elevation, gradient top tint, filled icon, and colored header border
- Register Logic Model as blueprint template card in ShowBoards
- Add stage-specific language keys and update Impact icon

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the generic canvas dialog include with a Logic Model-specific
template: colored stage pill header, "Title" for name input,
"Description" for rich text, no milestone section (Phase 2).
Fix HTML-escaped icons in stageflow item dropdown menu.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…t spacing

- Add medium modal size (50rem) for canvas item dialogs
- Add click-outside-to-close on dialog backdrop
- Remove redundant Header label, let main-title-input be the header
- Narrow status dropdown to 220px
- Fix comment dropdown menu spacing with inline margin
- Add bottom padding to modal content container

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…rendering

Fix two Blade syntax errors in the goal dialog that prevented opening:
- Replace @if directive inside <x-component> tag with pre-computed variable
- Fix nested double quotes in component attribute binding

Fix SlimSelect status dropdown icon not showing in collapsed/selected state
by overriding the problematic `display: flex` on <i> elements inside the
SlimSelect placeholder to `display: inline-block`, matching dropdown options.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ping page content

Root cause: Elements with hx-get/hx-trigger inside .primaryContent
inherited hx-target=".primaryContent" and hx-select=".primaryContent"
from the .rightpanel layout wrapper. When their small HTMX responses
arrived (e.g. comment reactions, milestone progress, timer status),
HTMX looked for .primaryContent inside the response, found nothing,
and replaced the entire page content with empty markup — causing pages
like Wiki/Docs to appear blank after load.

Fix: Add hx-target="this" and hx-select="unset" to all affected
elements so they swap into themselves instead of inheriting the
layout-level target.

Core domain fixes:
- Comments generalComment reactions span (primary culprit)
- Tickets timer button/link, milestone progress, subtasks, modal timer
- Valuecanvas milestone card in dialog

Plugin fixes (submodule update):
- Reactions sentiment widget
- StrategyPro/PgmPro/Whiteboardscanvas milestone cards
- Copilot chat history pagination

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add 5 @dispatchEvent hooks to showCanvas.blade.php (beforeStageFlow,
afterStageHeader, beforeStageBody, itemCardFooter, headerActions).
Add headerExtra and beforeBody named slots to stageflow card component.
Add status pill and project link CSS to stageflow styles. Add 45+
language keys for plugin narrative, health, progress, links, export,
templates, and snapshots. Update Plugins submodule ref.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ave & Close

The modalManager's fetch-based form handler follows server redirects
automatically but never checked for the closeModal query parameter.
Canvas Save & Close buttons redirect to editCanvasItem?closeModal=true,
which the old nyroModal system handled but the new dialog-based modal
did not.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e button

Three fixes:
1. Plugin view namespace: ViewsServiceProvider registers plugins as
   lowercase (strategypro) but all view() calls used camelCase
   (strategyPro::). This caused 'No hint path defined' errors that
   silently prevented all plugin UI from rendering.

2. Save & Close button: Changed from onclick setCloseModal() pattern
   (legacy nyroModal) to proper submit button with name="save"
   value="closeModal" so the server adds ?closeModal=true to redirect.

3. modalManager form handler: Added event.submitter name/value to
   FormData since new FormData(form) doesn't include the clicked
   submit button's data. Also detects closeModal in redirect URL.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ils, exports

- Avatar component: deterministic gradient palette based on username hash,
  no longer depends on theme accent colors or server-generated profile images
- Narrative strip: inline "Theory of Change:" label inside compact box,
  positioned between toolbar and stage flow
- Card modal: details panel aligned to top of right column alongside title,
  status dropdown icons colored to match board dot colors (blue/orange/green/red)
- Board toolbar: status filter dropdown with colored icons, fixed button label
  escaping, Create New Board button on left with Export on right
- Card titles: single-line truncation with ellipsis on board cards
- Export: self-hosted html2canvas + jsPDF libs (CSP-safe), PNG/PDF/Print dropdown
- Stageflow components: named slots for plugin hooks, updated item layout

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…eming

- Fix nested form bug: move comments submodule outside main form in canvasDialog
  (comments submodule has its own <form>, breaking outer form submit)
- Add currentValue/endValue/startValue to base Canvas EditCanvasItem POST handler
- Avatar component uses theme var(--accent1) instead of hardcoded gradients
- Health badge tooltips for accessibility
- Toast notification fallback in Template.php
- HX-Refresh on theme/language changes in EditOwn controller

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New core domain: WorkStructure — schema definition layer for structure
types, element definitions, relationships, and cross-structure mappings.
Four tables (zp_work_structures, zp_work_structure_elements,
zp_work_structure_relationships, zp_work_structure_mappings) with
repository, services (CRUD, registry, mapping), and class-based events.

Seeds "Project" system structure on boot. StrategyPro plugin registers
"Logic Model" structure with cross-structure mappings to Project
(output→milestone, activity→task, outcome→goal).

Adds afterStageFlow event hook to showCanvas template for wizard modal.
Extends EntityRelationshipEnum with GeneratedFrom and MapsTo cases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…d output

Hide Logic Model from planning boards in strategy projects to avoid
duplication with dedicated menu item. Improve stageflow print layout
with landscape orientation and page breaks. Update Plugins submodule
and Vite build output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add MappingService::getTargetStructures() and getMappedElementKeys()
for querying which target structures have mappings from a source.
Add WorkStructureRepository::getTargetStructureIds() for the
underlying query. These methods power the wizard's dynamic routing
picker and structure-aware entity gating.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gloriafolaron gloriafolaron requested a review from a team as a code owner February 22, 2026 21:57
@gloriafolaron gloriafolaron requested review from pmarcowski and removed request for a team February 22, 2026 21:57
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants