GithubHelp home page GithubHelp logo

Update emberjs example about todomvc HOT 28 CLOSED

tastejs avatar tastejs commented on May 6, 2024
Update emberjs example

from todomvc.

Comments (28)

boushley avatar boushley commented on May 6, 2024

Other deficiencies:

  • Clicking on the task content should not mark the task as completed.
  • Double click should allow editing.
  • "Mark all complete" checkbox should be hidden when there are no tasks.
  • Footer should be hidden when there are no tasks.
  • Need to add delete ability on hover over tasks.

from todomvc.

sindresorhus avatar sindresorhus commented on May 6, 2024

The Ember+Require app just landed in 1b65322

@stas Would you be interested in getting the non-require version completed? I think there could be a good amount of reuse.

//cc @addyosmani

from todomvc.

stas avatar stas commented on May 6, 2024

I could take a look if there's nobody else interested in picking it up.
Also maybe we should ask @tomdale
He is the original author and It would be nice to ask him first.

from todomvc.

tomdale avatar tomdale commented on May 6, 2024

👍

from todomvc.

addyosmani avatar addyosmani commented on May 6, 2024

I think the non-AMD/Require version wouldn't be too difficult to complete. Always happy for @tomdale to review anything Ember related going into this project, just to be on the safe side :)

from todomvc.

sindresorhus avatar sindresorhus commented on May 6, 2024

@stas Still interested? We would really like to get an up to date version into our 1.0 release 😃

from todomvc.

stas avatar stas commented on May 6, 2024

Hey, sorry guys I'm a bit busy lately.
I was following ember devlog and was thinking to update both examples with the new routing support.

When you were planning to release 1.0, lets see if we can sync.

from todomvc.

sindresorhus avatar sindresorhus commented on May 6, 2024

Np, I absolutely understand ;)

We've set the release date to june 20th, which means we'll need it some days before that.
Do you think you'll be able to have it done by that?

from todomvc.

stas avatar stas commented on May 6, 2024

20th looks great, my holidays start early june, so it seems doable.
Sure this should not stop people jumping in :)

from todomvc.

sindresorhus avatar sindresorhus commented on May 6, 2024

@stas Sounds good! :D

from todomvc.

addyosmani avatar addyosmani commented on May 6, 2024

I've got bandwidth to work on this so I'm going to wrap it up this evening and hopefully have @sindresorhus review :)

from todomvc.

sindresorhus avatar sindresorhus commented on May 6, 2024

If you dare :p

from todomvc.

addyosmani avatar addyosmani commented on May 6, 2024

I plan on submitting this while you're asleep.

It's the safest way to sneak in a merge ;D

from todomvc.

stas avatar stas commented on May 6, 2024

Sounds cool :)

from todomvc.

sindresorhus avatar sindresorhus commented on May 6, 2024

I never sleep! :trollface:

from todomvc.

addyosmani avatar addyosmani commented on May 6, 2024

Of course you don't :p

One does not simply

from todomvc.

addyosmani avatar addyosmani commented on May 6, 2024

@sindresorhus could you review https://github.com/addyosmani/todomvc/tree/emberjs?

If you're happy with it, let me know and I'll pull it into master, otherwise address any issues you notice :)

from todomvc.

sindresorhus avatar sindresorhus commented on May 6, 2024

Prepare... Ya, there are a few comments :p

  • Trim input on edit and remove if empty

Make sure to .trim() the input and then check that it's not empty. If it's empty the todo should instead be destroyed.

  • Remove app.css and the reference in the HTML
  • app.js needs an IIFE and 'use strict'
  • app.js: Missing some statement curly braces
  • Split app.js up in appropriate files?

from todomvc.

addyosmani avatar addyosmani commented on May 6, 2024

@sindresorhus thanks for the review. I'll address those!

On the last point, I think we need to decide whether we want to enforce splitting up of applications or keeping it optional. I was looking at the Backbone app last night and remember that it currently also keeps all of its logic in a single file (but of course can be split out). Thoughts?

from todomvc.

sindresorhus avatar sindresorhus commented on May 6, 2024

Even though not necessary in our small Todo app, I think we should enforce some good practices.

from todomvc.

tomdale avatar tomdale commented on May 6, 2024

+1 on splitting into multiple files. I think that making these as "realistic" as possible is important. Every web app developer I know is using a tool for file management these days.

from todomvc.

addyosmani avatar addyosmani commented on May 6, 2024

Updated in https://github.com/addyosmani/todomvc/tree/emberjs:

  • IIFE + use strict added
  • Split app.js into its component parts (models, controllers, main)
  • Missing curly braces added
  • Wasn't sure about the app.css comment - it's used in the Spine demo app and is needed for overrides

Missing: Trim input on edit and remove if empty

@tomdale there's currently one issue with the app that I'm trying to wrap my head around. We're working under the same namespaces as the RequireJS version of the app, however, now that IIFEs are being used the binding context for content seems to be a little messed up. e.g the remaining and completed item counts now only seem to update correctly on page refresh but not when the app is interacted with.

Do you think you might be able to take a look to see what I'm doing wrong? :)

from todomvc.

stas avatar stas commented on May 6, 2024

There's a new pull request #202 to include routing support.

@addyosmani please check if there are any other issues like the one with counts.

from todomvc.

addyosmani avatar addyosmani commented on May 6, 2024

@sindresorhus I've just patched the trim on edit behaviour and the remove if empty should be working fine too. Could you do a final review on the emberjs branch so I can merge into master if we're happy with it? :)

from todomvc.

sindresorhus avatar sindresorhus commented on May 6, 2024

@addyosmani Almost, only thing left is that the filters are not selected when clicked. All should be selected by default. The others should be selected when the hash changes and on load.

from todomvc.

sindresorhus avatar sindresorhus commented on May 6, 2024

ping

from todomvc.

addyosmani avatar addyosmani commented on May 6, 2024

@sindresorhus Tried fixing this, but ran into some roadblocks. I've pinged a few Ember devs including @tomdale but I think they might be swamped. If no one is able to help resolve, I'll give this another shot tomorrow morning.

from todomvc.

sindresorhus avatar sindresorhus commented on May 6, 2024

Closing as routing was fixed in #231

from todomvc.

Related Issues (20)

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.