feat: add async demo support and enhance template resolution
- Introduced async demo functionality in the README, allowing for asynchronous data preparation before rendering components. - Updated WccDashboard, WccProperties, and WccSidebar to support Promise-based template factories. - Implemented resolveTemplateFactory to handle both synchronous and asynchronous template results. - Added tests for resolveTemplateFactory to ensure correct behavior for both sync and async templates. - Updated pnpm workspace configuration.
This commit is contained in:
@@ -97,4 +97,11 @@ Properties panel was overwriting values set by demo functions
|
||||
2. This prevents browser from firing input events during initialization
|
||||
3. Added proper number parsing for number inputs
|
||||
4. Increased initial wait to 200ms for demo wrappers to complete
|
||||
5. Simplified select element handling to use property binding
|
||||
5. Simplified select element handling to use property binding
|
||||
# Async Demo Support (IN PROGRESS)
|
||||
|
||||
## Tasks
|
||||
- [ ] Allow dashboard-selected items to return Promise-based TemplateResults
|
||||
- [ ] Await async demos/pages before rendering them into the viewport
|
||||
- [ ] Add regression test covering async demo usage
|
||||
- [ ] Document async demo pattern in README and verify with pnpm scripts
|
||||
|
Reference in New Issue
Block a user