Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Integrate VDOM system into widget-core #728

Merged
merged 62 commits into from
Oct 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
0a97d10
dumped Maquette into widget-core and formatted
agubler Oct 12, 2017
41936c4
progress
agubler Oct 13, 2017
3f85e78
more progress for vdom
agubler Oct 13, 2017
9bcb8d2
clean up for vdom
agubler Oct 13, 2017
d02099f
add caching back in for WidgetBase
agubler Oct 13, 2017
9c721fb
filter null/undfined and convert strings to HNode for v
agubler Oct 13, 2017
d457e4f
Update interfaces for VirtualDomProperties
agubler Oct 13, 2017
8dfc14d
updated interfaces
agubler Oct 13, 2017
377a60e
pass through projector instance
agubler Oct 13, 2017
73b320c
extra typing goodness
agubler Oct 13, 2017
fd4de00
Update DomWrapper
agubler Oct 13, 2017
4e5d6b7
Small tweaks
agubler Oct 13, 2017
8699fe3
recurse until find a domNode for insert before if an old child exists
agubler Oct 13, 2017
6f0a22a
Initial unit tests for non widget vdom paths
agubler Oct 13, 2017
ec59d0c
Cast projector instance to WidgetBase
agubler Oct 16, 2017
700e689
Make HNode children optional and filter/map HNodes in single loop
agubler Oct 16, 2017
5253b49
Make invalidate public and project against undefined children
agubler Oct 16, 2017
f0dce7f
Deal with registry labels and pass parent instance through until a ne…
agubler Oct 16, 2017
ee6db08
Remove projector rendered event
agubler Oct 16, 2017
22bef16
Remove projector rendered event
agubler Oct 16, 2017
d7b59c8
Updates based on testing with widgets and benchmarks
agubler Oct 17, 2017
755d71a
remove widgetbase debugging code
agubler Oct 17, 2017
32d1547
Use internal interdaces in vdom for HNode and WNode
agubler Oct 17, 2017
af76faf
Update vdom unit tests
agubler Oct 17, 2017
bc519f7
Updated unit tests for NodeHandler
agubler Oct 17, 2017
a27d487
clean __render__ call
agubler Oct 17, 2017
3e71ba9
Remove setDomNodes functionality that will be done in vdom
agubler Oct 17, 2017
040b37b
Add widget-created/widget-updated event for projector and decorate al…
agubler Oct 17, 2017
4ce6604
createTestWidget no longer works
agubler Oct 17, 2017
ce57698
Fix the unit tests
agubler Oct 17, 2017
0d98749
Remove references to vnode
agubler Oct 17, 2017
44e6564
update typo on interface name
agubler Oct 17, 2017
759decc
Remove Maquette as a dependency
agubler Oct 17, 2017
9aea263
vdom fixup
agubler Oct 17, 2017
c19c45d
more clean up
agubler Oct 17, 2017
2e039c5
more unit tests
agubler Oct 18, 2017
104f81c
create dom for new registry items and remove unrequired if check
agubler Oct 18, 2017
fa5d52f
vdom unit tests for widgets
agubler Oct 18, 2017
7f5a0f2
remove properties checks
agubler Oct 18, 2017
47cfa3b
remove insertBefore in vdom
agubler Oct 18, 2017
1776b59
extra vdom tests for embedded WNodes and replacing widgets
agubler Oct 18, 2017
66d1ecc
remove maquette references
agubler Oct 18, 2017
bd9d883
support merging DNodes onto HTML
agubler Oct 18, 2017
7375e89
Updated package-lock.json
agubler Oct 18, 2017
9117dea
more unit tests and fixes
agubler Oct 18, 2017
99a0a08
small fixups
agubler Oct 18, 2017
58eafd6
final fixes
agubler Oct 18, 2017
c778c04
remove final references to Maquette
agubler Oct 18, 2017
0ecf7c2
Failing unit test for returning render result with classes
agubler Oct 19, 2017
ce2d679
check the previous rendered exists before updating, otherwise create
agubler Oct 19, 2017
b857b82
Set properties even when the render has always been scheduled
agubler Oct 19, 2017
e831972
use projector options for merge flag
agubler Oct 19, 2017
3506753
initial request idle for after render callbacks
agubler Oct 19, 2017
f738e7f
add resolve request idle callback to unit tests
agubler Oct 19, 2017
a6f324b
clean up after render callbacks
agubler Oct 20, 2017
299b364
Support skipping unknown / non matching nodes when merging the render…
agubler Oct 20, 2017
5cc7163
Add resolving util for rAF and rIC which falls back to stubbing setTi…
agubler Oct 20, 2017
0b6a419
fixup unit test
agubler Oct 20, 2017
36cead0
support using zero as a key value
agubler Oct 20, 2017
8ee06ca
else on newline
agubler Oct 20, 2017
d4dee5c
Use listener map and type the event
agubler Oct 23, 2017
df91227
Properties cannot be null or undefined
agubler Oct 23, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
},
"dependencies": {
"intersection-observer": "^0.4.2",
"maquette": "~2.5.1",
"pepjs": "^0.4.2"
}
}
12 changes: 3 additions & 9 deletions src/NodeHandler.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { Evented } from '@dojo/core/Evented';
import { VNodeProperties } from '@dojo/interfaces/vdom';
import Map from '@dojo/shim/Map';
import { NodeHandlerInterface } from './interfaces';

/**
* Enum to identify the type of event.
* Listening to 'Projector' will notify when projector is created or updated
* Listening to 'Widget' will notifiy when widget root is created or updated
* Listening to 'Widget' will notify when widget root is created or updated
*/
export enum NodeEventType {
Projector = 'Projector',
Expand All @@ -25,17 +24,12 @@ export class NodeHandler extends Evented implements NodeHandlerInterface {
return this._nodeMap.has(key);
}

public add(element: HTMLElement, properties: VNodeProperties): void {
const key = String(properties.key);
public add(element: HTMLElement, key: string): void {
this._nodeMap.set(key, element);
this.emit({ type: key });
}

public addRoot(element: HTMLElement, properties: VNodeProperties): void {
if (properties && properties.key) {
this.add(element, properties);
}

public addRoot(element: HTMLElement, key?: string): void {
this.emit({ type: NodeEventType.Widget });
}

Expand Down
Loading