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
Virtual DOM and JSX support #9967
Conversation
…ghtweight server apps which manipulate Virtual DOM rendered on the server
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.
Looks very interesting and useful!
this.error("'mousewheel' event took " + diff + "ms - this may have a significant effect on UI experience"); | ||
} else if (diff > 100) { | ||
this.warn("'mousewheel' event took " + diff + "ms - consider refactoring for smoother UI experience"); | ||
} |
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.
cool :)
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.
that code got pulled in through rebase :(
Co-authored-by: Tobias Oetiker <tobi@oetiker.ch>
Hotfix to get qx server package working again
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.
I've tagged this for a weekend review, as the changes are extensive. This is a very, very scary PR, though. It looks like it's mucking with low-level stuff that can affect all desktop apps. I'll spend time on it this weekend, but I suspect this would be best left until after the release of 6.0 because of the possibility of subtle breakage. That way, we'll have lots of time to test with it and not take the chance on messing up our first release in years.
That's a fair point, and I was a bit torn myself. It has only had limited testing. I'm happy to create a v7.x branch and make the PR in there? |
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.
Wow. There's a lot here! I spent about an hour on this, but could spend many more for a thorough review. Since this is supposed to be BC, I suggest we consider this for a 6.1 or 7.0 version, where it will get far more BC testing in existing apps before being officially released.
@@ -353,7 +353,7 @@ qx.Bootstrap.define("qx.bom.client.Html", | |||
* @ignore(Image) | |||
*/ | |||
getDataUrl : function(callback) { | |||
var data = new Image(); | |||
var data = new window.Image(); |
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.
Curious why this change was needed? In the browser, Image is directly accessible via the global object window
. In Nodejs, window
doesn't exist unless qooxdoo has started up, in which case window
and global
are the same thing, but in that case, there is no Image global.Image
...???
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.
it suppresses the warnings because window
is always an allowed/well known global but Image
isn't when compiling for a NodeJS target. Part of my goal was to improve NodeJS development, by adding VDOM and reducing the unnecessary dependencies (because this can cause code to be loaded which crashes) - connected with this was removing warnings which are issued on nodejs-only targets.
In any code which has to be cross platform, rather than adding a blanket @ignore(window.*)
instead I tend to use window.Image
because it's direct about what the code is referencing
* bring tutorials to an more dominat place in doc * fix docs
* Add warning about result of this.tr("") * Add description of header file return on empty string to docu * Fix unicode.org link Thanks @zaucker !
…ghtweight server apps which manipulate Virtual DOM rendered on the server
Co-authored-by: Tobias Oetiker <tobi@oetiker.ch>
…rtual-dom * 'virtual-dom' of github.com:johnspackman/qooxdoo: doc fix; add jsx code Update docs/desktop/gui/html.md lint & es5 docs update improves support for server based Virtual DOM and adds support for lightweight server apps which manipulate Virtual DOM rendered on the server # Conflicts: # framework/source/class/qx/bom/element/Attribute.js # framework/source/class/qx/html/Jsx.js
I'm marking this as do not move for now, until we confirm what we're going to do for 6.1 release PRs |
fixes a bug in events where DOM events and the `qx.html.Node` have the same event name
This PR is about improving the Virtual DOM in
qx.html.*
and adding JSX support, primarily for use in server applications but also the browser.The changes are:
qx.html.Element
is split intoqx.html.Node
andqx.html.Element
, and also the addition ofqx.html.Text
. This change is entirely backwards compatible, and the addition of Text allows any arbitrary DOM structure to be represented (code inqx.ui.*
does not have to use Text nodes because the UI classes always operate directly on the node to set/get text).qx.html.Element
instances, based on theqxObjectId
cssClass
,addCssClass()
,visible
, etc) which exist to simplify common tasksqx.headless
property in the compiler which indicates that the code is compiled for the server