GithubHelp home page GithubHelp logo

Improve breadcrumbs about angular-app HOT 8 OPEN

angular-app avatar angular-app commented on May 13, 2024
Improve breadcrumbs

from angular-app.

Comments (8)

petebacondarwin avatar petebacondarwin commented on May 13, 2024

Yes, we talked about maybe extracting the breadcrumbs from the routing
system?

On 23 September 2012 18:49, Pawel Kozlowski [email protected]:

Currently we are showing Mongo ids in the breadcrumbs, this doesn't look.
It is an interesting conceptual problem as well linked to the routing
system.


Reply to this email directly or view it on GitHubhttps://github.com//issues/24.

from angular-app.

petebacondarwin avatar petebacondarwin commented on May 13, 2024

Definitely need a more powerful routing system in Angular in the long run.

On 23 September 2012 20:09, Peter Bacon Darwin [email protected] wrote:

Yes, we talked about maybe extracting the breadcrumbs from the routing
system?

On 23 September 2012 18:49, Pawel Kozlowski [email protected]:

Currently we are showing Mongo ids in the breadcrumbs, this doesn't look.
It is an interesting conceptual problem as well linked to the routing
system.


Reply to this email directly or view it on GitHubhttps://github.com//issues/24.

from angular-app.

pkozlowski-opensource avatar pkozlowski-opensource commented on May 13, 2024

Yes, the current routing system and form's validation are probably the
2 weakest points of AngularJS atm...

from angular-app.

pkozlowski-opensource avatar pkozlowski-opensource commented on May 13, 2024

OK, so as far as breadcrumbs are concerned, we should be extracting them from the routing system somehow. It should be possible since, after a route is resolved, we've got access to all the route params and resolved locals. I can see 2 solutions:

  • equip our resource classes with a well-known function (toString ?) and use result of this function in a breadcrumb
  • define a function on a route definition level that would indicate which properties of a resource object to take as a breadcrumb

from angular-app.

pkozlowski-opensource avatar pkozlowski-opensource commented on May 13, 2024

We need to cross-check a link in a breadcrumb against a set of defined routes (to avoid the situation where a link leads to a route that is not defined and as a result fallback to a default one).

from angular-app.

pkozlowski-opensource avatar pkozlowski-opensource commented on May 13, 2024

Thinking about it a bit more it becomes even more clear that breadcrumbs must be more linked to the routing system and not to the loacation's path. This becomes very evident when we see how routing system works with promises (resolve). As of today a route won't change if one of the promises fail but the $location will be updated anyway. As a result the breadcrumbs will get updated as if a user navigated to a target route while in fact no navigation taken place.

In short: the breadcrumbs should be extracted from the current route and links in a bradcrumbs cross-checked with defined routes.

from angular-app.

petebacondarwin avatar petebacondarwin commented on May 13, 2024

We ought to find a way to revert the location too if it fails.

... sent from my tablet
On 6 Oct 2012 10:49, "Pawel Kozlowski" [email protected] wrote:

Thinking about it a bit more it becomes even more clear that breadcrumbs
must be more linked to the routing system and not to the loacation's path.
This becomes very evident when we see how routing system works with
promises (resolve). As of today a route won't change if one of the
promises fail but the $location will be updated anyway. As a result the
breadcrumbs will get updated as if a user navigated to a target route while
in fact no navigation taken place.

In short: the breadcrumbs should be extracted from the current route and
links in a bradcrumbs cross-checked with defined routes.


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-9196840.

from angular-app.

pkozlowski-opensource avatar pkozlowski-opensource commented on May 13, 2024

OK, so after merging b157f17 we still got 3 (at least) improvements to be done:

  • display a link in a breadcrumb only if a corresponding route exists
  • display human-readable info in breadcrumbs instead of ids (somehow we need to attach a piece of code to a route)
  • revert a location if a route change fails

from angular-app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.