question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v6.x.x / v7.0.0 - wish list / roadmap

See original GitHub issue

I want to gather a bit of sentiment for what people might be missing / what you feel might improve. The same as in v6, it’d be nice if all that was needed to update the major was npm install --save choo@7, and that’s it.

So far my wish list is:

  • Figure out how to make routes render async, so we can apply route-based code splitting when needed. Not necessarily breaking, but it might just turn out that we need to rewrite the router (again, sigh - haha).
  • Remove the unique labels from the tracing API measures, there’s no need for them when using a PerformanceObserver like in choo-log.
  • Replace xtend with Object.assign() - https://polyfill.io provides a fallback for browsers that don’t support it, so for most people this will be a strict improvement.
  • choo/component, using nanocomponent - Ideally it’d be nice if we could formalize tracing / an event system with this too. That way we keep blazing ahead in terms of debugging.
  • Reading out from a global state (e.g. window.initialState) to provide out of the box “rehydration” of state that was passed on the server.

It’s still early, but I’d be interested in hearing input from people on what you find tricky, which things you love, and which things you struggle with! Thanks! ✨

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
yoshuawuytscommented, Sep 25, 2017

@chrisdwheatley nice one! - yeah was thinking we move to https://github.com/emilbayes/nanoassert using the package.json browser field. We’ve done that for a few modules already, and it seems to work real well 😁

1reaction
brechtcscommented, Nov 15, 2017

I think we it’s possible to rewrite the render handling in such a way that it can support both sync and async routes without changing the syntax. This is loosely based on the way Gulp deals with the fact that tasks can both be sync and async. (I’ve removed some nanotiming calls for clarity.)

  this.emitter.prependListener(self._events.RENDER, nanoraf(function () {
    self.state.href = self._createLocation()
    var res = self.router(self.state.href)

    if (res instanceof HTMLElement) {
        var newTree = res
        nanomorph(self._tree, newTree)
    } else if (res && res.then typeof === 'function') {
        res.then(function (newTree) {
            assert(newTree instanceof HTMLElement, '...')
            nanomorph(self._tree, newTree)
        })
    }
}))

This way the current sync routes operate in the same way as they do now, plus you can also pass in a route handler which returns a promise (or just an async function, since they’re based on promises under the hood).

It might be possible to support callbacks too, as a third argument for route handlers, i.e. (state, emitter, done). If we added the required support to nanorouter, that would change the above to:

  this.emitter.prependListener(self._events.RENDER, nanoraf(function () {
    self.state.href = self._createLocation()
    var res = self.router(self.state.href, function (err, newTree) {
         if (err) return //not exactly sure how to handle this yet, feedback welcome :p
         assert(newTree instanceof HTMLElement, '...')
         nanomorph(self._tree, newTree)
    })

    if (res instanceof HTMLElement) {
        var newTree = res
        nanomorph(self._tree, newTree)
    } else if (res && res.then typeof === 'function') {
        res.then(function (newTree) {     
            assert(newTree instanceof HTMLElement, '...')
            nanomorph(self._tree, newTree)
        })
    } else {
        //do nothing, should be handled by the callback above
        //maybe some kind of assertion could be here added to be sure
    }
}))
Read more comments on GitHub >

github_iconTop Results From Across the Web

Roadmap to v7 · Issue #10958 · jhipster/generator ... - GitHub
Roadmap to v7 This ticket lists out ideas and plans for v7. Items here may or may not make to v7, but this...
Read more >
What's New in WebSphere MQ: V7.1 and V7.5
WMQ Family Roadmap – continual delivery of customer value. (3Q/09). MQ V7.0.1 with ... Unix and Windows support for multiple versions of MQ...
Read more >
Swit Release Notes & Roadmap
v7.0.0 10/04/2022. What's new: [Plug-in: Goals] Swit Goals helps your organization manage their objectives and key results (OKRs) effectively.
Read more >
Roadmap - Proxmox VE
Roadmap. Offline updates done; Cross-cluster migration mechanism - foundation and CLI integration released with Proxmox VE 7.3; Enhancement and ...
Read more >
Agile User Story Maps, Roadmaps & Persona Journey for Jira
Browse the top apps, add-ons, plugins & integrations for Jira, Confluence, Bitbucket, Hipchat & other Atlassian products. Free 30-day trial for all apps....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found