Convert bug-edit.pt to 3.0 template

Bug #412971 reported by Deryck Hodge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Deryck Hodge

Bug Description

bug-edit.pt needs converting to the new 3.0 template. These should be, I believe, just mechanical updates.

Tags: lp-bugs

Related branches

Revision history for this message
Deryck Hodge (deryck) wrote :

In keeping with Gavin's approach, I'm adding before and after screenshots.

Revision history for this message
Deryck Hodge (deryck) wrote :
Revision history for this message
Martin Albisetti (beuno) wrote :

I think the rule is: no portlets in edit pages. I don't think it's needed anyway, no?

Revision history for this message
Deryck Hodge (deryck) wrote :

I have some questions about the implementation and differences of style between the two screenshots already.

* Since this is a pure two-column page -- the main content and the sidebar --
   do I need to use any of the yui-g/yui-u or top-portlet classes? I didn't use
   any of those classes in this interation.

* The sidebar portlets lack the styling of their use throughout the current
   bugs pages because there isn't a leading portlet id. Should the subscriber
   and search portlets look the same as they do now? Do I add this wrapping
   div? Or is there a way to achieve this already?

* Gavin and I agreed on the heading form of "ACTION for bug #XXX - TITLE"
   on these interior pages, but I'm not sure it works on this edit page. It's long,
   the title is already there in the editable field, and the bug # will be in the
   breadcrumbs when Gavin finishes his branch. Or is the repetition okay?
   Or do we want to find another way to include the bug title on these pages
   without it being in the heading?

* Where did the pink side portlet go? Is this part of the old template layout
   that should not be included now? (I didn't see anything I left out to cause
   this not to appear.)

Revision history for this message
Eleanor Berger (intellectronica) wrote : Re: [Bug 412971] Re: Convert bug-edit.pt to 3.0 template

2009/8/13 Martin Albisetti <email address hidden>:
> I think the rule is: no portlets in edit pages. I don't think it's
> needed anyway, no?

Yes, we should remove all portlets on such pages. Anyway, this page is
now just a fallback for when AJAX is not available, so it pays to keep
it as simple as possible.

Revision history for this message
Eleanor Berger (intellectronica) wrote :

2009/8/13 Deryck Hodge <email address hidden>:
> I have some questions about the implementation and differences of style
> between the two screenshots already.
>
> * Since this is a pure two-column page -- the main content and the sidebar --
>   do I need to use any of the yui-g/yui-u or top-portlet classes?  I didn't use
>   any of those classes in this interation.
>
> * The sidebar portlets lack the styling of their use throughout the current
>   bugs pages because there isn't a leading portlet id.  Should the subscriber
>   and search portlets look the same as they do now?  Do I add this wrapping
>   div?  Or is there a way to achieve this already?

I think that the side bar should go, and this page can be converted to
a very simple single column form. Again, this is only going to be used
as a boomerang alternative for inline editing, and as long as it's
easy to go back (using the cancel link or the bread crumbs) I think
that the best thing to do is to keep it very simple.

Revision history for this message
Martin Albisetti (beuno) wrote :

On Thu, Aug 13, 2009 at 12:06 PM, Deryck
Hodge<email address hidden> wrote:
> * Gavin and I agreed on the heading form of "ACTION for bug #XXX - TITLE"
>   on these interior pages, but I'm not sure it works on this edit page.  It's long,
>   the title is already there in the editable field, and the bug # will be in the
>   breadcrumbs when Gavin finishes his branch.  Or is the repetition okay?
>   Or do we want to find another way to include the bug title on these pages
>   without it being in the heading?

I think you can drop the title, as that is what will be in the breadcrumb.

> * Where did the pink side portlet go?  Is this part of the old template layout
>   that should not be included now?  (I didn't see anything I left out to cause
>   this not to appear.)

It went the way of the Dodo. That portlet is actually from Launchpad 1.0 ;)

--
Martin

Revision history for this message
Curtis Hovey (sinzui) wrote :

As stated above, no side portlets because they distract the user from his task.

No, forms without extra content do not need any yui classes Modication pages just need to use main_only.

If we can drop the first sentence, then this could use lp/app/templates/generic-edit.pt. The view would have to do this

+ @property
+ def label(self):
+ """The form label."""
+ return 'Edit %s' % self.context.title
+
+ @property
+ def page_title(self):
+ """The page title."""
+ return self.label

But you want to do that anyway because the label and title should be the same and the label should be <action> <context.title|displayname>. You can remove bugtask_edit from pagetitles when your add this page_title.

The form is missing a cancel button

+ @property
+ def cancel_url(self):
+ """See `LaunchpadFormView`."""
+ return canonical_url(self.context)

Revision history for this message
Deryck Hodge (deryck) wrote :

I dropped the extra paragraph to enable using generic-edit.pt as Curtis mentioned. Thanks, Curtis, for a great suggestion.

Given that, as Tom said, we'll rarely hit this page, using a generic template seemed wise.

Thanks for the comments, all. I'll fix tests and put this up for review and move on to other templates with what I've learned from this simple start.

Revision history for this message
Diogo Matsubara (matsubara) wrote : Bug fixed by a commit

Fixed in devel r9203.

Changed in malone:
status: In Progress → Fix Committed
Deryck Hodge (deryck)
Changed in malone:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.