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

v6 beta branch #489

Merged
merged 3 commits into from
Jun 28, 2017
Merged

v6 beta branch #489

merged 3 commits into from
Jun 28, 2017

Conversation

yoshuawuyts
Copy link
Member

@yoshuawuyts yoshuawuyts commented May 8, 2017

in-progress target branch we can use for breaking behavior. The prototype branch is basically a full rewrite; this allows us to put out some betas and iterate on the minor changes we want for the next version.

Basically I'm thinking we keep the API stable, but yeah there's a few nits that are technically breaking. So we should iron those out in a semver major. Yay for boring changes ✨

related issues

@yoshuawuyts
Copy link
Member Author

Timing API has been upgraded, now shows separate timings for creating DOM trees + morphing the trees.

screen shot 2017-05-09 at 13 35 01

I'm not sure about the event names tho; right now they are:

choo.render:view.route   # for choo's internal stuff
choo.emitter:foo:bar     # for an event a user registers

What I'm wondering is if we should perhaps upgrade nanobus to delimit internal events with a "/" so it'd become:

choo:render/view:route   # for choo's internal stuff
choo:emitter/foo:bar     # for an event a user registers

Thoughts? cc/ @juliangruber @timwis

@yoshuawuyts
Copy link
Member Author

note to self: move the new choo performance.measure() to requestIdleCallback and use choojs/nanotiming#1

@juliangruber
Copy link
Collaborator

thoughts:

  • [choo] render: view.route
  • choo.render(view.route)
  • [choo] render(view.route)

@moszeed
Copy link
Contributor

moszeed commented May 16, 2017

i like the following proposals by @juliangruber

  • choo.render(view.route)
  • [choo] render(view.route)

@yoshuawuyts
Copy link
Member Author

yoshuawuyts commented May 17, 2017

@juliangruber gonna try some of those out; like the choo.render(view.route) idea for sure! - should become part of choojs/nanotiming#3 I reckon

edit: The syntax to create timings internally is:

var nanotiming = require('nanotiming')
var nanobus = require('nanobus')

var timing = nanotiming('choo')
var uuid = timing.start('render')
timing.end(uuid, 'render')

var timing = nanotiming('choo')
var name = "route['" + '/' + "']"
var uuid = timing.start(name)
timing.end(uuid, name)

var emitter = nanobus('choo.emit')
emitter.emit('log:debug')

So this leaves us somewhat constrained in our display options. I'm thinking naming like this might be neat:

choo(render) [12356778]
choo(route['/']) [13355671]
choo.emit('log:debug') [13355675]

The weird tailing numbers are unique UUIDs because turns out we need them if we wanna keep tracing stuff. The output for choo-log can be modified by updating the Nanobus package. I def like this better than what we have now (:

@yoshuawuyts
Copy link
Member Author

yoshuawuyts commented May 17, 2017

Also thinking of adding a navigate event which is fired whenever path changes, and returns the current name of the route. This could be used in the logger as a debug style event - and would be useful for APM providers so they can hook into the actual name of the route.

edit: also expose the route name as state.route

@yoshuawuyts yoshuawuyts force-pushed the v6 branch 3 times, most recently from 81c934b to f3de632 Compare May 20, 2017 16:54
@tornqvist
Copy link
Member

Is there any reason for createLocation to not be exposed on the prototype? It would kind of solve #440 as you could roll your own method that ignores hashes and then simply set opts.href to false and implement nanohref in a similar way.

@yoshuawuyts
Copy link
Member Author

@tornqvist I think what you're proposing makes sense (:

@yoshuawuyts
Copy link
Member Author

Last issues remaining:

CHANGELOG.md Outdated
you ever need to.

We've also tweaked the event system a little. All built-in event names are now
available as constants under `choo.events`. And we've introduced three new
Copy link
Collaborator

Choose a reason for hiding this comment

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

three or two?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, good point - it's two brand new ones, and one that was introduced a
couple of weeks ago and folks might not be aware of. Will fix! :D

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed!

upgrade to new nanobus

remove nanohistory

add nanotiming

remove nanomount

move newTree to next tick

upgrade timing API

add more node warnings to .start/.mount

add morph timing

pass app instance to .use()

self-clearing async-timing

clean up timings

better mount error

fix mount bug

de-prototype helper functions

update to latest nanotiming

upgrade to nanotiming 5

update nanotiming

add toString asserts

more assertions

add event based tracing

expose createlocation

assert return types from render to always be the same

add navigate event

expose route on state

expose events

update uglify

use scroll-to-anchor

update nanobus

document events

update docs

more docs

changelog v6

upgrade nanomorph

fixup! neatify morph assertions

update bel dep

add popstate docs to changelog
@yoshuawuyts yoshuawuyts merged commit eb9b7fd into master Jun 28, 2017
@yoshuawuyts yoshuawuyts deleted the v6 branch June 28, 2017 13:53
@yoshuawuyts
Copy link
Member Author

📦 v6.0.0-0 (release candidate)

Please share any feedback here #519. Thanks! 🎉

@goto-bus-stop goto-bus-stop mentioned this pull request Jan 31, 2018
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