• Jenkins 2.257

      One of the items discussed on the UX SIG meetings (https://jenkins.io/sigs/ux/) was renaming the root breadcrumb to "Home". The reason for this is that it can be confusing having Jenkins in 2 consecutive lines.

       

      An example of how it could look:

      The solution probably should take into account i18n capabilities.

          [JENKINS-60972] Rename the root breadcrumb

          Sladyn Nunes added a comment -

          I could get started with this issue. Could you point me to the code ? fqueiruga

          Sladyn Nunes added a comment - I could get started with this issue. Could you point me to the code ? fqueiruga

          It would be great if you can work on this one!

          TBH there's no good support for breadcrumbs atm in Jenkins. They are just generated iterating through request ancestors, something that I guess is provided by Stapler (https://github.com/jenkinsci/jenkins/blob/07c48b03fb4c651e7314e7adbe3a0ef0fe249586/core/src/main/resources/lib/layout/breadcrumbBar.jelly#L44).

          A hacky way to do it that comes to mind could be to check if the ancestor points to the rootURL, then it could be replaced.

          That said, I'd favour using some Java code to do this. If we get a Breadcrumbs module going on, then we can expand it in the future with some utilities like:

          • Get the last breadcrumb item.
          • Check if a breadcrumb item is the current one (good for styling purposes).
          • Prepend/append items to the breadcrumbs.

           

          Félix Queiruga Balado added a comment - It would be great if you can work on this one! TBH there's no good support for breadcrumbs atm in Jenkins. They are just generated iterating through request ancestors, something that I guess is provided by Stapler ( https://github.com/jenkinsci/jenkins/blob/07c48b03fb4c651e7314e7adbe3a0ef0fe249586/core/src/main/resources/lib/layout/breadcrumbBar.jelly#L44). A hacky way to do it that comes to mind could be to check if the ancestor points to the rootURL, then it could be replaced. That said, I'd favour using some Java code to do this. If we get a Breadcrumbs module going on, then we can expand it in the future with some utilities like: Get the last breadcrumb item. Check if a breadcrumb item is the current one (good for styling purposes). Prepend/append items to the breadcrumbs.  

          Sladyn Nunes added a comment -

          Sounds like a really good plan, so basically we would like the jelly functionality to happen via java code, also where would such a module go in the file hierarchy jenkins/core/src/main/resources/breadcrumb ?

          Sladyn Nunes added a comment - Sounds like a really good plan, so basically we would like the jelly functionality to happen via java code, also where would such a module go in the file hierarchy jenkins/core/src/main/resources/breadcrumb ?

          Something like that indeed. My OG idea was to to have on the Java side 2 models:

          • Breadcrumbs: has the logic to build the whole breadcrumb trail (maybe a getBreadcrumbItems method) and hooked into the jelly view. It would also allow prepending and appending breadcrumbs, and renaming the first one (??)
          • BreadcrumbItem: has logic to determine if it's the last one, get the parent, check if it has a contextual menu, etc.

          Then on the jelly side you would get the breadcrumb model and iterate on the breadcrumb items

          Félix Queiruga Balado added a comment - Something like that indeed. My OG idea was to to have on the Java side 2 models: Breadcrumbs: has the logic to build the whole breadcrumb trail (maybe a getBreadcrumbItems method) and hooked into the jelly view. It would also allow prepending and appending breadcrumbs, and renaming the first one (??) BreadcrumbItem: has logic to determine if it's the last one, get the parent, check if it has a contextual menu, etc. Then on the jelly side you would get the breadcrumb model and iterate on the breadcrumb items

          levi_williamson Sladyn has already started work on this one, the PR can be found here: https://github.com/jenkinsci/jenkins/pull/4634

          Félix Queiruga Balado added a comment - levi_williamson Sladyn has already started work on this one, the PR can be found here: https://github.com/jenkinsci/jenkins/pull/4634

          Romen Rodriguez-Gil added a comment - - edited

          Hi!

          Since this has been hanging for some time, I've proposed a workaround to get the "Home" breadcrumb there with little effort. See: https://github.com/jenkinsci/jenkins/pull/4920

          In future, whenever we have a more robust breadcrumbs module ready, we can replace the workaround I'm proposing; but with this suggestion we get the "Home" breadcrumb already

          Romen Rodriguez-Gil added a comment - - edited Hi! Since this has been hanging for some time, I've proposed a workaround to get the "Home" breadcrumb there with little effort. See:  https://github.com/jenkinsci/jenkins/pull/4920 In future, whenever we have a more robust breadcrumbs module ready, we can replace the workaround I'm proposing; but with this suggestion we get the "Home" breadcrumb already

          James Nord added a comment - - edited

          this wording choice causes confusion - opened JENKINS-64366

          James Nord added a comment - - edited this wording choice causes confusion - opened JENKINS-64366

            sladyn98 Sladyn Nunes
            fqueiruga Félix Queiruga Balado
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: