[Toaster] DRY RUN [Review Request] 4299 "recipes: View detailed information about a recipe"

Damian, Alexandru alexandru.damian at intel.com
Mon Jan 13 07:04:41 PST 2014


David,

Could you please go ahead and do this yourself ?

Thank you,
Alex


On Mon, Jan 13, 2014 at 2:57 PM, Reyna, David <david.reyna at windriver.com>wrote:

>  Hi Alex,
>
>
>
> Should I wait for a new "basebuilddetailpage.html" file, or should I go
> with what I have today and update later?
>
>
>
> - David
>
>
>
> *From:* Damian, Alexandru [mailto:alexandru.damian at intel.com]
> *Sent:* Monday, January 13, 2014 6:46 AM
>
> *To:* Reyna, David
> *Cc:* Lerner, Dave; toaster at yoctoproject.org
> *Subject:* Re: [Toaster] DRY RUN [Review Request] 4299 "recipes: View
> detailed information about a recipe"
>
>
>
> Hi guys,
>
> About point c). above, the "recipe.html" and all object detail pages.
>
>
> I made another mistake - Belen just confirmed that any and all object
> details pages should not have the navigation tab on the left. This means
> that "basebuildpage.html" is not suitable as a base template for these
> pages.
>
> What we should do is clone the "basebuildpage.html" to a new page
> "basebuilddetailpage.html", remove the navigation tab, and use this as a
> base for detail pages.
>
> This would allow us to make sure we have common markup, including
> breadcrumbs, through all the detail pages.
>
> Sorry for the confusion,
>
> Alex
>
>
>
>
>
>
>
> On Mon, Jan 13, 2014 at 2:33 PM, Reyna, David <david.reyna at windriver.com>
> wrote:
>
> Hi Alex,
>
>
>
> (a) Models.py
>
>
>
> > {% if task.outcome == Task.OUTCOME_FAILED %}class=error{% elif %} ...
> {%endif%}
>
> Have you actually tried that code? I tried this first, but Django does not
> support it, as also reflected in many google searches on the subject.
>
>
>
> I will move to trying a custom filter. I do hope that “Task.*” is defined
> for the context of the filter as well as the template.
>
>
>
> (b) Ok, 4-space tabs it is!
>
>
>
> (c) I explicitly removed "basebuildpage.html" because that content does
> not appear anywhere in the Recipe Details design document (as opposed to
> say Ravi’s Task document). I assumed that this was on purpose.
>
> I will restore it then.
>
> d) I see that Ravi used the basetable_top structure. I will adopt that as
> well.
>
> (e) You wrote “Indeed, we use the pluralized name for pages showing an
> object list (i.e. tables), and the singular for the detail page for the a
> single object.”
>
>
>
> Ok, I will stay with my current page names.
>
>
>
> - David
>
>
>
> *From:* Damian, Alexandru [mailto:alexandru.damian at intel.com]
> *Sent:* Monday, January 13, 2014 5:43 AM
> *To:* Reyna, David
> *Cc:* Lerner, Dave; toaster at yoctoproject.org
> *Subject:* Re: [Toaster] DRY RUN [Review Request] 4299 "recipes: View
> detailed information about a recipe"
>
>
>
> Hi,
>
> I have comments about the content of the patch, as well.
>
> a). models.py; I am not very fond of having display code in the models,
> because it breaks the MVC separation. The display code should live in the
> templates, e.g.
>
>
>     {% if task.outcome == Task.OUTCOME_FAILED %}class=error{% elif %} ...
> {%endif%}
>
> If this is repeated elsewhere, like in this particular case, you should
> define a new tag in
> ./bitbake/lib/toaster/toastergui/templatetags/projecttags.py that returns
> the code:
>
> @register.simple_tag
>
> def task_outcome_highlight(task):
>
>     if task.outcome == Task.OUTCOME_EXISTING:
>
>         ret = ''
>
>   .... etc ...
>
> and then use it in the template:  {% task_outcome_highlight task %}
>
> b). html format; please don't use tabs; use 4-space instead of a tab; this
> makes for a nice consistency with the HTML code, and fits the HTML code in
> page better.
>
>
>
> c). recipe.html; please extend "basebuildpage.html" which fills in the
> breadcrumb and all the layout for viewing pages in a build context. see
> configvars.html for an example.
>
> d). recipes.html; the latest versions of the basetable_top will
> automatically generate correct table header based on the context
> description; please don't include your own table header, but edit the page
> context  to correctly set the table data; see the build view / build.html
> as a how-to guide.
>
> Hope this helps,
> Alex
>
>
>
>
>
>
>
>
>
>
>
> On Mon, Jan 13, 2014 at 12:42 PM, Damian, Alexandru <
> alexandru.damian at intel.com> wrote:
>
> Hi David,
>
> This is outstanding ! Thank you !
>
> I have some comments about the form, not the content of the patch, which
> should make future work a bit easier.
>
> - Indeed, we use the pluralized name for pages showing an object list
> (i.e. tables), and the singular for the detail page for the a single object.
>
>
> - We can do patches over email, instead of git push, but it's harder to
> work this way. However, the email patches should be proper git patches for
> easy use.
>
>
> You can get them like this:
>
>
> $ git commit                  # you commit normally to git
>
> $ git format-patch -n1   # you get a mailable version of the last patch
> from git;
>
> 0001-patch-name-as-it-appears-in-subject-line.patch     # the command will
> output the filename just written
>
> Now, there are two options to send this file.
>
>    - if sendmail, or any MTA for that matter, works on your machine, you
> just do:
>
> $ git send-email --to toaster at yoctoproject.org0001-patch-name-as-it-appears-in-subject-line.patch      # replace with the
> file name just written
>
>    - otherwise, open up your mail client, and copy/paste the contents of
> the file written in the mail, starting line 6, or just after the empty line
> after the Subject: line. Copy/paste the Subject: line content as your
> Subject:. Send this email :).
>
>
>
> - The test procedure is outstanding !  I think we should use it for all
> the patches. For easier reference, I propose to get the test procedure in
> the bugzilla item that the patch addresses, as a comment.
>
> The patch commit message should reference the bugzilla issue like this:
>
> [YOCTO #0000]          # replace with the real bugzilla issue number
>
>
>
> Hope all of this makes sense :)
>
>
>
> I'll get to review the content of the patches separately.
>
> Cheers,
> Alex
>
>
>
>
>
> On Sun, Jan 12, 2014 at 6:49 PM, Reyna, David <david.reyna at windriver.com>
> wrote:
>
> I used "recipes.html" for the page listing all recipes, and "recipe.html"
> for the individual recipe detail page. I can use different naming of course.
>
> - David
>
>
> > -----Original Message-----
> > From: Lerner, Dave
> > Sent: Sunday, January 12, 2014 9:56 AM
> > To: Reyna, David
> > Cc: toaster at yoctoproject.org
> > Subject: RE: DRY RUN [Review Request] 4299 "recipes: View detailed
> > information about a recipe"
> >
>
> > Hi David,
> >
> > I notice that you pluralized the recipe.html to recipes.html.  Doesn't
> > that break the existing convention of singular for all templates?
> >
> > What is your suggested naming convention for templates, singular vs
> > plural?  If those conventions are settled on by the team, then we
> > should apply that naming convention to the project before we create a
> > number of other templates.
> >
> > What do others think of the template naming conventions?
> > Dave
> >
>
> _______________________________________________
> toaster mailing list
> toaster at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/toaster
>
>
>
>   --
>
> Alex Damian
>
> Yocto Project
>
> SSG / OTC
>
>
>
>
> --
>
> Alex Damian
>
> Yocto Project
>
> SSG / OTC
>
>
>
>
> --
>
> Alex Damian
>
> Yocto Project
>
> SSG / OTC
>



-- 
Alex Damian
Yocto Project
SSG / OTC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/toaster/attachments/20140113/ea8a0596/attachment-0001.html>


More information about the toaster mailing list