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

Start to decouple dom completely from vdom #883

Merged
merged 1 commit into from
Mar 4, 2021

Conversation

matt-gadd
Copy link
Contributor

@matt-gadd matt-gadd commented Mar 4, 2021

Type: feature

The following has been addressed in the PR:

Description:
As we start to explore other targets such as native, we need to begin decoupling the dom parts from vdom. In the future we can hopefully make vdom have some kind of agnostic "node" structure to work with, but for now that is too big of a change. So this is a small refactoring that allows the user to pass a node api (that similarly maps to the equivalent dom operations) to the mount function.

This would for instance then allow the user to write adapters for writing to something non dom like.

Down the line we'd still have these issues:

  • middleware that works on raw dom nodes (I have changed the core node middleware to use the passed nodeApi but generally the same change would have to happen elsewhere
  • the current api gives no more context than the existing dom api's, which may not be sufficient when writing api's for other targets
  • the current api closely matches the dom equivalents which are extremely dom centric

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 4, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@codecov
Copy link

codecov bot commented Mar 4, 2021

Codecov Report

Merging #883 (1da8941) into master (34f2645) will increase coverage by 0.00%.
The diff coverage is 97.67%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #883   +/-   ##
=======================================
  Coverage   94.52%   94.52%           
=======================================
  Files         127      127           
  Lines        8020     8094   +74     
  Branches     1876     1888   +12     
=======================================
+ Hits         7581     7651   +70     
- Misses        439      443    +4     
Impacted Files Coverage Δ
src/core/vdom.ts 97.77% <97.67%> (-0.18%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 34f2645...798a559. Read the comment docs.

@matt-gadd matt-gadd merged commit c3b4866 into dojo:master Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants