-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Divide core.helpers monolith #5959
Conversation
Just found #5957... Guess it's worth to collaborate. |
Thanks @eeiaao for your contribution. Note that this PR generates tons of breaking changes since you moved most helpers under a new namespace, which will break external code (plugins and user projects) and in this case, we need to maintain deprecated aliases. However, we don't necessary want to move all helpers in a new namespace because it generates more code but also doesn't always make sense (for example There is also methods we don't want public anymore, so we should deprecate and make them private. For example, all the DOM related methods should move in I initiated this split of helpers (#4419) but left most of the existing ones in Reviewing such big PR is really complicated, especially if we are going to iterate on which methods we want a new namespace or not and which ones we want to deprecate. I also have work in progress on that exact same task as part of #4478 and these changes massively conflict with it (but of course, you couldn't know about that). Out of curiosity, why do you need these changes to port Chart.js to Qt? why don't you use the generated UMD build and override methods via |
@simonbrunel thanks for detailed explanations. I've totally forget about backwards compatibility with external code. Recently I found that these changes aren't necessary at all (I just missed one file to include in QML resources). The idea is to wrap the whole library in QML. The using of UMD builds will make maintenance painful since it will force to make builds everytime when some PR gets merged. Despite that QML itself doesn't support I spent a day to work on this idea and finally found that qml's So, this PR has to be rejected. |
You shouldn't depend on our master branch but from one of our tags which contain pre-built files.
I would not say "extremely" because when using OpenGL, it's quite fast (maybe faster than browsers). You may also hit an issue with drawing lines with width > 1. Try to set
That's right, but we are trying to keep our code compatible and optimized to target this kind of engine. Did you try https://github.com/simonbrunel/qtchartjs? It definitely needs more work, tests, etc.. but I think it's a good start to integrate Chart.js in QML. Feel free to submit PR to that qtchartjs repository if you think it worth the effort. |
What should I do whether I'd like to add some functionality that is not currently supported? Using Qt I don't ever need to use moment.js' localizations at all, since it can be done on QML side... So, going to add new property to time scale's options (consider it a
It leads to black screen instead of Canvas on Android. Have no idea how and when it will be fixed.
Have not seen. It would be interesting. Comparing to my port, it has different project structure, options/data updation approach and animations mechanism. Have to find a time to publish... Anyway, I totally disagree with 'UMD builds' approach. This should be discussed. |
Almost for three years core.helpers accumulated various kind of helpers and became a monolith. Separating helpers by their semantics should improve project readability and make easier to extend and maintain it.
First commits are aimed to prevent circular dependencies that are unavoidable due to the last one commit.
During working on port for Qt I was found that things like:
var helpers = require('../helpers/index');
module.exports = function() {
helpers.configMerge = ...
aren't allowed, that is, it's impossible to extend helpers in this way, so this part of a project is a blocker for a port.