fix(properties-panel): enhance element detection and error handling for nested structures
This commit is contained in:
@ -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)`
|
||||
|
Reference in New Issue
Block a user