GithubHelp home page GithubHelp logo

qmlweb / qmlweb Goto Github PK

View Code? Open in Web Editor NEW
762.0 72.0 100.0 5.43 MB

A QML engine in a web browser. Current state: fixing things…

Home Page: https://qmlweb.github.io/

License: Other

JavaScript 82.96% QML 17.04%
qml javascript qmlweb html html5 declarative-ui declarative

qmlweb's Introduction

JavaScript powered QML Engine

Join the chat at https://gitter.im/qmlweb/qmlweb Build Status codecov

npm Bower GitHub tag

This project aims at bringing the power of QML to the web browser. Here's a sample of how QML looks like:

import QtQuick 2.0

Rectangle {
   width: 500; height: 200
   color: "lightgray"

   Text {
       id: helloText
       text: "Hello world!"
       anchors.verticalCenter: parent.verticalCenter
       anchors.horizontalCenter: parent.horizontalCenter
       font.pointSize: 24; font.bold: true
   }
}

How to use

Add the library to your web page

Using one of the methods below, install the qmlweb JavaScript library:

  • npmnpm install qmlweb
  • GitHub releasestar -xaf v0.2.0.tar.gz
  • Manually (recommended if you cloned from git) — npm install && npm run build

Next, simply add lib/qmlweb.js to the list of other JavaScript files in your app's HTML file:

<script type="text/javascript" src="/lib/qmlweb.js"></script>

See the examples directory for more details and complete usage examples.

Testing from a local folder

Note that due to security restrictions (which are there to protect you!) browsers do not allow loading arbitrary local files, which includes *.qml.

Because of that, to test the goodness of QmlWeb on your own machine, you have to spin up a local http server, e.g. by running npx http-server.

Or try out qmlweb-viewer.

API

You can use DOM elements as the base for QML components:

var div = document.getElementById('embed'); // this is your DOM element
var engine = new QmlWeb.QMLEngine(div);
engine.loadFile('qml/main.qml');
engine.start();

See also engine.loadQML for constructing a QML element from a source string.

Auto-load

You can modify the <body> element to specify what QML file to load when the page is opened. The loaded QML element will fill the whole page.

<!DOCTYPE html>
<html>
  <head>
    <title>QML Auto-load Example</title>
    <script type="text/javascript" src="/lib/qmlweb.js"></script>
  </head>
  <body style="margin: 0" data-qml="qml/main.qml">
  </body>
</html>

Web Components

You can register QML files as Custom Elements.

Note: browser support for Custom Elements v1 is limited, and QmlWeb does not include a polyfill. You might want to load a polyfill manually.

Registering the element:

QmlWeb.registerElement('qml-main', 'qml/main.qml');

Using the element:

<qml-main height="300" color="red" firstName="World"></qml-main>

Top-level properties get exported as HTML attributes and are binded to them, real-time updates are possible.

Supported modules and elements

Approximate modules support status for the git version could be viewed on the Projects page.

You can click on the module cards for per-class details.

How to use with Gulp

See gulp-qmlweb package.

How to extend

See Extending.

Related efforts

That will allow users to run the main Qt process on the server and render on HTML clients through WebGL. Qt WebGL streaming requires one application process on server per each client — only the painting is delegated to the client.

The usecase differs significantly from QmlWeb, as QmlWeb runs all code on the clients, attempting to reuse browser APIs as much as possible to provide better integration. No server-side code is needed, server provides static files.

PureQml aims to implement a language close to original QML, but it does not target 100% compatibility with Qt QML, unlike QmlWeb. They also provide a framework based on their language and target support for a great variety of platforms.

Transplitting all the required Qt/QML libraries to JS/WebAssembley and rendering everything to Canvas provides the best possible compatibility with upstream Qt. That comes at a price, though — the runtime is pretty big, and that approach does not allow to reuse many existing browser APIs and components.

Similar as the above «Qt/QML + Emscripten», but more up to date. Upstream issue: QTBUG-63917.

Examples at https://msorvig.github.io/qt-webassembly-examples/.

qmlweb's People

Contributors

a-andreyev avatar akreuzkamp avatar arnopaehler avatar aspidites avatar aspotashev avatar bessorion avatar chalker avatar gaubee avatar henrikrudstrom avatar hhaveri avatar igosoft avatar jangmarker avatar labsin avatar lpaimen avatar machinekoder avatar mrjoshuak avatar pavelvasev avatar plaristote avatar shry15harsh avatar skinkie avatar somsubhra avatar stephenmdangelo avatar wian007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qmlweb's Issues

Merge and commit landing process

How the merge process goes.

Key points:

  1. The commits should have PR-URL, Reviewed-By, and (sometimes) Fixes fields.
  2. PR-URL and Fixes should be full links to relevant GitHub PR and Issues accordingly.
  3. Fast-forward is preferred instead of merges to reduce commit noise. Edit: I'm not sure about this, especially for the PRs with many commits, and perhaps we should discuss this =).
  4. This is lower priority, but if possible — we should get nice badges at the PRs to make it clear that those were merged.
  5. The Travis CI checks should pass.
  6. AUTHORS should contain a full list of all contributors.

