fastmail / overture Goto Github PK
View Code? Open in Web Editor NEWOverture is a powerful JS library for building really slick web applications, with performance at, or surpassing, native apps.
License: MIT License
Overture is a powerful JS library for building really slick web applications, with performance at, or surpassing, native apps.
License: MIT License
Currently, when I try to visit https://overturejs.com/, Chrome shows a NET::ERR_CERT_COMMON_NAME_INVALID
error.
Hi,
Can you kindly include an example on binding an object to a view ?
It seems to be related to ListView.js
however the docs page is empty at the moment...
Following the instructions to build locally, then opening examples/Todo/index.html
in Chromium 47 gets me:
Uncaught TypeError: O.RPCSource is not a function
(anonymous function) @ Todo.js:42
Thanks for open-sourcing this library! It's very interesting to read over.
While looking at the Todo example, I noticed that there is a call made to App.source.handle in order to register handlers for the TodoList type. I was surprised to not find this method in the documentation. Is this supposed to be a private method? If so, why is it used in the Todo example?
My second question regards the documentation for RPCSource#recordCommitters, etc., which the documentation says map type name strings to functions. I was confused at first as to how then RPCSource was supposed to implement RPC, as this didn't seem to be at all related to the JSON request format described above. On reading the code, though, I think I have come to realize that it's not actually a map of type name strings (I assumed it meant things like "TodoList", etc.) to functions, but rather a map of GUIDs to either strings specifying RPC method names or functions (in some cases). Is this correct? If so, I think that the documentation should make this more clear.
Thanks again for the library!
I think it would be helpful clearly state the target browsers for Overture.
It seems that IE9+ and evergreen browsers are the main target. IE8 is still shimmed with the ie8patches.js. I like this approach but it can be extended to slim things down a bit. We could move the ECMA5 methods to ie8patches:
There might be others. I'm just looking at low-hanging fruit right now.
Since there's not mailing list or discussion place, I'm going to dump my questions here.
Why add Array.get() and Array.getObjectAt() (and their set
siblings) ? By looking at the code, there's nothing to be gained and you add a few bytes to the size of the code. Array.include and Array.erase are the only ones that truly add functionality.
While Opera 12.14 displays example "Todo", Iceweasel 32.0.3 shows nothing and its debug console has these two messages:
SecurityError: The operation is insecure.
TypeError: O.RPCSource is not a constructor
in the todo example[1] , I added a new todo with arabic script[2] , but the search function didn't work on the arabic script , and didn't show any result.
[1] http://overturejs.com/examples/Todo/
[2] "بسم الله الرحمن الرحيم"
Hi,
is it possible to include overture inside a ionic/angular project?
I tried and I found out that there are scope problems and many errors occurs.
In Chrome, Firefox, and Safari (all latest versions, on mac), the Todo doesn't work and in the error console is:
[["getTodoLists",{},"0"],["getTodos",{},"1"]]
Overture-raw.js:4361 TypeError this.didFetchAll is not a function TypeError: this.didFetchAll is not a function
at App.source.handle.todoLists (http://overturejs.com/examples/Todo/Todo.js:117:14)
at NS.Class.receive (http://overturejs.com/build/Overture-raw.js:12791:29)
at null.ioDidSucceed (http://overturejs.com/build/Overture-raw.js:12675:14)
at NS.EventTarget.fire (http://overturejs.com/build/Overture-raw.js:3605:71)
at null. (http://overturejs.com/build/Overture-raw.js:19992:16)
at Object.RunLoop.invoke (http://overturejs.com/build/Overture-raw.js:4173:20)
at null._xhrStateDidChange (http://overturejs.com/build/Overture-raw.js:4428:21)
at xhr.onreadystatechange (http://overturejs.com/build/Overture-raw.js:19931:18)
at XMLHttpRequest._returnResultForData (http://overturejs.com/examples/Todo/fixtures.js:149:10)
at http://overturejs.com/examples/Todo/fixtures.js:115:14
Overture-raw.js:4361 TypeError this.didFetchAll is not a function TypeError: this.didFetchAll is not a function
at App.source.handle.todos (http://overturejs.com/examples/Todo/Todo.js:173:14)
at NS.Class.receive (http://overturejs.com/build/Overture-raw.js:12791:29)
at null.ioDidSucceed (http://overturejs.com/build/Overture-raw.js:12675:14)
at NS.EventTarget.fire (http://overturejs.com/build/Overture-raw.js:3605:71)
at null. (http://overturejs.com/build/Overture-raw.js:19992:16)
at Object.RunLoop.invoke (http://overturejs.com/build/Overture-raw.js:4173:20)
at null._xhrStateDidChange (http://overturejs.com/build/Overture-raw.js:4428:21)
at xhr.onreadystatechange (http://overturejs.com/build/Overture-raw.js:19931:18)
at XMLHttpRequest._returnResultForData (http://overturejs.com/examples/Todo/fixtures.js:149:10)
at http://overturejs.com/examples/Todo/fixtures.js:115:14
Does this library expect users to create more views like tabs/pages, date picker, and datetime picker (supporting Gregorian, Islam, and Jalali calendars), tree, etc., or developers will do it?
Hey guys,
with performance at, or surpassing, native apps
care to join our party? ;)
https://github.com/krausest/js-framework-benchmark
current standings: https://rawgit.com/krausest/js-framework-benchmark/master/webdriver-ts-results/table.html
@neilj thanks for building this in public! Overture is great for those (like me) who like to be able to tinker with Fastmail (e.g. help building Fastmate).
I'm trying to build a function that mimicks the scrolling of a MesageList
(without the need for a physical scroll) so that everything in a WindowedQuery
gets loaded. E.g. when in Fastmail I have 60 items initially loaded, so I thought that doing FastMail.router.getAppController('mail').mailboxMessageList().getObjectAt(60);
would figure out how to load the 61th object by querying the source. But I can't figure out what the right way is to load the _storeKeys
beyond the initial 60. Would you have any suggestions on how to achieve this (e.g. based on the Fastmail exampel)
Hi,
I have a few questions about how the binding works in overture.
O.View
instances or any instance that is a O.Object
instance. Is that correct?O.ObservableArray
instance and that the elements in this array should be O.Object
s , but it seems like I was wrong.Here's some code that I tried but couldn't get working
var MainView = new O.View({
people : new O.ObservableArray([
{ id: 1, name: 'John'},
{ id: 2, name: 'Claude'}
]),
draw: function (e, l, el) {
var peopleElements = this.get('people').map(function(person) {
return el('p', { text: O.bind(person, 'name') });
});
return el('div', peopleElements);
}
})
new O.RootView(document).insertView(MainView)
I got the following error.
Uncaught TypeError: undefined is not a function at 'Overture-raw.js:2810'
Minimal test case:
<!DOCTYPE html>
<body>
<script src=Overture-raw.js></script>
<script>
O.RunLoop.invoke( function () {
var root = new O.RootView(document); // v0
root.insertView( new O.View({ // v1
layerTag: 'div',
id: 'foo',
childViews: [
new O.SwitchView({ views: [[ // v5
new O.SwitchView({ views: [ // v3
new O.LabelView({ value: 'A' }) // v2
] }),
new O.LabelView({ value: 'B' }) // v4
]] })
],
}) );
});
</script>
Expected output: AB
Expected HTML output (simplified):
<div id="v6">
<!--SwitchView v5-->
<!--SwitchView v3-->
<span id="v2">A</span>
<span id="v4">B</span>
</div>
Actual output: BA
Actual HTML output (simplified):
<div id="v6">
<!--SwitchView v5-->
<!--SwitchView v3-->
<span id="v4">B</span>
<span id="v2">A</span>
</div>
On Firefox mobile, I can't do drag/drop. Also, the default height is way too much for a mobile screen.
Consider moving the loader to a new repository. Staying in this repo, it becomes the step-child because it's not included in the API documentation or the example. Furthermore, it's truly completely independent of Overture (other than the "O" namespace which can be optional).
While I imagine others would like to choose their own, more popular, loader, the Overture loader stands out in that it's great for mobile web applications because:
The build steps for it aren't complicated and one could easily use gulp to package it up instead of transferring over the whole build chain of Overture.
All it needs is:
😀
Build instructions would be great. I've gotten this far, but am stuck on what appears to be missing dependencies? Node is not my native tongue, so it may be an obvious issue.
Building overture requires Node.js
Clone the overture repository:
git clone https://github.com/fastmail/overture.git
Now cd overture
, and install some dependencies:
npm install less
npm install minify
Once these are installed, you can run make
to build Overture from source.
... This builds Overture-raw.js, but seems to throw this error before it can minify the code:
mkdir -p docs
node tools/csstools.js minify tools/docbuilder/styles/main.less docs/main.css
/Users/cory/Code/overture/tools/csstools.js:231
return css.replace(/([0-9]*\.[0-9]+)em/g, function ( val ) {
^
TypeError: Object #<Object> has no method 'replace'
at emround (/Users/cory/Code/overture/tools/csstools.js:231:16)
at /Users/cory/Code/overture/tools/csstools.js:248:19
at /Users/cory/Code/node_modules/less/lib/less/render.js:62:17
at Object.finish [as _finish] (/Users/cory/Code/node_modules/less/lib/less/parser/parser.js:174:28)
at Object.ImportVisitor.run (/Users/cory/Code/node_modules/less/lib/less/visitors/import-visitor.js:32:18)
at Object.Parser.parse (/Users/cory/Code/node_modules/less/lib/less/parser/parser.js:180:22)
at Object.render (/Users/cory/Code/node_modules/less/lib/less/render.js:54:18)
at Object.exports.fromLess (/Users/cory/Code/overture/tools/csstools.js:246:10)
at /Users/cory/Code/overture/tools/csstools.js:278:25
at /Users/cory/Code/overture/tools/csstools.js:164:25
make: *** [docs/main.css] Error 8
Thanks for open sourcing this, I'm excited to play with it!
Hi,
I'm having problems when doing silly things such as:
FastMail.mail.screens.compose.instance
.beginPropertyChanges()
.set('subject', 'New subject')
.endPropertyChanges();
The UI itself (ie. the Subject field) does not reliably update in the DOM, although I can often "make" it update by clicking somewhere on the page. This is somewhat sub-optimal. I'm guessing that I am just missing some call to an event loop or a manual refresh or (more likely) missing some entire philosophical concept behind the the ObservableProps
object?
Hi,
Are there any unit tests(or integration tests) for this project? I couldn't find them on the repository.
Where can one find the css for the components in the view package?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.