Skip to content

Router should have helpers for breadcrumb or similar widgets #96

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

Closed
aparo opened this issue Mar 15, 2015 · 1 comment
Closed

Router should have helpers for breadcrumb or similar widgets #96

aparo opened this issue Mar 15, 2015 · 1 comment
Labels
Milestone

Comments

@aparo
Copy link

aparo commented Mar 15, 2015

Supporting breadcrumb will be a nice feature.
From @japgolly words:

It'll be a bit tough because the router doesn't have good support for dynamically identifying which route you're on - it was something I didn't think of when I wrote it - but I think that's the only piece of the puzzle you need to write breadcrumb nicely.

@japgolly japgolly modified the milestone: 0.9.0 Apr 23, 2015
japgolly added a commit that referenced this issue May 17, 2015
New router that:
* uses an ADT to represent pages
* allows rules to be composed and then modified collectively
* clarifies the difference between Router component and controller
* accomodates stateful logic

Addresses #96, #103, #102, #94
japgolly added a commit that referenced this issue May 17, 2015
New router that:
* uses an ADT to represent pages
* allows rules to be composed and then modified collectively
* clarifies the difference between Router component and controller
* accomodates stateful logic

Addresses #96, #103, #102, #94
@japgolly
Copy link
Owner

Closed via 93bbc5f.

There's a new Router coming in 0.9 that fixes this.

Unlike the v1 Router which uses vals in a RoutingRules object, the new one expects that you create a tiny model for your pages (solving this). For example, if there is a page showing a photo, the model can be case class ViewPhotoPage(photoId: Long) and when the page is being rendered, you will get a ViewPhotoPage instance which will make breadcrumbs very easy - it will just be pattern matching on your pages.

Example of page ADT and routing rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants