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

Compass 6.0 Roadmap #54

Open
onmyway133 opened this issue Aug 16, 2017 · 5 comments
Open

Compass 6.0 Roadmap #54

onmyway133 opened this issue Aug 16, 2017 · 5 comments

Comments

@onmyway133
Copy link
Contributor

onmyway133 commented Aug 16, 2017

We will convert Compass to be in Swift 4 soon. This is not really big changes, but we can take this advantage to do some refactoring. Some are breaking changes. My proposals are

  • Refactor Navigator to be used as instance. And inject scheme and Router into it. An app usually does not need many Navigator, and use can just set it as the current one. This also promotes the use of Router
let navigator = Navigator(scheme: "compass", routers: routers)
Navigator.current = navigator
  • Right now Navigator and Router seem to confuse users. Like we declare Router, but also configure Navigator.routes. The above Navigator instance will make the composition clear Navigator -> Router -> Routable
  • Refactor Router to be more flexible. Not all routers depend on currentController, some like preLogin prefers to switch rootViewController
  • Remove ErrorRoutable, as we can handle via try catch with navigate function

What do you think @hyperoslo/ios ?

@vadymmarkov
Copy link
Contributor

All the proposed features make sense for me 👍

@zenangst
Copy link
Contributor

I support this!

@deanWombourne
Copy link

I was about to raise an issue to make Navigator a class, but then read this :) +1 definitely to making it an instance.

Can we go one further and make it a protocol as well i.e. struct Navigator: Navigatable - that way we can inject a mock one when we unit test our routing :) I'm happy to make a PR for this if you want?

@Andrewangeta
Copy link

How's the progress on this going? Really excited to see version 6.

@emreond
Copy link

emreond commented Apr 10, 2018

As Swift 4.1 release, some codes are deprecated. Can't wait for the version 6 of this great library :) How is the progress?

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

No branches or pull requests

6 participants