Closed furilo closed 7 years ago
Nice work! @htmlboy any preferences?
Hi! Here's some quick feedback regarding this:
Section home: 1 or 2 are easier to understand and more flexible. In any case, I'd try to reuse as many styles as possible from the main codebase, to maximise internal style coherence (in these proposals, I'd try to unify the styles of the main header, the colors of the headings and the iconography).
Inner sections: both options work, but I think the tabs give the whole page a tighter sense of structure.
@carolromero @arnaumonty please check this
@furilo 1,1 is definitely my favorite combination , as @htmlboy suggests, the more you can adapt to the official styles the better.
@furilo good job! I also prefer the tabs option for inner sections. And as @xabier and @htmlboy already said, keeping consistency with existing styles ensures scalability (I'm thinking about other cities using Decidim that might incorporate this in the future).
In order to abstract this to other cities we need the title and content of the boxes and links to be configurable via admin-panel. @furilo is this the case?
@xabier yes, we'll make this editable through the admin UI. Is there any screen in the admin that does something similar that you'd like us to stick to?
@xabier Mmm... Although I'm realizing now that I was thinking more on the Results pages (https://github.com/decidim/decidim/issues/586#issuecomment-292511093) than in this, taking into account that in these screens, everything is custom for BCN, and therefore we were thinking on just creating normal static pages where we add all the HTML.
So, should we go on with 1,1 ?
(we are waiting to start with the HTML)
So, should we go on with 1,1 ?
yes
-- Dr. Xabier E. Barandiaran
Hey @josepjaume @oriolgual - how/where should we integrate this content? This is something -if I'm not wrong- specific to BCN, so it maybe could be simple static files in that repo. For this maybe it should not be a problem to make a PR, as it is only static content.
Or it could be static pages, but we may end up including inline styles ( = ugly). So which option do you consider best?
Also, @xabier @andreslucena it is confirmed that we'll create that new "Rendición de cuentas" option in the main menu?
Also, @xabier @andreslucena it is confirmed that we'll create that new "Rendición de cuentas" option in the main menu?
We need to work with that hypothesis, yes.
@furilo depends on the frequency of updates / complexity of the layout. I usually prefer to keep control over the HTML myself and change stuff via a PR rather than trying to use a CMS for that.
Adding the element on the menu is easily doable by overriding the view partial, but I've been wanting to create a small DSL to extend menus so the core itself accommodates these scenarios without risking breaking the contract.
I described this in an issue a while ago (feels like ages but it's only been 6 months!): https://github.com/decidim/decidim/issues/131
Something along the lines of:
# In the core
Decidim.menu :main_menu do |menu|
menu.item I18n.t('decidim.main_menu.processes'), decidim.processes_path, weight: 0
# or even stuff like
Decidim::Pages.where(show_in_main_menu: true).each do |page|
menu.item page.title, page_path(page), weight: 3
end
end
# In an engine
Decidim.menu :main_menu do |menu|
menu.item I18n.t('decidim.main_menu.accountability'), decidim.accountability_path, weight: 0, i18n: true
end
# In the view.
# This evaluates all registered blocks in the context of the view and renders the resulting
# data structure so they can access routes, helpers (current_organization), etc.
<%= render_menu :main_menu %>
This could leverage https://github.com/codeplant/simple-navigation or https://github.com/comfy/active_link_to to make things easier.
@josepjaume would that mean modifying decidim-core
? I think we don't have enough time for that in this week.
The content for this page is specific to Barcelona, so it wouldn't have to go inside this engine, afaik.
Is there a way to just add a new controller/view for the static content in decidim-barcelona
and use the decidim layout without making this content part of an engine?
@josepjaume regarding the menu option, I'd prefer a solution that could work on other contexts. I've mixed feelings, but I'm thinking on something like https://github.com/spree/deface that "allows you to customize HTML (ERB, Haml and Slim) views in a Rails application without editing the underlying view."
@amaia yeah, I understand :). I only outlined what I think might be a good solution, but right now, the best you can do is monkeypatch the view on decidim-barcelona
and include any extra routes/views/styles you want. In the end, it's just a Rails app :).
@andreslucena Yeah, deface looks like an option, but I'm worried about performance penalties and overall complexity of the thing.
@josepjaume this is what we've done for now to be able to show a static page (stil a lot of i18n missing): https://github.com/PopulateTools/decidim-barcelona/tree/static-accountability-pages
It feels very hacky, I had to include a bunch of helpers and overwrite the Ability class to make the decidim/application
layout work for these static pages (the user menu was the main thing that needed most of that).
Do have suggestions for a better approach?
Hey @xabier @andreslucena
Here is the first round for the global accountability section in decidim.barcelona.
We are proposing a section in the main menu nav, don't know if that was the idea (it makes sense, but given that almost all links point to other external webs, we may miss those users). In any case, it should be not a problem to link it from another place.
Content is directly derived from AccessInfo-Sustentia docs. Proposed screens:
Section home It serves as a map of all the content, plus the accountability flow chart and secondary elements.
Inner sections We develop explanations for each section and give access, showing that you are going out. We may want to adjust a little bit heading and paragraph font sizes to better convey hierarchy.
cc @martgnz