Reconsidering the solution of AI896
Rodrigo Souto
rodrigo at colivre.coop.br
Wed Jan 22 19:55:24 BRST 2014
Hi Daniel,
This problem of the catalog page breaking with 3 columns layout is an
old problem. Even though Aurélio's patch mitigates this problem (by
setting the default products per page to 6 which works on both layouts),
I indeed think that we need a better solution to this (your solution
seems nice).
But, as I talked to Braulio, this is a new feature, not a fix to the
feature being included. Aurélio's feature waited for 7 months
(unfortunately) to be reviewed and that's why it gained the attention to
even have new code now developed to make it work all right.
I believe that it might be valid to allow this request to "cut" the line
because it solves nicely a problem related to the merge-request being
reviewed. But note that this is a privilege. We can't allow this to be
the standard. That'd be unfair with other developers.
Before reviewing your patch, I took a quick look on the request and I
missed some tests (like a test for the new helper and for changes done
on boxes_helper), can you guys update the request with the pertinent
tests due to your changes?
daniel tygel escreveu isso ai:
> Hi Rodrigo,
>
> I looked at your code. Yes, this solves the problem of showing the block on
> all enterprises pages. Ok.
>
> But if the enterprise has a 3 columns layout, the catalog page will break.
>
> So, besides your solution upon Aurium's code, I think we should add our new
> "use_custom_design" method so that the catalog page is forced to be 2 columns
> layout.
>
> With your solution, we won't need to add the catalog block using this
> method, so the method could be used only to force the layout_template. (instead
> of "use_custom_design :boxes_limit => 2, :insert => {:box => 2, :position => 0,
> :block => ProductCategoriesBlock}", it will be only "use_custom_design
> :boxes_limit => 2" )
>
> We submitted this merge-request for your consideration: It's here:
> https://gitlab.com/noosfero/noosfero/merge_requests/93
>
> Thanks,
>
> daniel
>
>
>
>
> Em 22-01-2014 18:42, Rodrigo Souto escreveu:
>
> Hey Daniel,
>
> I talked with Braulio via chat about this problem today. I told him that
> we already have an almost done infra to support custom display options
> for blocks, which would solve your problem of showing this block only on
> the catalog very easily using the blocks display options. So I wrote the
> code and included on top of Aurélio's work. Now the
> ProductCategoriesBlock as an extra option 'Display on catalog only' on
> it's display options and it's the default option. The code can be seeing
> here: https://gitlab.com/diguliu/noosfero/commits/product-categories-block
>
> Nevertheless, I think your idea is also useful independently of this
> problem. So keep the request up on our tracker so that we may include
> it.
>
> daniel tygel escreveu isso ai:
>
> Hi all,
>
> Yesterday Bráulio and I reviewed the merge-request of AI896 (which is to
> allow sideblocks in catalog), because we desperately need it in Cirandas.
>
> While the proposed solution by Aurium was interesting, we noticed a
> problem, and thus would like to propose an alternative (and simpler)
> merge-request. But today, when looking at the AI, I saw that Rodrigo changed
> the status to "done".
>
> Could we put the status to "working" again and propose an alternative merge
> request for your consideration?
>
> The problem in Aurium's (good) solution is the following: it forces the
> enterprises to have a new sideblock on all the enterprise's pages (the category
> block). This is annoying, since there might already be too much information in
> the enterprise's pages, and this block is not so useful as the other block
> (products block). This new block is very nice in the catalog, but less
> important outside it.
>
> So we think that Aurium's solution would be ok if noosfero allowed users to
> define in what pages they want a specific block to show up. Since we don't have
> this feature in Noosfero, Bráulio and I thought of a simpler solution for
> AI896, which is the following one:
>
> Create a "custom_design" method which allows Noosfero to override the
> enterprise template and add blocks. It's a very small peace of code, and in
> this way we can force the catalog page to be a "single left-column" template,
> and add the product's category block (if the enterprise admin didn't add it
> already for the whole enterprise). In this way we accomplish to maintain the
> existing blocks (of the main area and of the left column) and add the
> categories block in the catalog. And the enterprise's owner can, if she wants,
> also activate the categories block for all pages using the normal "add block
> feature".
>
> We would thus have 2 AIs: The first one (created by us today) creates a
> new block (the product categories block). It's registered in #2965: Add
> "product categories" sideblock — Noosfero. And the second AI is the AI896,
> which will only create the custom_design method and apply it for the catalog
> page of the enterprise.
>
> Thanks,
>
> daniel
>
> --
> (_.-~*´¨¯¨`*·~-.,-( •_•)-,.-~*´¨¯¨`*·~-._)
> .
> ,-. . |- ,-. Educação,
> |-' | | ,-| Informação e
> `-' ' `' `-^ Tecnologia para
> http://eita.org.br Autogestão
>
> (_.-~*´¨¯¨`*·~-.,-( •_•)-,.-~*´¨¯¨`*·~-._)
>
>
> _______________________________________________
> Noosfero-dev mailing list
> Noosfero-dev at listas.softwarelivre.org
> http://listas.softwarelivre.org/cgi-bin/mailman/listinfo/noosfero-dev
>
>
>
>
>
> _______________________________________________
> Noosfero-dev mailing list
> Noosfero-dev at listas.softwarelivre.org
> http://listas.softwarelivre.org/cgi-bin/mailman/listinfo/noosfero-dev
>
>
> --
> (_.-~*´¨¯¨`*·~-.,-( •_•)-,.-~*´¨¯¨`*·~-._)
> .
> ,-. . |- ,-. Educação,
> |-' | | ,-| Informação e
> `-' ' `' `-^ Tecnologia para
> http://eita.org.br Autogestão
>
> (_.-~*´¨¯¨`*·~-.,-( •_•)-,.-~*´¨¯¨`*·~-._)
>
> _______________________________________________
> Noosfero-dev mailing list
> Noosfero-dev at listas.softwarelivre.org
> http://listas.softwarelivre.org/cgi-bin/mailman/listinfo/noosfero-dev
--
Rodrigo Souto <rodrigo at colivre.coop.br> :: 55 71 8131-7714
Colivre - Cooperativa de Tecnologias Livres
http://www.colivre.coop.br/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20140122/ed594cdf/attachment-0001.pgp>
More information about the Noosfero-dev
mailing list