← Back to team overview

launchpad-dev team mailing list archive

Re: Breadcrumb changes

 

On Tue, 2009-08-11 at 15:11 -0400, Francis J. Lacoste wrote:
> On August 11, 2009, Guilherme Salgado wrote:
> > Hi Francis,
> >
> > I've had a couple calls with Martin about our breadcrumbs, and one of
> > the things we want is to have an extra item for the first traversed
> > object on the vhost we're on, in case we're not on the mainsite. e.g.
> >
> >   bugs.lp.net/bzr
> >
> > would have
> >
> >   Bazaar (lp.net/bzr) > Bugs (bugs.lp.net/bzr/+open-bugs)
> >
> > as breadcrumbs. Note that the link of the new breadcrumb will not point
> > to the default (+index) page, so we must be able to customize that for
> > any obj/vhost.
> >
> > Given that, it seemed reasonable to me to change our Hierarchy view to
> > sneak an extra item manually and use named adapters (having the vhost as
> > the name) so that we can get an IBreadcrumbBuilder for this extra item.
> 
> This means that we'll need 5 adapters (bugs, code, answers, translations, 
> blueprints) per object type to support. Since this is always for the top level 
> objects, it means 25 adapters? (project, project group, distribution, person, 
> team). (What about source packages?)
> 
> Do we really need a per object customization, isn't a per vhost one enough. 
> Wouldn't a +open-bugs be used for all top objects (maybe not person / team).

That's what I had in mind.  I envisioned a generic IBreadcrumbBuilder
adapter for Interface and name='bugs' that links to
canonical_url(context, rootsite='bugs', view='+open-bugs') and then we
customize it for the objects where it's different.  That way we can do
per-object customization if necessary, but we don't have to do all the
work upfront.

> 
> Might better to have a wider interface (add a getVhostCrumb(name)) method to 
> the IBreadcrumbBuilder interface.

I suppose that'd work too, but I don't see any big advantages over the
other alternative.

-- 
Guilherme Salgado <salgado@xxxxxxxxxxxxx>

Attachment: signature.asc
Description: This is a digitally signed message part


Follow ups

References