decidim-archive / decidim-module-consultations

:warning: [DEPRECATED] Decidim module for consultations: debates around critical questions and a proxy for eVoting. Now it's on decidim/decidim repository.
1 stars 0 forks source link

Banner in home #40

Open ailopezglez opened 6 years ago

ailopezglez commented 6 years ago

In order to highlight a message in the home, the intention is to develop a banner, according to the attached design.

The administrator must be able to fill in:

captura de pantalla 2018-01-22 a las 13 15 04

mrcasals commented 6 years ago

Hi @jsperezg @decidim/product!

In order to highlight special content in the homepage, we currently have different options:

  1. Modifying the CTA button link and text. This was added on https://github.com/decidim/decidim/pull/2053 (discussion is at https://github.com/decidim/decidim/issues/1819). The feature was "very needed" in the moment, although it was something only one installation needed
  2. https://github.com/decidim/decidim/pull/2547, which wants to add an omnipresent banner to highlight content. This banner is supposed to be non-removable and should appear in all pages of the platform
  3. https://github.com/decidim/decidim/pull/2572, which aims to add a special banner in the homepage.

Are you sure that's something all instances need, or it's something only Barcelona, on one of its instances, need for some reason? Has this gone through the PX people before?

The PR for this issue adds a lot of fields to the admin panels, which raise a few issues:

  1. They have to be maintained and migrated, for all installations
  2. They add complexity to the admin users, as they will see a long page with a lot of inputs and that's mentally tiring. If I see a page with 10 inputs, I simply go away.

If this is something only Barcelona needs for some reason, we have better tools to modify the layout than adding inputs/fields indiscriminately. For example, the layout can be overriden and expanded either by using deface or by using our own ViewHooks (https://github.com/decidim/decidim/pull/2114), which were added so that participatory spaces could extend the homepage.

jsperezg commented 6 years ago

2572 and #2547 are requisites of this feature.

@xabier @htmlboy What are your thoughts regarding this topic

htmlboy commented 6 years ago

I'm not sure if this is core, but let's hear what @xabier has to say.

xabier commented 6 years ago

@mrcasals thanks for your comments, they are very accurate, but this issue has been discussed elsewhere, this features is desired by more than Barcelona, check out this in a new instance of Decidim

image

andreslucena commented 6 years ago

What @xabier says is on participa.castillalamancha.es

mrcasals commented 6 years ago

@xabier for this case, I see a clear example where the suggested changes in the description of the issue do not work at all. The banner from Castilla-La Mancha:

The Castilla-La Mancha use case can be solved with ViewHooks, not with the last PR by @jsperezg.

jsperezg commented 6 years ago

@mrcasals I can prepare a prototype using ViewHooks but IMHO it will require changes in core as well. The intent of the hightlighted content banner is make it appeir before any other content. Does ViewHooks allow it? Can an engine put himself in self position?

mrcasals commented 6 years ago

We can add a new hook in the homepage so you can add this, or you can use deface which allows this without touching core.

Apart from that, why is this issue on consultations, when it's about highlighting some unspecified content? I think this issue should be tackled from the main repo, clarify which are the needs and why these needs appeared (that is, what caused these needs), and then decide if this should be done only for a given application or globally.

I don't see this discussion anywhere.

jsperezg commented 6 years ago

@mrcasals Do you know where can I find an example of ViewHooks + deface combined? I tried changing the extension of my viewhook partial to .html.erb.deface and it hangs because it is not able to find it.

mrcasals commented 6 years ago

@jsperezg I think both options together won't play well. I see two options here:

  1. Use deface to overwrite the HTML and include some views wherever you want. This allows you to keep the code in your repo, no PR in decidim/decidim is needed
  2. Use ViewHooks. This requires you to send a PR to decidim/decidim to render the view hooks wherever you need it to.
jsperezg commented 6 years ago

Understood @mrcasals I will create a PR. Meanwhile I will merge these changes and deploy all the new stuff in our staging.

xabier commented 6 years ago

@xabier for this case, I see a clear example where the suggested changes in the description of the issue do not work at all. The banner from Castilla-La Mancha:

Has custom typography Has no Call to Action button Has no background image

This is so because they did a dirty adaptation, had they had a proper banner they would have used a Call to Action button, etc. Also the typography, I consider it to be design mistake. It is all due to the a need that is badly satisfied. This is why this feature can provide a good satisfaction of a known need, that is not exclusive of Barcelona.

mrcasals commented 6 years ago

@xabier OK then, I guess.

@jsperezg re-send the PR to decidim-core so we can merge it

jsperezg commented 6 years ago

@xabier , @mrcasals I will recreate the PR

jsperezg commented 6 years ago

@xabier , @mrcasals The PR is open again and passes all tests

https://github.com/decidim/decidim/pull/2572

xabier commented 6 years ago

thanks @jsperezg , waiting for @mrcasals to accept the PR