Skip to content

Conversation

@hauntedhost
Copy link
Owner

how to get started:

$ git checkout ember-cli
$ cd rails && rake db:create && rake db:migrate && rake db:seed && rails s
# in another terminal
$ cd ember && ember install && ember serve --proxy http://localhost:3000
$ open http://localhost:4200/boards/4

current todo:

  • rearranging lists
  • sorting cards within list
  • dragging cards between populated lists
  • dragging card to empty list, bug: generates duplicate card 😡

/api
- upgrade to rails 4
- remove (now) unused rails gems
- add (wip) rails serializers

/frontend
- ember new
- add boards index/show routes
- add "dumb" boards index/show templates that *only* pass model to
  component (stopgap for when components are directly routable)
- initial component templates for boards, board, lists, cards, card comments
@romankuznietsov
Copy link

The problem with card duplication occurred because both sortable and ember were inserting a new node.
Ember did not detect the presence of the card in the list when the list was empty.
One way to fix this is to delete the node inserted by sortable right before we push updates to the ember store.
You should also use sortable's 'stop' callback instead of 'update'. This callback will be called only once when dragging cards across lists and so will eliminate duplicate api requests.
Alt text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants