Coder Social home page Coder Social logo

turbo-issues's People

Contributors

mquan avatar

Watchers

 avatar  avatar  avatar

turbo-issues's Issues

StoreEditor's table count on change event stops working

Caused by the introduction of {{isRestaurant}}, since this is a computed property it takes time to evaluate (evaluated after everything loaded) and doesn't happen instantly on didInsertElement, thus the DOMs wrapped inside this block won't show up until this is set to true.

Solve by letting all UI exist by default, then hide when computed property evaluated.

Current ember-data design/usage is unfit for multiuser ordering

As explained in #18, when a non-driving client (clientA) dirties an existing (loaded) record, the next commit by another client will not be loaded in clientA. This is inherently a bad design decision on ember-data part in only thinking of the case of 1 driving client instead of multi-user collaboration environment.

Take a look at this project, it seems to support multiuser using Push
https://github.com/tchak/colors-demo/tree/master/app/assets/javascripts

Checkedout orders are still on table when client comes back from sleep

Happens on iOS safari, the orders status are 'checkedout', but they're not removed from table. Here's what I think is causing it:

  • order is attached to table initially, then client go to sleeps
  • order sets to 'checkedout' from another client
  • first client come back from sleep, so the store.load is ok but since there's no remove order from table they're still get associated with the table. So on 'orders loaded' need to check if table doesn't order and if table.order.turbo_id === order.turbo_id then remove from table

job application request

Instead of just letting owner adding job by username, let user apply to specific branch. Then owner can approve/deny jobs. This improves the UX for owner.

Support keyboard shortcut and pro mode

Allow user to create and edit order using keyboard shortcut and virtual keypad on touch devices.

  • create item by typing in product number, enter
  • type in qty, enter
  • modify customization with arrow keys

Use mouse pointer or tap to reselect an item. Enter to complete editing. Highlight an item to let user know they're select. How to modify quantity and product?

Editing mongoose embedded doc won't save correctly

When you add and remove embedded docs, mongoose refuses to delete the removed doc. The problem is reported here:
Automattic/mongoose#341

Apparently you have to follow an async model where you can only add or remove 1 embedded doc at a time (sounds like a stupid restriction). So something like this:

conversation.messages.push(new Message(data))
conversation.save (err)->
conversation.messages[0].remove()
conversation.save (err)->

"can't perform op on DOM

