Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Compass 6.0 Roadmap #54

Copy link
Copy link
@onmyway133

Description

@onmyway133
Issue body actions

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, zenangst, svoip and tpritc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.