-
Notifications
You must be signed in to change notification settings - Fork 248
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
fix: Refactor DOMElement #266
base: develop
Are you sure you want to change the base?
Conversation
bf00479
to
4ec3462
Compare
c16cece
to
b4f5e59
Compare
@michaelobriena What can I do to make this less controversial? E.g. I didn't change any user facing APIs. Is there anything else here that would need to be resolved? |
This is still something that really needs to happen IMO, since the DOMElement in its current state doesn't handle a lot of cases correctly and there is also no reason why users shouldn't be able to do |
575a3f1
to
3c2d336
Compare
I uncommented the tests for now. I still need to adjust them to use the |
There are some nasty merge conflicts due to |
3c2d336
to
e04d8a6
Compare
@DnMllr Thoughts? |
@DnMllr Could you review this, please? |
@DnMllr Any thoughts on this? |
* No longer keep track of unnecessary state (e.g. uiEvents) * Fix onMount * Allow adding the DOMElement via Node#addComponent instead of DOMElement constructor * Improve (basically rewrite) test suite * Allow recycling of DOMElement * Store state in external Spec (consistent with Node) * Make DOMElement#getValue consistent with spec naming conventions (e.g. styles/ id) * Add missing getter functions * Fix documentation * Obsolete/ Remove DOMElement#draw DOMElement#init (users called it explicitly due to confusion) * Fix return values described in the docs (make methods chainable) * Properly reset ElementCache when elements are being reused * Generalize dismounting: preserve DOMElement spec * Reset properties, attributes etc. onDismount
39942c0
to
7f47a0b
Compare
@DnMllr Could you please review this if possible? Thanks. |
@DnMllr I rebased this a couple of times now. I'm just gonna leave this open for now and wait for the review. |
@DnMllr Could you have a look over/ review this? Any thoughts? |
@michaelobriena update The implementation of render size in the DOMElement changed in the mean time. I'm looking into it right now. |
Please, please, please, can you guys merge this sometime soon? |
Hmmm, I have an idea: I'll merge this into http://github.com/infamous/engine and test it, then publish that on NPM (infamous-engine) if it fixes things. |
The community and I would greatly appreciate if you guys spent all your time right now fixing bugs, not making new features, not making new API changes, not planning other libraries or frameworks. Just fixing all the bugs we have. It doesn't make sense to move forward with a boatload of bugs at hand. |
This PR works well |
constructor
(e.g. styles/ id)
explicitly due to confusion)
Simple example of one of the things that was broken:
Before: https://api-te.famo.us/codemanager/v1/containers/fe4b52ef-9d0b-4f71-9368-e52d22625c6b/share
A lot of stuff was just broken.
Please review @DnMllr