How to achieve this:

  1. Rebase the commits that you are merging against current master.

  2. Add header fields (PR-URL, Reviewed-By, Fixes) to them.

    This and step 1 could be done together, using git rebase -i master and marking all commits with an e to amend them.

  3. If possibble — force-push to the branch that is being merged, this way the PR will be marked as Merged afterwards.

  4. Wait around two minutes for Travis CI tests to complete and make sure that those are green.

    Note to self: I was not waiting for them at this point, and this is why we got red Travis statuses on the closed pull requests, because the merge itself failed.

  5. Land the commits on master and push.

/cc @qmlweb/collaborators

Rephrase the first paragraph of README to be more neutral

This text does not look neutral to me and could be viewed as being offensive by someone:

CSS and HTML are boring and lame. And they suck at designing cool, interactive interfaces. Qt came up with a much better answer for its renowned framework: QML, a declarative language perfect for designing UIs (and much more). Here's a sample of how QML looks like

We should better rephrase it to be more neutral. I'm not a native English speaker, and I would be glad if someone else filed a pull request to fix this.

We need more tests

No, seriously. 28%?
We can throw half of the code out and tests would still pass — it's not fine.
This has to be fixed asap.

Let's discuss the license

This is aimed to replace #12.

Current issues:

  1. The LICENSE is a modified BSD-3-Clause, we should pick an SPDX-approved variant.

  2. The LICENSE is a BSD-3-Clause, but the files in src/qtcore/qml/lib/ have BSD-2-Clause headers.

  3. We bundle uglify-js which is BSD-2-Clause.

  4. Most of web js libraries just use MIT (see #12 for previous discussion).

  5. Given the 1, 2 and 3, I don't know what to put into the license field of package.json, and npm spits on me with these messages:

    npm WARN [email protected] license should be a valid SPDX license expression
    

I guess everyone should be fine with either of these three licenses, but I must ask everyone.

We can also discuss the preferred license here. After that, I will make a PR with the chosen license that everyone would need to review again.

Author BSD-3-Clause BSD-2-Clause MIT Preferred Notes
@lpaimen + + + No preference
@akreuzkamp + + + BSD-2-Clause (with parser included), BSD-2-Clause or MIT (with parser excluded)
@jangmarker + + + One commit, through KDE reviewboard
@Somsubhra + + + No preference
@JoshuaKolden + + + MIT Only Readme changes
@ChALkeR + + + MIT or BSD-2-Clause
@Plaristote + + MIT?
@labsin + + + No preference
@arnopaehler + + +
@pavelvasev + + + No preference
@henrikrudstrom + + + No preference
@aspidites + + + MIT Only Readme changes
@shry15harsh + + + No preference One commit, through KDE reviewboard
@igosoft + + + MIT or BSD-2-Clause
@aspotashev + + + One commit, through KDE Phabricator
@stephenmdangelo + + +

Please leave a comment about yourself — are you fine with:

  1. Relicensing all your present and future contributions to this repo and present contributions to other public qmlweb repos and forks under the BSD-3-Clause license.
  2. Relicensing all your present and future contributions to this repo and present contributions to other public qmlweb repos and forks under the BSD-2-Clause license.
  3. Relicensing all your present and future contributions to this repo and present contributions to other public qmlweb repos and forks under the MIT license.
  4. Which license would you prefer?
  5. Perhaps some arguments for the preferred license, to keep the discussion going.

Code coverage analysis

We should probably integrate with Coveralls to get code coverage analysis reports and badge.

Istanbul should generate the coverage output files.

Border width of Rectangle can change the geometry of it.

Below example rendered in a browser changes size of Rectangle due to the fact that the size of the border width is greater than width of component.

Rectangle {
border.width: 200
border.color: "red"
height: 100
width: 100
color: 'blue'
}

Consider using browserify or webpack

Atm, we bundle uglify-js is src dir and have our own encapsulate wrappers. That is affecting several things and has to be fixed in some way, and using browserify or webpack to make sure that we don't have to deal manually with various module systems would be nice.

Declare Browser Compatibility

At the moment, I don't know which browsers this project is meant to work on. It would be nice to know, for instance, if this relies on technology which precludes running a qmlweb app on IE8.

Declaring a set of supported browsers would also allow choices to be made about supporting libraries and standards. For instance, if only IE10+ is required, I'd then wonder if using ES2015 or TypeScript would make development more sane than plain ol' JavaScript.

Obviously sticking to plain JavaScript has the benefit of being ubiquitously understood, though.

If legacy browsers aren't a concern, it might be nice to state that we officially support the latest x stable releases of Firefox, Chrome, and IE (and whoever else is a big player nowadays). More accurate might be to declare supported version of rendering engines, which would prevent us from alienating niche browsers. dd

Make build predictable and consistent

Something is wrong with the build atm, it produces inconsistent results.
That's not suitable for putting into git.
Looks like the order of files is random.

Merge KDE review 117456 — MouseArea.pressedButtons

See https://git.reviewboard.kde.org/r/117456/

Author: shry15harsh [email protected]

Title:

Add property 'pressedButtons' to MouseArea

Description:

Added pressedButtons property for QMLMouseArea for QMLWeb. Currently, e.buttons is not available in browsers other than Firefox Dom Level 3. So, it is just assigned to mouse.button for now. So, this property will not be able to tell all the mouse buttons pressed at a time.

Diff: https://git.reviewboard.kde.org/r/117456/diff/raw/

TextInput does not follow its height property

The internal input element does not seem to follow the height of its container. It also overflows from the container.

Setting the input to have a 100% height and box-sizing to border-box might be able to fix this.

Without {height: 100%; box-sizing: border-box;}
image

With {height: 100%; box-sizing: border-box;}
image

Add a css file?

I'm not sure if I like that idea or not, but let's have a discussion.
See #90 for the start of this.

The idea is to add a css file that could set the default styles to our elements based on classes.
This css file could also be split like our js files (per modules/components).

For example, we could apply box-sizing: border-box to all elements inside the root QML element this way.

Is it worth it? What would be the downsides of introducing a css file to the bundle?
/cc @qmlweb/collaborators.

Merge fork-labsin

Merge fork by @labsin.

  • 7080bd5 Fix gulpfile to do qt task before qt.min — Merged
  • 46ad080 Remove libs from repo — Rejected, libs will be kept in the repo for bower.
  • f7b9791 Fix component context
  • daea9af Resemble more like qt5 modules
  • d5d7248 Implement QMLColor
  • 1c200b2 Change QMLProperty value constructor to object
  • 0be9fc1 Fix nodejs with uglify2 in browser — Rejected, this will be redone in a better way.
  • 8f80b5a Fix pre-parse example including qt.js and qt.min.js — Rejected, should go into gulp-qmlweb, that would be rewritten.
  • 432f462 Fix nodejs with uglify2 — Rejected, this will be redone in a better way.

Roadmap

Note: these should be treated as an incomplete list of blockers, for example everything listed here for 0.4.0 could be actually done by the 0.2.0 release, and that would not be something bad.

Update: removed, see Milestones instead.

Missing elements

Important

Animations

  • ColorAnimation

Animators

  • OpacityAnimator
  • XAnimator
  • YAnimator

QtQuick.Controls

QtQuick.Layouts

  • ColumnLayout
  • RowLayout
  • GridLayout
  • Layout

Other

`lib/` status

We need to decide what to do with the lib/ dir (which contains bundled code).

Do we keep it (and update it) or do we remove it from the repo?
If we keep it — how often do we update it? With each commit or between the releases?

Options that I see (anyone could propose any other solution):

  1. Remove lib/ from the repo. Downsides — it would be harder to download this directly from GitHub, and I guess this will make the package unusable with Bower. I could be mistaken here, though.
  2. Update lib/ before each release tag, with a separate commit. Downsides — lib/ in the repo is desynced with the actual changes in the code, and this would make everyones git status not so pretty — there will (almost) always be uncommited changes in the lib/ dir.
  3. Update lib/ with each commit. Downsides — this would make merging, reverting, and every other everyday work a little more inconvenient. The work-around is to reset and rebuild it every time, but this would still break automatic merges.
  4. Remove lib/ from the master branch (as in 1), make a separate branch (or branches if we would want to keep several of those somewhere in the future) for releases and package all releases from that branch (as in 2). Downsides — master would be uninstallable with Bower, but this looks better than having master actually install a previous version.
    1. Remove lib/ from the master branch (as in 1), make tags for each release that are not inside any branches, but in individual tags. Looks similar to 4, see a follow-up comment.

/cc @qmlweb/core

Merge fork-kde-master

Merge kde/master by @akreuzkamp.

  • a24ef6c Add .gitignore — Merged in #29.
  • 9d4c4cf Don't override inner component context. — Merged in #56.
  • 2865c68 Allow creation of QtObject. — QtObject creation merged in #122. The rest of the changes merged in #161.
  • 08a4558 Properly remove animations at overwriting on init. — Merged in #152.
  • 486cc05 Use proper markdown syntax for README.md — Rejected, not required, inapplicable.
  • cbf467b Rename README to README.md — Rejected, not required, already done.
  • c42386b Improve README, update LICENSE, add a CONTRIBUTING — Rejected, README and CONTRIBUTING do not fit here. LICENSE has only year updates (already outdated), and that would be sorted out in #52. Please let me know if this is inappropriate.
  • 44bea45 Fix parsing of arrays containing bindings. — Merged in #57
  • f401c53 On parse error show extraxt of related source code — Merged in #57
  • 7dad8e8 Parser: Allow arrays with bindings. — Merged in #57
  • 8c6ec04 Add echoMode property to TextInput. — Rejected, already done in master, the remaining bits are at #47.
  • 2a7202f Add a custom implementation of QtWebChannel. — Rejected, the code here is LGPL, not BSD.
  • 79a05ff Add basic support for QtWebChannel — Merged in #57.
  • 6022424 Add support for attached properties — Attached properties merged in #160. Inheritance merged in #28.
  • 48db468 Remove double calling QMLBaseObject constructor — Merged in #29.
  • 2144c04 In $draw exit if mode!=Canvas instead of mode==DOM — Rejected, Canvas backend is dropped, inapplicable.
  • 4c9e432 Fix implicitSize of root element != body — Merged in #29.
  • 12b725e Add method Qt.createComponent similar to Qt's one — Merged in #29.
  • 11164f0 Fix some code alignment. — Rejected, code style only change, diverged too much, irrelevant now.
  • c3f1f39 Remove some old, unused helper functions — Merged in #29.
  • d35f213 Add a method nameForObject to root context object — Merged in #29.
  • 1c12ea4 Fix parsing of simple javascript-arrays — Merged in #29.
  • 3fab595 Rename TextArea to TextEdit to conform QtQuick. — Merged in #28, see also #48.
  • 785965c Make rootObject public via engine.rootObject — Merged in #29.
  • 3da78c7 Implement handler for JSItemModel::dataChanged — Merged in #29.
  • 02822c9 Fix parsing of files with windows line-feeds — Merged in #29.
  • b73fd64 Parse import statements correctly — Merged in #24.

Design documents

There is a lot of good discussion going here on individual commits and issues, but i miss a bit a global view of how we see qmlweb after the merge and restructuring.
Im all for merging as much as possible before we refactor, (i suffer a bit from refactor-itis), but i also see there are some interconnected issues with diverging solutions in different forks and i think we need a better idea of what we are working towards. The biggest one of these issues is the file loading and importing, which i made a separate issue for: #...

I would like to propose that we make some design documents in the repo: requirements/scenarios, modules structure, apis, abstractions and how they relate etc. Nothing too formal, but at least something concrete we can refer to and revise to capture conclusions from discussions we have in various threads.

Good idea? waste of time?

Merge fork-arnopaehler

Merge fork by @arnopaehler.

  • c839ec4 more reformatting in QtQuick.Controls, modifications in Screen.js — Squashed and splitted, see #163 (patch set 2).
  • dcda2c3 edit QtQuick.Controls items for standardized code layout add .Coffeescript files for eqch of the item files — Squashed and splitted, see #163 (patch set 2).
  • b83f5ae several Items mods; fix Screen.js; update Widgets.qml — Squashed and splitted, see #163 (patch set 2).
  • 81dba7f clean up, simplify and reformat several QML items add QMLScreen.js and enums to qt.js — Squashed and splitted, see #163 (patch set 2).
  • d4baf53 fixes in parser.js and ComboBox.js changes in CanvasX and LoaderX tests — Squashed and splitted, see #163 (patch set 2).
  • 855c7fd edit Demo, LoaderX and Widgets tests LoaderX now uses ComboBox to present a selection of test QMLs to load — Rejected, examples are not wanted here, they would be collected in a separate repo.
  • 201e20d fix parser.js / qml.js to parse array, num and string correctly update Combo.js — Squashed and splitted, see #163 (patch set 2).
  • 4086cb0 move Button.js to QtQuick.Controls where it belongs add ComboBox.js and a test for it in Widgets.qml (work in progress) — Squashed and splitted, see #163 (patch set 2).
  • 4627a6d extensive renaming and editing of test examples add Demo.qml that includes and displays all other examples add HowTo.md with usage tips — there are some actual changes here, perhaps needs splitting. — Squashed and splitted, see #163 (patch set 2).
  • bf4082c change overflow = hidden to overflow = auto in Item.js cosmetic changes in Fontloader.js cleanup Widgets.qml — Rejected, contrary to what the commit message says, this commit only changes a visual test (which is unwanted in this repo).
  • 101db47 add options parameter to Loader.js extend Loader test example add sample text file ZZ.Z for Loader testing — Merged (the main part of it, without examples).
  • 073f526 some small fixes; start implementing QMLLoader adding test example Loader.qml — Merged (the main part of it, without examples).
  • ffa6fc9 fix Repeater.js create PlaanetsModel.qml and update ListView and ColumnRow tests — Rejected, code style changes (those would be catched by lint after merge) plus visual tests (those are not wanted in this repo).
  • 16ebcc1 minor repairs — Rejected, these look like they actually break some code.
  • 9309753 eliminate Undefined and replace references with undefined — Merged in #113.
  • fd864fb fix a typo in process.js that escape eslint add a samll Windows Power Shell script to run eslint recursively — Rejected, this is actually a fixup of a mistype introduced in a previous commit, which is also rejected.
  • 2aa28d1 check JS with eslint, see .eslintrc for the specifications — Rejected, this will be re-done after merges, with a different eslint rules set.
  • 0a59357 another day another commit maybe now committed as intended — Rejected, this is just a fixup of the previous commit which is rejected, plus a new visual test (those are not wanted).
  • b98ce9a more documentation/comments cleanup — Rejected, this one just removes comments, leaves some of leftovers and breaks the build, also removes Object.create polyfill which is restored by the follow-up commits (and is not there anyway on the master branch).
  • faaaba5 extensive documentation changes code rearrangement in JS — Rejected, no actual code changes, controversial documentation refactoring.
  • 9e65ecc tests: extract the ListModel from ListView and "include" it as CitiesModel in ListView tests: cleanup ListView — Rejected, visual tests are not wanted in this repo.
  • 3ada0bf edit gulpofile.js to add gulp-changed (plus a local utility task) minor rearrangement in qt.[min.]js in lib (no code changes) minor change in ListView in tests (ListView does not display correctly in Windows 10 Edge) — Rejected, the gulpfile change was reverted later, visual tests are not wanted in this repo.
  • 8a45171 minor changes in Text and ListView in tests — Rejected, only visual tests are changed.
  • 9b86ec7 reformat and cleanup Generic.js,, TestPlugin.js, Text.js and TextEdit.js — actually, not sure. Changes in classes introduced in this branch should probably be merged or sqashed. Squashed and splitted, see #163 (patch set 1).
  • 6212a39 add a missing semicolon in TestPlugin.js — Rejected, syntax changes are unwanted, eslint will solve this later.
  • f6ba02e and one more — Rejected, this is just a status list that would be surely broken by the merge and unsupported.
  • e6aec16 added files omitted in last commit -- refactored here — Squashed and splitted, see #163 (patch set 1).
  • 3647358 see README.md for details -- refactored here — Squashed and splitted, see #163 (patch set 1).
  • 71786c8 code additions and rearrangements lib/qt.js add Title.qml to tests and use in all tests examples toprovide a top level title — Rejected, built code and tests only, sources included in a later commit.
  • 125f6ea extend TextEdit further — Rejected, built code and tests only, sources included in a later commit.
  • b95f74a qt.js : let TextEdit modify CSS as is possible in Text (work in progress) tests: modified TextEdit and Widgets — Rejected, built code and tests only, sources included in a later commit.
  • ef27864 add some font features wo TextEdit in Widgets in tests — Rejected, tests only.
  • 202ed09 add font functionality to TextEdit in qt.js modify TextEdit in tests to demonstrate font functionality — Rejected, built code and tests only, sources included in a later commit.
  • 22c72ea changes to TextEdit in tests modified TextEdit in qt.js — Rejected, built code and tests only, sources included in a later commit.
  • ac735f5 start adding QMLTextEdit to qt.js add TextEdit to tests modified ColumnRow and Widgets in tests — Rejected, built code and tests only, sources included in a later commit.
  • b074543 add ColumnRow example — Rejected, examples are not wanted here.
  • 3646a0a add additional tests examples accidentally not included in latest commit — Rejected, examples are not wanted here.
  • c0fe4d9 add TestPlugin toqt.js add more tests examples — Rejected, examples are not wanted here.
  • 4617ec4 no message — Rejected, examples only.
  • e20834e no message — Merged in #23.
  • 4e26e05 no message — Rejected, README change special to that fork.
  • e4f6de9 add QMLFont constructor in Checkbox and TextArea change permitted versions in TextArea add QMLAnimation constructor in SequentialAnimation add more test examples as subdirectoy tests modify README.md — Rejected, built code only, sources included in a later commit.

internal dev project

How about we make a separate project with all files and tools relevant to development of qmlweb itself but would clutter the official distribution:

  • screenshot utility + gulp task
  • design documents
  • .qmlproject file for the test files etc.

we can add it as a submodule in the main repo, so it would not be downloaded automatically but still we can reference the path consistently in gulp tasks etc.

Recent commits on `master` have inaccurate commit messages.

This is what the master looks like atm:

commit 1ae6a8e787ef18739496a2542d3b3f8c7260b8e3
Author: henrikrudstrom <[email protected]>
Date:   Fri Mar 4 13:57:19 2016 +0000

    something is not right with  test/fix, not.toThrow() makes a lot of other tests fail... changed the test and added it to failing

commit f44fe528e43b7c9881b57122da87e9b71bd9b6a4
Author: henrikrudstrom <[email protected]>
Date:   Thu Mar 3 16:11:23 2016 +0100

    tests: added timer test
    PR-URL: #94
    The timer is not very accurate, currently passes is values are "roughly" the same

    Reviewed-By: ????????? ?????? ????????? <[email protected]>
    Reviewed-By: Michael Martin Moro <[email protected]>Close #94

commit ca19719869818cc7de7e545008a4692b018d4da6
Author: henrikrudstrom <[email protected]>
Date:   Thu Mar 3 16:12:22 2016 +0100

    tests: basic state and property change tests

    PR-URL: #95
    Reviewed-By: ????????? ?????? ????????? <[email protected]>
    Reviewed-By: Michael Martin Moro <[email protected]>
    Close #95

commit 979d61dde45aa1dc9e1c4c3695b524c4ee0a012e
Author: henrikrudstrom <[email protected]>
Date:   Tue Mar 1 21:52:19 2016 +0100

    use 'spec' reporter

    PR-URL: #89
    Reviewed-By: ????????? ?????? ????????? <[email protected]>

    Reviewed-By: Michael Martin Moro <[email protected]>

    Closes #89

commit 4d36ad1b65adc75e87650001a9a8936debf30fb4
Author: henrikrudstrom <[email protected]>
Date:   Tue Mar 1 16:15:35 2016 +0100

    move div creation and removal to beforeEach, afterEach, loadQmlFile now returns the rootObject instead of rootElement

commit 39bd9d040563a3b3d552b7be8151b53cedaff7d5
…

Re-check element names and modules to conform with Qt

For example, 3fab595 («Rename TextArea to TextEdit to conform QtQuick») was not landed and needs to be redone.

There could be other elements that need renaming or moving.

Update: actually, I'm merging 3fab595 in #28, let's get that in for now.
I'm going to keep a TODO list here.

  • Re-check TextArea and TextEdit.

    Atm, both of them are defined in TextArea, see 636b1e0 for details. Perhaps those should be split, perhaps TextEdit should at least have a separate file.

  • Re-check Button — registerQmlType('Button', QMLButton); does not look valid.

  • Re-check PropertyChanges — registerQmlType('PropertyChanges', QMLPropertyChanges) does not look valid.

  • Re-check Component — registerQmlType('Component', QMLComponent); does not look valid.

  • Re-check QMLDocument — registerQmlType('QMLDocument', QMLComponent) does not look valid.

Add AUTHORS

Based on the git history:

  • Anton Kreuzkamp
  • Jan Gerrit José Marker
  • Joshua Kolden
  • Lauri Paimen
  • Michael Martin Moro / Plaristote
  • Сковорода Никита Андреевич / Nikita Skovoroda
  • Somsubhra Bairi

Remove `global` usage

This should be probably done after merges.

Instead of using global, everything should be added to a single object (qmlweb? QmlWeb? QMLWeb? QML?) and that object should be added as a window property on browsers or directly exported in CJS.

This will allow us to ditch encapsulate.begin.js and encapsulate.end.js files which are actually not js files and make the build process simplier.

Logo

There should be an org logo, perhaps.

cannot parse a property named 'signal'

Some standard element from QML have properties named 'signal' (QtQml.StateMachine.SignalTransition for instance).
However, the qml parser goes nuts when he meets the signal keyword used as a property name. We'll have to fix that at some point.

Add authors to the org

All collaborators should be probably asked to join to the org.
Will prepare a list a bit later, should be based on #3.

Merge igosoft-patches

See branch igosoft-patches.

These patches contain a Loader class, childrenRect and some small fixes.

Unfortunately everything is in one commit. Probably needs some splitting up and needs to be rebased on top of current master.
See also https://phabricator.kde.org/D623

/cc @igosoft Maybe you can set hand to it yourself, you know your patches best :)

