Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

Add message button next to user name in initiatives #93

Open
arnaumonty opened this issue Jan 9, 2018 · 7 comments
Open

Add message button next to user name in initiatives #93

arnaumonty opened this issue Jan 9, 2018 · 7 comments

Comments

@arnaumonty
Copy link

This is a (Feature Proposal)

In order to contact directly to the user who creates an initiative we need the direct message (conversations) icon next to the username as proposals have:
imagen

@arnaumonty
Copy link
Author

Hi @jsperezg We should review this because is related to the integration with core (users) and we should be able to anticipate the solution to avoid this problem with other future improvements to users (for example nickname ) in order to do not generate disconnections between initiatives and core.
I know that probably this is related to the fact that an initiative we have the committee promoter and some authors can be part of the same initiative but we should find an abstract solution. At the same time this is related to the integration of initiatives in core, but at this moment to contact the creators of an initiative is a killer feature ;)

cc @josepjaume

@jsperezg
Copy link
Contributor

@arnaumonty @josepjaume I've been checking proposals code in order to find the fastests and easiest way to solve this feature proposal. Currently the author information is shown like this (in proposals):

<%= render partial: "decidim/shared/author_reference", locals: { author: Decidim::Proposals::ProposalPresenter.new(@proposal).author } %>
    <div class="author-data__extra">
      <button type="button" data-open="<%= current_user.present? ? 'flagModal' : 'loginModal' %>" title="<%= t('.report') %>" aria-controls="<%= current_user.present? ? 'flagModal' : 'loginModal' %>" aria-haspopup="true" tabindex="0">
        <%= icon "flag", aria_label: t('.report'), class: 'icon--small' %>
      </button>
      <% unless @proposal.official? %>
        <%= link_to_current_or_new_conversation_with(@proposal.author) %>
      <% end %>
    </div>

As I see there are several things that need to be changed/reviewed in core before bringing this feature to initiatives:

  • First and fore most, as you can appreciate from the above chunk of code, the buttons that allow communication with authors is outside the template. It should be inside. This way any the change as well as any future improvement would be incredible easy since it would applay on all platform with changes in just one file.

This change supposes updating the author_reference template in order to add the buttons. Any trance of these buttons outside the template in the platform should be removed as well.

  • Ininitiatives will have more than one author. This have implications in two ways:

    • CSS: author_data css class should allow containing more than one author-data__main + author-data__extra. Maybe these two elements should be wrapped inside a div with a different class? IMHO the design team should prepare something that looks nice for one or more authors.
  • Initiatives can be initaitied by organizations. How affect this to the communicate with author feature @josepjaume ?

Having this facilities in the core would allow updating initiatives relativelly easy.

@josepjaume
Copy link
Collaborator

Hi @jsperezg - as for the UI, I'm working on that here: decidim/decidim#2521. This should solve most of these UI issues.

The messaging system will currently not work with organizations. Organization management (assigning users, profile, etc) does need some love. That's something we can enable at the core.

@arnaumonty
Copy link
Author

@jsperezg decidim/decidim#2521 is closed and merged. Do you think that it is enough to proceed?

@mrcasals
Copy link
Contributor

mrcasals commented Feb 12, 2018

@arnaumonty decidim/decidim#2521 is not merged, it was closed.

@arnaumonty
Copy link
Author

:( OK, I don't know how to proceed with this, but it is a killer feature right now. Let's figure out which is the best and easy solution to establish direct conversations with initiatives creators.

@xabier
Copy link

xabier commented Feb 19, 2018

@arnaumonty we are about to have the full new proposal page with all the action buttons, thresholds, etc., should we wait until them (this should be ready this week) and then update initiatives?

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

No branches or pull requests

5 participants