> = Mechanical conversion of Blueprints "+assignments" pages = > > This is not a conversion I'm proud of, but we're in a hurry. Hi Jeroen! I think you've done a great job :) I'm marking it as needs information - as I think it might be best for Henning to merge your work here and then just ensure it's consistent with the hasspecification page that he's doing. Then you'll not need a separate rc either? What do you think? > > Example page: > > https://blueprints.launchpad.dev/ubuntu/+assignments > > That page still has a 1.0-style actions menu that can come from one of a > number of different views, depending on the context for which you're > viewing the assignments list. So I chose not to go on a crusade to > convert these to 2.0 and then to 3.0. Others may be fixing the menus > right now, but if they are, the fixes are not in devel yet so I can't > rely on whatever they're doing. Instead I dropped the menu. There's > the breadcrumbs and the "All blueprints" link in the bottom-right corner > to get people back to the world of interconnected pages. Ok, I think this will need to be done together with Henning, as he's doing the hasspecification conversion. So please chat with him, and just ensure it's consistent. He's already doing the menu, so it'll be really easy. In fact, it might be even easier if henninge just merges your branch and updates it and lands them together? > > Layout is main_only, since this page does not deal in subscriptions or > anything like that. The portlet survives below the main content. I did > not go for a two-column layout since the widths of the portlet and the > main listing are inherently very different, and the result would look > weird. Again, please discuss this together with henninge. > > Previously this page shared its view with some others, making it hard to > let go of pagetitles.py. That's why there is now a new view class > derived from HasSpecificationsView that specializes in +assignments > pages. It provides the new page_title and label. Great! I can now see the benefit of specifying a nice short page_title for the breadcrumb-leaf, and a more detailed label for the main heading. Looks great. > > Much of the diff is taken up by the template. A few notes about that: > > * All the fmt:url links turned out to be suitable for conversion to > fmt:link. It's really worth checking for this. And an image was > spritefied. Thanks! > > * When there were no blueprints to display, the old template would show > an information message. AIUI that's improper use of informational > messages, since nothing happened as a result of the user's actions > that they're being notified about. So I turned that into running > text, which then had to be a lot less roadsignish. Great. > > * I don't know why the explanatory paragraph about the listing was all > the way at the bottom. I put it at the top; if you're not interested > I'm sure your eyes will skip right over it anyway. I personally like it better at the bottom - if I'm interested (ie. I don't understand the information that I'm looking at) my eyes will reach it, otherwise I don't have to skip over it. But given that this is a blueprint conversion, I'll leave it up to you :) > > * Does the main table need more styling work? Um, I wouldn't think so... I mean, it's got exactly the same styling as the pre-3.0 version right (listing sortable). I think that's fine. OK, a few small things below: > > > No lint. Test anything that has "blueprint," "sprint," "project," or > "distroseries" in it and you should have about covered it. That's what > I did. > > > Jeroen > === modified file 'lib/lp/blueprints/browser/specificationtarget.py' > --- lib/lp/blueprints/browser/specificationtarget.py 2009-09-17 21:20:14 +0000 > +++ lib/lp/blueprints/browser/specificationtarget.py 2009-09-22 07:08:11 +0000 > @@ -8,6 +8,7 @@ > __all__ = [ > 'HasSpecificationsView', > 'RegisterABlueprintButtonView', > + 'SpecificationAssignmentsView', > 'SpecificationDocumentationView', > ] > > @@ -115,7 +116,7 @@ > self.batchnav = BatchNavigator( > self.specs, self.request, > size=config.launchpad.default_batch_size) > - > + ^^^ some trailing spaces. > def mdzCsv(self): > """Quick hack for mdz, to get csv dump of specs.""" > import csv > @@ -313,6 +314,15 @@ > quantity=quantity, prejoin_people=False) > > > +class SpecificationAssignmentsView(HasSpecificationsView): > + """View for +assignments pages.""" Do we normally have a black line between class docstrings and the first attr/method? I couldn't find anything in the style guide, but it just looked a bit strange. Just ignore it this comment :) > + page_title = "Assignments" > + > + @property > + def label(self): > + return "Blueprint assignments for %s" % self.context.displayname If you feel like updating this to use smartquotes like the example directly below in SpecificatioDocumentationView, go for it. > + > + > class SpecificationDocumentationView(HasSpecificationsView): > """View for blueprints +documentation page.""" > >