Skip to content
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

[hdom] generalize diffElement() #4

Closed
postspectacular opened this issue Feb 5, 2018 · 0 comments
Closed

[hdom] generalize diffElement() #4

postspectacular opened this issue Feb 5, 2018 · 0 comments
Labels
enhancement New feature or request package:hdom

Comments

@postspectacular
Copy link
Member

Currently diffElement() used hardcoded delegates for any mutation tasks (adding / removing / replacing elements / attribs) resulting from the computed diff. This means the implementation is only working with an actual DOM. There's no reason to artificially limit the project to purely this use case and we also need better mocking for tests.

Refactor to support alternative impls (e.g. for test mocks, WebGL) by passing in optional implementation config. Also update start() to accept new arg...

@postspectacular postspectacular added enhancement New feature or request package:hdom labels Feb 5, 2018
@postspectacular postspectacular changed the title generalize diffElement() [hdom] generalize diffElement() May 9, 2018
postspectacular added a commit that referenced this issue Sep 10, 2018
- add HDOMOps interface
- add DEFAULT_OPS implementation
- update diffElement() & diffAttributes() to delegate to ops
- refactor diffElement() to be more legible
- update createDOM(), add support for `__ops` node attrib
  to use custom ops for subtrees
- add getChild(), replaceChild(), setContent()
postspectacular added a commit that referenced this issue Sep 10, 2018
* feature/hdom-v5:
  feat(hdom): generalize diffElement() (#4)
  feat(hdom): add optional support for blocking normalize & diff
postspectacular added a commit that referenced this issue Sep 16, 2018
* feature/hdom-v5:
  refactor(hdom): update custom equiv()
  fix(hdom): delegate diffTree() to branch impl
  refactor(hiccup): add `button` to NO_SPANS elements
  fix(hdom): exclude hdom control attribs in setAttrib()
  perf(checks): update isPlainObject()
  refactor(hdom): use custom equiv also for diffAttributes()
  perf(diff): update diffObject() & add IOC support for custom equiv fn
  test(hdom): update tests
  refactor(hdom): trial run of custom equiv() impl for diffTree()
  perf(equiv): inline & refactor type checks, add IOC support for helpers
  fix(hdom): minor fix (hydrateDOM)
  fix(transducers-hdom): update to work w/ new @thi.ng/hdom v5 API
  feat(hdom): reorg & extend HDOMImplementation
  feat(checks): add isNotStringAndIterable()
  perf(hdom): add opt `__release` attrib to disable releaseDeep()
  feat(hdom): update normalizeTree, add to HDOMImplementation
  refactor(hdom): rename HDOMOps => HDOMImplementation, add docs
  feat(hdom): generalize diffElement() (#4)
  feat(hdom): add optional support for blocking normalize & diff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request package:hdom
Projects
None yet
Development

No branches or pull requests

1 participant