Create views for Component management #533

Closed
simonwex opened this Issue Nov 14, 2013 · 7 comments

Projects

None yet

4 participants

@simonwex
Member

tl;dr: Users need to be able to manage their components. We need to set up some Angular templates to let them do CRUD operations on them.

A components looks something like this:

{
  url: "http://secretrobotron.github.io/bob-button/",
  name: "bob-button"
}

User creates a component from a URL

The url is inputted by the user. We'll then run out and grab the component at the URL and parse the name. We should provide feedback if the component is malformed. Reasons for being malformed could be:

  • For full URLs including non-SSL protocols - Error
  • Missing instructions such as components not extending ceci-element - Error
  • For defining 'ready' - Warning
  • Invalid name

I'm sure there are a bunch more, but the infrastructure for these is a good start.

We can also provide feedback about the listeners, name, broadcasts and public methods. This will help a user troubleshoot potential problems with their component.

User Lists all of their added components

This is a pretty normal listing of the user's components.

Users view a specific component

On load of this view, we should run out and update the details of their component in the same way we do during create. We should also let them modify the URL.

User can delete a component

Good ol' delete. I'd prefer a "delete" and undo rather than a confirm.

@bczulauf
Collaborator

Angular!!! My weeklong love (with a bit of hate) affair finally pays off. On it.

@bczulauf bczulauf was assigned Nov 14, 2013
@dethe
dethe commented Nov 18, 2013

Next steps:

  • Wire up URL parsing to work with our proxy
  • Persist components in MongoDB
  • Start adding various types of validation
@simonwex
Member

@dethe I'd like to see the model when you've got a draft of it.

Why do we need to do URL parsing? We should simply suggest that all URLs be relative.

@simonwex
Member

This stuff should live in mozilla-appmaker/appmaker repo and get its own controller (i.e. routes/components.js)

@dethe
dethe commented Nov 18, 2013

@simonwex

Sure, as soon as I get that far, will send model around.

URL parsing is for mapping github URL entered by user to our proxy.

I'll move it to a controller in appmaker, just wanted to grapple with it standalone first to understand the pieces.

@simonwex
Member

It's not only for github URLs, no? I had pictured something like this:

http://cors.io/mozilla-appmaker.github.io/component-counter/component.css

@davidascher

done for now

@davidascher davidascher closed this Dec 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment