Giter Club home page Giter Club logo

overture's People

Contributors

arrayjam avatar callumskeet-fm avatar chasenstark avatar chris-morgan avatar christopherbruno78 avatar kemitchell avatar neilj avatar nowylie avatar rjbs avatar robn avatar tjwds 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

overture's Issues

Bind JS Object to a view

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...

Todo example doesn't run locally

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

RPCSource#handle a public method, function map clarification

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!

Browser Support

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.

Array methods motivation question

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.

Example Todo: Can not run in Iceweasel

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

overture + angular/ionic

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.

Todo Fails to Work

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

How to/Who will add more views?

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?

Documentation rendering

  1. Some pages (look at the View module) have a bad path to CSS/JS resources
  2. The left-side nav menu seems to generate in a random order. This is annoying. (I'm glad that serch mostly works.)
  3. Is there a way to view the "(...and XX more)" in the search box? This is annoyingly limited when looking at where "Bind" is defined.

Fetch next window?

@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)

Question about bindings

Hi,

I have a few questions about how the binding works in overture.

  1. What are the types/kinds of objects that are bindable. To me it looks like, we can only bind to properties O.View instances or any instance that is a O.Object instance. Is that correct?
  2. How does the binding of arrays work. It looks like I should be creating a O.ObservableArray instance and that the elements in this array should be O.Objects , 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'

Nested SwitchViews can place their contents out of order

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>

Split Loader to a new Repo

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:

  • it's probably the smallest dynamic loader out there
  • it can cache to localStorage

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:

  • package.json
  • gulpfile.js
  • Readme.md

😀

Add build instructions to README.md

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 from source

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!

Setting properties does not immediately call observers

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?

Unit tests

Hi,

Are there any unit tests(or integration tests) for this project? I couldn't find them on the repository.

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.