In mobile order, click on an existing order, then click back to tables, now back to that order. This error is thrown:
Uncaught Error: Cannot perform operations on a Metamorph that is not in the DOM. Caused by the bindAttr in order.status_icon

           {{#if order.isWaiting}}
        <div class="label label-important status-name">
            {{order.timer}}
        </div>
    {{else}}
        <div class="label label-info status-name">
            <i {{bindAttr class="order.status_icon :icon-white"}}></i> {{order.status_name}}
        </div>
    {{/if}}

My guess is order.isWaiting is taking awhile to compute so the DOM in 2nd clause get shown (bindAttr gets added to ember's list of todos). Then when isWaiting computed, the first clause is shown, and 2nd clause DOM removed. At this point ember's list of todos for the 2nd clause is still there but it reference a non-existent DOM so error is thrown.

UI jump bug

Happen in mobile safari caused by setInterval. But now goes away, I suspect the reason is b/c I had 2 windows with setInterval running. If this is correct then either 1. safari fails to turn off the setInterval clock in the inactive page and the two interfere with one another or 2. one clock is used but it's global to all pages and tries to set the DOM of both active and inactive pages.

Removing takeout order sometimes also remove table order

On mobile order on dotcloud removing a takeout (the only one, also remove the one on first table). Although refreshing page show that it's not removed in db. So this is a problem with client's "order updated" code. Not reproducible

connect-assets logs cannot resolve image path

Can't resolve image path: ../img/glyphicons-halflings.png
Can't resolve image path: ../img/glyphicons-halflings-white.png

As pointed out here:
https://github.com/TrevorBurnham/connect-assets/issues/77

This module needs css concatenation, serve up image right (may be image sprite), and latest release shouldn't throw error. It also doesn't abide to the async model. Plus it's compiling files on the fly instead of precompile once in production.

While waiting for a rewrite, find an alternative

ember unbundles handlebars

For future ember release have to download handlebars and include it separately.

Also new ember (later than 0.9.8.1) changes ArrayUtils to EnumberableUtils. Ember data depends on this, ember-data rev3 will no longer be compatible. Current ember-data (7.8.12) still doesn't support embedded association

A better organization for shared products

Products should reside in Branch so that the same product inventory are referenced globally no matter which menu items are created from. Inside each menu is a reference to product, not the product itself.

This shouldn't be that hard to modify, just set embedded to false in products association. When a new product is created, the id is pushed to corresponding category.

Actually product then have a many to many association since it can belongs to more than 1 category.

Wait for Ember-data to support many-to-many association then.

Defer menus loading to speed up view rendering

Initial load with menus will block view rendering of branch name and tables/takeouts. For regular menu (26 items), this even causes 6 seconds delay from page load until first view render in iOS safari (4s in desktop).

Defer menus loading since user never really need this right away.

Standalone mode refreshes page every time accessing app from home screen

App has to be active when going to sleep in order to prevent reload. No easy fix beyond using localstorage to cache but this brings all sort of problems such as manually reconnecting socket.io and reinitialize branch and orders data.

Priority low: let users use the web version, anyone who uses the standalone mode will have to keep the app active. Otherwise they suffer 3 seconds page refreshes (could lose local data).

Additional price for size customization is too confusing

Usually if the base price is 5, default to regular, and small cost $1 less and large costs $1 more. It's much better to show regular $5, small $4, and large $6 in the customization.

This means we need to detect size customization and set the price_change + price instead of just price_change

2 approaches:
a. let user toggle a boolean size customization field. We could default to have 1 size customization always, but what if user remove it and set their own that doesn't have it. Plus having 1 extra option for just 1 case will clutter user experience. For now, they're on their own if they remove it and need it later. Later: If they already have size then don't let them add another customization, if they removed then show them the button for adding it.
b. detect customization name for each and every language. This is bad, would have to handle all the different ways people enter size, they could use "portion", "phần", "xuất", cỡ, "kích thước", etc.

Removing menu/products will cause error to orders with those objects

It's not practical to archive all menus and products ever created/modified. Just think up a way for this to fail silently when product/menu can't be found.

Basically client will throw: Uncaught Adapter is either null or does not implement find method , so just implement find method in adapter and return nothing.

hover over flot

Ember-data didCreateRecord execute AFTER socket.on 'order updated' in development mode

This is due to fast local server connection so the latency b/w going to server and back is less than an Ember runLoop, so the didCreateRecord call happens after data loaded. The problem is unique order# needs to be determined on the server so when this happens the order# is null.

The dirty solution is to set order# in the socket call but in a setTimeout so it's guaranteed to be called after didCreateRecord.

However, the problem with this approach is it dirties the model after loaded, transitioning the model in updated state. This manifests into a nasty subtle bug in multiusers scenario when client1 makes consecutive updates and commits and client2 fails to load (on second update) because after the first load, order# is set and the record is now in updated state. When the second load comes around, it fails since the last change hasn't been committed. client1 works fine b/c he went through the correct state transitions. The problem continue to occur when client2 makes modification without committing in b/w client1's commits.

This is inherently an ember-data design philosophy of only working with 1 driving client.

Add group filters to message inbox

Create boss/manager/waiters/cashiers/cook filters, these can also double as group selectors that message to all users with such role.

connect-assets 2.2.0 introduces bug

In user_settings it includes store_editor and tablet_order for no reason (yet mobile_order is in the same dir and not get included). Not sure if it's because they introduced a new syntax for including files.

Order versioning

Keep a history of all commits. The way to do this is to

  1. create an order_container in place of current order model
  2. add a boolean current field to order (set to true for last commit)
  3. for normal querying just find order with current:true. Every new commit: set the last one to current:false and new one to true

Second approach:

Use versions as embedded doc, always use the last embedded doc.

This makes a lot of sense b/c there shouldn't be that many commits (not more than 10 typically)

On the client: add Turbo.OrderDoc hasMany(Turbo.Order).

Also add user who makes the commit for each version

This is the easiest, but still a big rewrite

html comment on handlebars template causes commit error

This is the weirdest bug but if I have something like this in a template (item - part of orderform):

Then order commit won't work (sometimes throws error, sometimes just fail silently but do not set current_order to null)

The error thrown is still ember error not ember-data. Kinda weird.

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.