Coder Social home page Coder Social logo

todos's Introduction

DEPRECATED

This repository is not used anymore as an example for Meteor projects.

Look for Meteor examples here

OLD README

Circle CI

This is a Todos example app built on the principles described in the Meteor Guide.

Versions

This version (the master) branch uses the Blaze rendering library, with code written in ES2015 JavaScript.

The react branch implements the same application using React

The coffeescript branch implements this (the Blaze) version of the app in CoffeeScript.

Note that attempts will be made to keep the branches up to date but this isn't guaranteed.

Running the app

meteor npm install
meteor

Scripts

To lint:

meteor npm run lint

todos's People

Contributors

aldeed avatar avital avatar benjamn avatar dburles avatar deifinger avatar dferber90 avatar domiii avatar dominikguzei avatar electr0sheep avatar filipenevola avatar fknipp avatar geoffreybooth avatar html5cat avatar hwillson avatar jdivy avatar johanbrook avatar jwreagor avatar kachkaev avatar lorensr avatar msaelices avatar petestreet avatar rhettlivingston avatar tmeasday avatar trajano avatar workflow avatar xuefeng-zhu avatar yves-christol avatar yyx990803 avatar zol 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

todos's Issues

Acceptance Tests / CI

  • Adding new task
  • Deleting task
  • Editing task content
  • Making list private (mobile and desktop)
  • Deleting list (mobile and desktop)
  • Changing list title (mobile and desktop)
  • Registering
  • Logging in
  • Being redirected to a list when you go to the home page

Look at using https://chimp.readme.io to build these.

Unit tests

  • Collection mutator tests
  • Publication tests
  • Method implementation tests
  • Template rendering tests
    • Example with a mocked publication
  • Template event handler tests (need to mock methods)

Update Application Structure to match guide

I think this includes:

  • Renaming the packages to app- if that's what we are doing
  • Deciding on collection file names + split (i.e. should the publications / factories / etc be in separate files?)

Ensure SSL

Perhaps by adding the force-ssl package?

Add OAuth login with Google

It's a shame not to demo this, and perhaps this means we should build out account merging?

There's a decision to be made on how deep we want to go into the accounts rabbit hole - perhaps we could leave this for later.

Switch `lists/todos` to use publish-composite?

Something like:

Meteor.publishComposite('list/todos', function(listId) {
  check(listId, String);

  const userId = this.userId;
  return {
    find() {
      return Lists.find({_id: listId, {userId: {$or: [{$exists: false}, userId]}});
    },
    children: [
      {
         find(list) {
           return Todos.find({listId: list._id});
         }
      }
    ]
  };
});

This would mean:

a) We wouldn't need to have the userId denormalizer (we have a second denormalizer, so we still demonstrate the pattern)

b) We'd actually be using publish-composite, so we'd have an example to use

c) We'd also be showing how the authorization works

Set up reset password flow

Make sure you can reset your password. This is a matter of figuring out how to get useraccounts to do it for us.

Make sure email login is enforced at DDP level + tests

Right now, you could use Meteor.loginWithPassword to log in with a username from the console. We should prevent that, and test that you can't log in with invalid stuff.

That's not correct - apparently useraccounts enforces it for you! Wow.

https://github.com/meteor-useraccounts/core/blob/master/Guide.md#disabling-client-side-accounts-creation

@splendido, can you help me understand more about exactly what useraccounts is guaranteed to enforce?

Why are todoItems re-rendering when `list.incompleteCount` changes?

@avital and @stubailo (bringing this over from slack as this seems a more persistent place).

I'm looking at solving this problem a different way (using MM {fields}), but as it turns out, the problem has re-appeared in this repo somehow, even though AFAICT we are still following the same pattern of using {{#with list._id}}.

I can't for the life of me figure out what's different. I've played around with it a bit. Perhaps one of you two can figure it out easily?

here's your original commit to fix it: meteor/meteor@2e425df

Launch Screen hold on first fade in

For now I've replaced the uihooks with a simple momentum fade, but we should talk about why the hold was there before.

Usually the insertElement callback wouldn't fire when the thing was first rendered, so we should investigate what's going on in vanilla todos.

Figure out how to make `listsShow` properly pure?

It's challenging to do right now, and in fact isn't super necessary because we can use StubCollections to test it properly anyway.

But it does violate a couple of principles:

  • That components should be pure where possible
  • That the data should be fetched at the same place where it is subscribed to.

We could pass the list and todos into it though. The main issue is the performance (re-rendering of all todo items when you check an item off). Still need to resolve that.

Don't expose collections directly

Collections - don't expose the collection directly, have an API for talking to it in case you need to change the schema or guarantees later

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.