-
Notifications
You must be signed in to change notification settings - Fork 263
Runtime watchers #773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime watchers #773
Conversation
src/runtime/dsl.ts
Outdated
| record.__output = true; | ||
| this.__block.records.push(record); | ||
|
|
||
| if(typeof attributeName === "string") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add should not be added to the identity, so it's always dynamic
| blocks:DSLBlock[] = []; | ||
| runtimeBlocks:runtime.Block[] = []; | ||
| index:indexes.Index; | ||
| nodeCount = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗑
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J/k, this tracks the nodeIds now that they aren't all awesome nodes.
src/runtime/dsl.ts
Outdated
| block(name:string, func:(block:DSLBlock) => any) { | ||
| let block = new DSLBlock(name, func, this); | ||
| block(name:string, func:BlockFunction) { | ||
| let block = new DSLBlock(name, func, this, undefined, undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't need the undefineds here now
src/runtime/dsl.ts
Outdated
| } | ||
| trans.exec(this.index); | ||
| console.log(trans.changes.map((change, ix) => ` <- ${change}`).join("\n")); | ||
| // console.log(trans.changes.map((change, ix) => ` <- ${change}`).join("\n")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should make this console.info
src/runtime/runtime.ts
Outdated
| } | ||
|
|
||
| export function maybeReverse(value?:ID):ID|RawValue|undefined { | ||
| if(!value) return undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be return value
src/watchers/html.ts
Outdated
| instance.__styles!.splice(ix, 1); | ||
|
|
||
| for(let otherStyleId of instance.__styles!) { | ||
| console.log("reapplying", otherStyleId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗑
src/watchers/html.ts
Outdated
| } | ||
|
|
||
| insertChild(parent:Instance, child:Instance) { | ||
| parent.appendChild(child); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to sort these guys
| return [ | ||
| style.add(attribute, value) | ||
| ]; | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can probably collapse the block and watch here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
Is it related to this rfc ? |
No description provided.