Test interdependence, one failing test triggers others etc

I've noticed some strange behaviours when testing:

  1. Sometimes when one test fails, a lot of unrelated and unmodified tests starts to fail,
  2. Changes to one test makes another one fail.

Has anyone else noticed this kind of behaviour?
is this a gulp issue or something related to webqml?
should we consider tests that suddenly fail without any direct changes a failed test, i mean there must be some conditions that trigger it that we havent accounted for?
most recent example is the propertyNamedSignal test. Had to sneak in a fix: 1ae6a8e

Review your names and email in AUTHORS

@qmlweb/collaborators — please review your names and the main emails in the AUTHORS file. Additional emails could be added later in a separate file, if required.

Those would be also used in the «Reviewed-By» header field of commits that you review.

Specifically, @Plaristote, what should be used as the main email?
This blocks #25 landing =).

Being a KDE project

Hey guys,

I'm very glad to see this initiative arising, to get us collaborate more.
Some time ago (once two and a half years ago and once one year ago) I tried the same, but unfortunately without much success. Namely I have made QmlWeb a KDE project. Now we're here, back on Github.
I would like us to decide together, whether we want to stay/become a KDE project or become/stay an independent project.

KDE is a community of developers, mainly focused on creating the KDE Plasma Desktop and the KDE Applications. But it's a very open minded community, open to everyone who want's to collaborate (i.e. you don't need to use core KDE software to become a community member). It's a project, which is closely linked to the Qt project itself.

Github as well as KDE can offer us all the infrastructure we need (except of github missing mailing lists).
Github's advantage is, that all of us already are on Github, while only three of us are on KDE so far (@pavelvasev, @jangmarker and me). Still we're already a KDE project and pulling the eight of us into KDE might even be less work than building up independent infrastructure. Github still makes it easier to pull in newcomers, though (KDE unfortunately still fails at communicating the ease of contributing there).

One advantage of being a KDE project, that I'd like to emphasize, is not only community but funding. KDE has a big community, that brings us opinions and help, but KDE also has funding. The last two years QmlWeb has been present at the KDE Randa Meetings, which is a annual hacking sprint, where all kinds of teams inside KDE meet and work together for one week. And all expenses are defrayed by KDE e.V.
So: KDE can not only bring us together mentally, but KDE can bring us together physically, let it be Randa Meetings or our own QmlWeb sprint in Berlin, Heidelberg or even Russia.

I think, there's no need to tell you my favorite, still I ask you for your input and want us to decide together. Do we want to stay on github or join the QmlWeb-team of KDE?

Merge fork-kde-realinheritance

Merge kde/realInheritance by @akreuzkamp.

  • f676cc1 Make rootObject public via engine.rootObject — Duplicate from #19, Merged.
  • ebb1da4 Fix parsing of files with windows line-feeds — Duplicate from #19, Merged.
  • 043d693 Parse import statements correctly — Duplicate from #19, Merged.
  • e25251f Fetch xml data out of the dom sorted — [XmlListModel] depends on 22d307a. Merged
  • 38b909a Remove warning when a signal is created on demand — depends on 4eefc48.
  • 9b61c5b Use p instead of span inside Text elements. Merged
  • b3da103 Initialize states, transitions and transform properties. Rejected Already implemented
  • 11fb202 Don't use implicitWidth when width is binded, but not yet set. Merged
  • e30ac75 Fix property declarations with bindings. Merged
  • d7ae5de Fix cleanup when deleting objects and bindings. Rejected Already implemented
  • 5c90a47 Make XmlListModel.source loading asynchronous — [XmlListModel] depends on 22d307a. Merged
  • 1d74538 Revert change Component.onCompleted to $finishInit for implicitSize. Rejected finishInit doesn't exist anymore
  • a99da86 Fix some context handling bugs. Already done + executionContext doesn't even exist anymore
  • cd55b71 Do not try to add css-classes to non-Items. — Duplicate of e912bc5, Merged.
  • c98583d Use a list append method for ListModel instead of onItemsChanged.
  • 22d307a Initial support for XmlListModel. — [XmlListModel] Merged
  • be7bb90 Add support for keyboard handling. Merged
  • e8648d6 Add support for attached properties. Already done
  • f9dd070 Fix states. Makes a bad chromium bug appear.
  • 4eefc48 Return binding-handling to the property object.
  • f8acff6 Fix html widgets and move font css stuff from QMLText to QMLFont.
  • de80982 Fix animation with an explicitly set from value of 0. — depends on a3b6d2b. Merged
  • a19d7e5 Fix implicit size of Images. Rejected
  • a3b6d2b Fix Behavior. Merged
  • 7e5643e Fill list properties using an append function.
  • b2424df Return to using an object per property. Rejected No longer relevant
  • 17fd97f More progress. Rejected No longer relevant/Already done
  • a5b4f4d Fix parsing of default properties. Merged
  • dc4ac1d Fix positioners.
  • c481336 Fix scope handling with components.
  • b9afeda Remove inheritance helper function. Rejected No longer relevant
  • 8bd7e55 Fix implicit text size.
  • e8018c8 Some progress.
  • ad4645a Port some more types to the new syntax. Merged
  • 2443508 First draft. — Partially merged in #200, #186
  • ec4bee9 Fix three small bugs with QMLListModel. — Duplicate of 31841ec, Merged.
  • 4ef79bb Fix some closure compiler warnings. — Merged in #186

Merge fork-pavelvasev

Merge fork by @pavelvasev.
That is actually based on #19, I excluded the commits that are already present in #19.

  • c567f68 README.md: Fix color name in tutorial — Rejected, Readme-only change, inapplicable.
  • [listmodel] 04bd0b1 ListModel: Notify dependent properties about list element changes with .set(). — Merged in #206.
  • [upflow] 40895fb upflow option — Discarded by @pavelvasev.
  • [upflow] 88839ab did it! up flow contexts in qmlweb! — Discarded by @pavelvasev.
  • [context] a623154 context comments — Discarded by @pavelvasev. Comments only.
  • [aliaschangeback, textarea, textinput, button] dce7d96 fixes from viewlang — Button changes are discarded by @pavelvasev, TextInput signal changes rejected (not compatible with Qt QML). TextEdit padding fixes — Merged in #208. Alias fixes — Merged in #195.
  • [checkbox] 6bbfa83 checkbox fixes — Merged in #198.
  • [video] 816f334 fix crop mode for video — Rejected, can't reproduce any issue without it, @pavelvasev doesn't remember what that fixes. Perhaps that is controls-related, which we don't need.
  • [recursiveprops] 595a29f recursive mode for $initializePropertyBindings — Merged in #233.
  • [createqmlobject] a5efa1f createQmlObject fix — Merged in #171.
  • [context, signals] cfb28a0 discard last changes and refactor completed signals — partially already merged, partially merged in #171.
  • [outercontext] 561b202 propagate properties of component root objects to outer context — Was reverted in cfb28a0. Rejected in #241.
  • [context] 871fbf0 Component context optimization.. maybe we do not need it? — Merged in #249.
  • [context] bbcf79f some bugfixes on context — Merged in #212.
  • [fontbug] 6934ddd small bugfix — Rejected, already done in b0fdbe2 (#186).
  • [optimize] 690c82b small optimization — Rejected, is not worth it at the current state, optimizations would be performed at a later stage.
  • [debug] bae9d88 keep file path information in exceptions during qml parse — Merged in #205.
  • [import] f869b53 qmldirsContents contains QtQuick by default — Merged in #68.
  • [binding] 57c847f binding scope bugfix — Discarded by @pavelvasev.
  • [import] 25c4cf4 blob path fix — Merged in #68.
  • [video] 13af286 Video enhancements — Rejected, those are non-standard.
  • [video] 1ac2f5a Video control — Already present, this is just an import of @Plaristote Video implementation without any actual differences.
  • [createqmlobject, import, #qobjectdelete] 4c3bcc6 createQmlObject and fixes — Merged in be11b63, a081bf7, #171, #197, #196.
  • [comment, import] 22be36a small changes — merged in fdf6f97, #169.
  • [import] b91417c small bugfix — Merged in #68.
  • [recursiveprops] 0aab767 Bugfixes on recursive properties — Merged in #233.
  • [recursiveprops] 09b8243 Fixes to recursive properties dependency checking — Merged in #233.
  • [recursiveprops] 0e80a6e Recursive property calculation on init — Merged in #233.
  • [import] 9639deb Fix loading qmldir file when current dir is empty — Merged in #68.
  • [import] 7302347 2 fixes — Merged in #68.
  • [githubimport] 8cea5b6 fix — Rejected PR in #194, see #203 instead.
  • [githubimport] cc54d05 fixes to import code from github — Rejected PR in #194, see #203 instead.
  • [checkbox] 04746da Checkbox bugfix — Merged in #125.
  • [repeater] 497fbbd temp bugfix — Merged in #96.
  • [aliassignals] 780450b Aliases now emit changes signals — Merged in #195.
  • [import] e866988 Big bugfix — Merged in #68.
  • [import] 031c7c9 Uglybug in resolvedUrl fixed — Merged in #68.
  • [textinput] 659f381 Uglybug fix of text input — Merged in #124.
  • [color] 43c22d5 Fix QMLColor function and Rectangle color handling — Merged in #123.
  • [compdestr] 91eb23c Now $delete also set's parent to undefined — Merged in #115.
  • [repeater] 9dd3d75 Repeater bugfix — Merged in #96.
  • [compdestr] 04afa40 Component.onDestruction — Merged in #115.
  • [repeater] a743f6d Bugfix for Repeater — Merged in #96.
  • [import] 22ce160 Bugfix — Merged in #68.
  • [import] 281bf5b Qt.resolvedUrl function — Merged in #68.
  • [import] ac7ad8c Create engine.qmldirs and engine.qmldirsContent vars earlier — Merged in #68.
  • [domtag] 54de7de Allow to specify html tag name for component — Rejected, see #178. This functionality should be moved to a special element, e.g. in QmlWeb.Dom — see #182.
  • [import] 48ace8c Import statemement test and small bugfix — Merged in #68.
  • [import] 4470475 addModulePath method and some fixes — Merged in #68.
  • [import] 409b7b5 Initial import implementation — Merged in #68.
  • [import] adea24c Keep info that import statement uses qualified dotted notation — Merged in #68.
  • [import] 5459537 Comment on how import statements work — Merged in #68.
  • [import] c65dae1 Bugfix in readQmlDir — Merged in #68.
  • [sizing] a339ee7 Root element resizing fixes — Merged in #204.
  • [import] 3deb3bb Allow Qt.createComponent to load from urls too — Merged in #68.
  • [import] 7ec1e3b Revert to old exception-style behavior in getUrlContents — Merged in #68.
  • e89b83e Merge remote-tracking branch 'upstream/master' — Rejected, this is just 08a4558, which is present in #19.
  • [import] 2131576 bugfix for engine::addImportPath — Merged in #68.
  • [import] d3b575c engine::setImportPathList method — Merged in #68.
  • [import] bc1ba46 Less error logging for Qt.createComponent — Merged in #68.
  • [import] 7475fce addImportPath etc — Merged in #68.
  • [import] 72b7834 getUrlContents changed to return "" on failed gets. — Merged in #68.

Make the parser/compiler usable under Node.js (in a nice way).

This means:

  • Using proper module.exports instead of setting globals.

  • Making sure that we don't set globals in the parser.

  • Making an entrance point that allows users to do something as simple as:

    const qmlweb = require('qmlweb');
    const data1 = qmlweb.parsePath(path_to_file);
    const data2 = qmlweb.parseQML(qml_file_content);
    const data3 = qmlweb.parseJS(js_file_content);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.