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

Ability to query routes #49

Closed
ZevEisenberg opened this issue Feb 26, 2015 · 8 comments
Closed

Ability to query routes #49

ZevEisenberg opened this issue Feb 26, 2015 · 8 comments

Comments

@ZevEisenberg
Copy link
Contributor

It would be nice if you could query JLRoutes for all the currently registered routes, and then generate, for example, a testing UI that provides easy links to all the routes in the app.

@ZevEisenberg
Copy link
Contributor Author

Paging @mgorbach, who was interested in this.

@joeldev
Copy link
Owner

joeldev commented Mar 2, 2015

This is a brilliant idea.

@clooth
Copy link

clooth commented Jun 25, 2015

Could someone open up this feature idea a bit more, so I can get a clear idea of what functionality is wanted?

@ZevEisenberg
Copy link
Contributor Author

I was thinking all the route registrations would be exposed in an array. You could then list them somewhere like RZDebugMenu or similar. When you tap a route, if it has :matchers, they would prompt for text input (and be prepopulated with the last input).

I’m not sure how much of this would be built in to JLRoutes and how much would be up to the host app. I was thinking JLRoutes would just expose the route registrations in an easily consumable format.

@hpsoar
Copy link

hpsoar commented Feb 27, 2016

It would be nice to have a query feature.

Besides, I think it would be better if _JLRoute creation process is separated from JLRoutes, and expose _JLRoute to public.

So that users can encapsulate a route logic in a _JLRoute subclass, then they can create, add, query, test, perform _JLRoute as they wish.

@MarshalGeazipp
Copy link

It would be great to have this feature, I would use it for sure!
Is anybody working on it?

@joeldev joeldev closed this as completed in 44c1f23 Apr 2, 2017
@joeldev
Copy link
Owner

joeldev commented Apr 2, 2017

Two new methods I just pushed:

/// All registered routes, keyed by scheme
+ (NSDictionary <NSString *, NSArray <JLRRouteDefinition *> *> *)allRoutes;

/// Return all registered routes in the receiving scheme namespace.
- (NSArray <JLRRouteDefinition *> *)routes;

Sorry that took so long.

@MarshalGeazipp
Copy link

Works great.
Thank you very much!

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

5 participants