fix(properties-panel): enhance element detection and error handling for nested structures

This commit is contained in:
Juergen Kunz
2025-06-16 15:56:12 +00:00
parent 992af2668e
commit 21b7158a35
9 changed files with 693 additions and 26 deletions

View File

@ -12,10 +12,16 @@ The properties panel had timing issues detecting rendered elements because:
1. Added a 100ms initial delay to allow render completion
2. Implemented recursive element search that:
- Searches through nested children up to 5 levels deep
- Checks shadow roots of elements
- Handles complex DOM structures
- Checks both light DOM and shadow DOM for all elements
- Handles complex DOM structures generically
- Works with any wrapper elements, not specific to dees-demowrapper
3. Added retry mechanism with up to 5 attempts (200ms between retries)
4. Improved error messages to show retry count
5. Comprehensive error handling:
- Errors in element search don't break the update cycle
- Individual property errors don't prevent other properties from rendering
- scheduleUpdate always completes even if createProperties fails
- Clears warnings and property content appropriately on errors
### Code Flow
1. Dashboard renders element demo into viewport using `render(anonItem.demo(), viewport)`