Skip to content

feat: Add debug logging for Flexible field diagnosis (#4)#8

Merged
iamgerwin merged 2 commits into
mainfrom
fix/issue-4-debug-logging
Nov 25, 2025
Merged

feat: Add debug logging for Flexible field diagnosis (#4)#8
iamgerwin merged 2 commits into
mainfrom
fix/issue-4-debug-logging

Conversation

@iamgerwin
Copy link
Copy Markdown
Owner

Summary

Added comprehensive debug logging to help diagnose why the dependency container is not working inside Flexible fields.

Debug Logs Added

The following console.log statements have been added (all prefixed with [NovaDependencyContainer]):

  1. mounted(): Logs field configuration and dependencies
  2. detectFlexibleContextOnMount(): Logs context detection attempts
  3. watchDependentFields(): Logs event subscription
  4. handleFieldChanged(): Logs received events with full details
  5. checkDependencies(): Logs dependency evaluation and visibility result

How to Use

After updating to v1.0.9:

  1. Open browser Developer Tools (F12)
  2. Go to Console tab
  3. Filter by NovaDependencyContainer
  4. Change the Type field to "Contact Us"
  5. Share the console output

Expected Console Output

When working correctly, you should see:

[NovaDependencyContainer] Mounted with field: {...}
[NovaDependencyContainer] Dependencies: [{field: 'type', value: 'Contact Us'}]
[NovaDependencyContainer] Watching for field-changed events
[NovaDependencyContainer] field-changed event received: {...}
[NovaDependencyContainer] Setting isVisible to: true

Fixes #4

Added console.log statements to key methods:
- mounted(): logs field and dependencies
- detectFlexibleContextOnMount(): logs context detection
- watchDependentFields(): logs event watching
- handleFieldChanged(): logs received events and processing
- checkDependencies(): logs dependency evaluation and visibility
@iamgerwin iamgerwin merged commit 9029da0 into main Nov 25, 2025
2 checks passed
@iamgerwin iamgerwin deleted the fix/issue-4-debug-logging branch November 25, 2025 03:39
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.

NovaDependencyContainer inside Flexible field not showing dependent fields

1 participant