Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Banner in home #40

Open
ailopezglez opened this issue Jan 22, 2018 · 16 comments
Open

Banner in home #40

ailopezglez opened this issue Jan 22, 2018 · 16 comments
Assignees

Comments

@ailopezglez
Copy link

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:

  • Title
  • Short description
  • button text
  • button Url
  • Image

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

@mrcasals
Copy link
Contributor

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 Customize Call To Action button decidim/decidim#2053 (discussion is at Customizable call to action button in Home Section decidim/decidim#1819). The feature was "very needed" in the moment, although it was something only one installation needed
  2. Omnipresent banner decidim/decidim#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. Highlighted content banner decidim/decidim#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 (decidim/decidim#2114), which were added so that participatory spaces could extend the homepage.

@jsperezg
Copy link
Contributor

#2572 and #2547 are requisites of this feature.
@xabier @htmlboy What are your thoughts regarding this topic

@htmlboy
Copy link

htmlboy commented Jan 26, 2018

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

@xabier
Copy link
Contributor

xabier commented Jan 26, 2018

@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
Copy link
Contributor

What @xabier says is on participa.castillalamancha.es

@mrcasals
Copy link
Contributor

@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

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

@jsperezg
Copy link
Contributor

@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
Copy link
Contributor

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
Copy link
Contributor

@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
Copy link
Contributor

@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
Copy link
Contributor

jsperezg commented Jan 29, 2018

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

@xabier
Copy link
Contributor

xabier commented Jan 29, 2018

@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
Copy link
Contributor

@xabier OK then, I guess.

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

@jsperezg
Copy link
Contributor

@xabier , @mrcasals I will recreate the PR

@jsperezg
Copy link
Contributor

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

decidim/decidim#2572

@xabier
Copy link
Contributor

xabier commented Feb 5, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants