Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<to-do> #89

Merged
merged 116 commits into from
Jul 19, 2017
Merged

<to-do> #89

merged 116 commits into from
Jul 19, 2017

Conversation

snuggs
Copy link
Member

@snuggs snuggs commented Jul 6, 2017

Fixes #85

@brandondees
Copy link
Collaborator

http://todomvc.com/

@snuggs
Copy link
Member Author

snuggs commented Jul 6, 2017

@brandondees already on it.

@snuggs snuggs mentioned this pull request Jul 6, 2017
@snuggs
Copy link
Member Author

snuggs commented Jul 6, 2017

@tmornini @brandondees First working pass
to-do

@snuggs
Copy link
Member Author

snuggs commented Jul 6, 2017

https://github.com/tastejs/todomvc-app-template

@brandondees this is rediculous the amount of code they want you to have for their boilerplate. I feel we should have a <to-do> and <to-do-mvc> custom element. One for OUR conventions. And the latter for us to abide by what they consider a "working TODO Example" which truth be told is about 60% more code than is needed.

Please advise...

/cc @tmornini @halorium

@brandondees
Copy link
Collaborator

yeah i agree but it still helps advertise if we can play by their rules to at least be in the game, i think. then also do the lighter variant and make a hullabaloo about how the snuggsi way is even better faster stronger and can still pass all the acceptance tests. you might look at how other tools have done their entries, i assume stuff like polymer is represented already and might give you some idea of ways this competition can be approached.

@snuggs snuggs force-pushed the feature/85-to-do branch 6 times, most recently from 5fdde0e to ba01a45 Compare July 6, 2017 18:36
@tmornini
Copy link
Collaborator

tmornini commented Jul 6, 2017

@snuggs You need to speed things up a bit.

The app loads and runs slowly and it took you way more than 12 hours to get this done. 😄

Oh, and while you're at it, this has way too few commits. Break that shit up! 👍

@tmornini
Copy link
Collaborator

tmornini commented Jul 6, 2017

@halorium Your name in lights!

@snuggs snuggs force-pushed the feature/85-to-do branch from fd5e511 to e1b8e59 Compare July 7, 2017 01:41
@snuggs
Copy link
Member Author

snuggs commented Jul 7, 2017

@tmornini Minus filtering been done. Looks like we're coming in under 100LOC (Whitespace included). Prunin' the bonzai bush. Take a look @ React while you wait. https://github.com/tastejs/todomvc/tree/gh-pages/examples/react/js

/cc @brandondees @halorium

@tmornini
Copy link
Collaborator

tmornini commented Jul 7, 2017

@snuggs I count 181+62+108+87+50 = 488 LOC for React

@@ -602,6 +602,9 @@ <h2 slot=header>
<a href=/examples/input-output.html>&lt;input-output&gt;</a>

<li>
<a href=/examples/to-do>&lt;to-do&gt;</a>
Copy link
Collaborator

@tmornini tmornini Jul 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this valid? The <li> doesn't appear to be closed.

Copy link
Collaborator

@brandondees brandondees Jul 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http://networkingtimes.com/blog/wp-content/uploads/2015/10/closing.gif

HTML5 is way less strict than the XHTML which became best practice for a while... closing tags are mostly optional. how does it work? ¯\(ツ)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tmornini there's TONS of them actually. Been in the spec (even IE6) since like 2000. DOM Level 2.

Surprised you didn't say anything about <html> the <body> tag and the <head> tag... or lack thereof ;-)
https://www.w3.org/TR/html5/syntax.html#optional-tags

Copy link
Member Author

@snuggs snuggs Jul 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brandondees HOW it does it is the following DOMParser logic that runs. It's different per element but this is the spec rules for <p> /cc @tmornini

capture d ecran 2017-07-07 a 04 52 18

Copy link
Member Author

@snuggs snuggs Jul 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correction. Looks like since 1999 DOM Level 0 @tmornini. Article came out in 2008 and author basically stated "9 years later the information still isn't out there" https://meiert.com/en/blog/optional-tags-in-html-4/

get count ()
{ return this.context.tasks.length }
})

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mentioned a blank line at the bottom of source files and mentioned that they're for me.

I don't like blank lines at the bottom. I think you're thinking of no line ending on the last line, which I think is horrible. 😄

Copy link
Member Author

@snuggs snuggs Jul 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is a line ending? Now i'm confused @tmornini

@tmornini
Copy link
Collaborator

tmornini commented Jul 7, 2017

Surprised you didn't say anything about

@snuggs Just a drive-by-review. Squirrel! 😄

@snuggs
Copy link
Member Author

snuggs commented Jul 7, 2017

Functionality complete. @halorium @tmornini. Givin' 'er a paint job now.
loren

image

@tmornini
Copy link
Collaborator

tmornini commented Jul 7, 2017

@snuggs Looking good! 🍿

@snuggs
Copy link
Member Author

snuggs commented Jul 19, 2017

@brandondees @mrbernnz @tmornini @halorium @btakita @kurtcagle @dcchuck @janz93 @pachonk @henryarbolaez @Robertchristopher

BEHOLD! https://snuggsi-kwwwdjwzvw.now.sh/examples/to-do

to-do

@@ -0,0 +1,78 @@
Element `to-do`

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have mixed feels about this blank line... i think it works great when it's one file per element declaration, nothing else in the file. if it's inline with other content, such as in html or whatever, then i think you gotta have visual grouping of related code more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm well best part is it's just whitespace so we can author how we please. :-) @brandondees

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah just commenting

}


onidle (mark) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when does this run? frequently? seems like it might be doing wasteful work if so. might be able to optimize with a dirty checking mechanism for eager exit

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brandondees it runs after render. We have to do this or creates logic in view. Currently this operation takes about 100mu


store (id=this.tagName) {
localStorage.setItem
(id, JSON.stringify (this.context))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like a pretty naive approach but no worries there, given the use case. I wonder if it could be named something clearer, like SimpleStorableStateElement or whatever to clarify purpose/intent a bit more.

Copy link
Collaborator

@brandondees brandondees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments, but LGTM

@snuggs snuggs merged commit 1914a86 into master Jul 19, 2017
@snuggs snuggs deleted the feature/85-to-do branch July 19, 2017 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants