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

Related content #1164

Closed
decabeza opened this issue Jun 23, 2016 · 1 comment
Closed

Related content #1164

decabeza opened this issue Jun 23, 2016 · 1 comment
Assignees

Comments

@decabeza
Copy link
Collaborator

decabeza commented Jun 23, 2016

The goal of this feature is to show a list of "related contents" to debates, proposals, etc in the platform. The users will see this list in the items #show page and would be able to match it as related or not with action buttons.

The main steps to build it could be resumed in the next points:

  • Create a polymorphic concern to handle as many models as we want.

  • Create a RelatedContent model to store the relations. This could have in origin the following attributes:

    • parent_content_id (integer): id in table of origin of the element that has attached as related the related_content_id (i.e. 23).
    • related_content_id (integer): id in table of origin of the content found as related to parent_content_id, which will be shown in its "related content" list (i.e. 456).
    • parent_content_type (string): model name of the parent element to identify its origin (i.e. Debate).
    • related_content_type (string): model name of the related element to identify its origin (i.e. Proposal).
    • times_reported (integer): in case a related content has been reported as not related by different users a maximum times (that is pending to be defined), this content will be removed (not yet defined if it will be hidden from the list or removed from the DDBB).

    So using the examples written above, we could have a record for a Debate with id 23 that has as related content a Proposal with id 456, which will appear in its list of "related contents".

  • Enable methods to perform the actions for users to say if the items in the list are related or not.

  • Regarding the topic of how to start to generate content if the users are the ones responsible for making these relations? here are my two cents: when the list of related contents is going to be rendered, and there're no relations created yet, I suggest to make a query to identify a bunch of items (a max number that the platform can assume and won't make the content load slower, maybe 5) from different models as potential relations, based on titles and tags. This way, we avoid not offering anything at all related and can start to encourage the users to decide whether those topics belong together or not. These querys will be random everytime the page is loaded, so the content will be diverse.

1_related_content

2_related_content

3_related_content

@ManjiChiba
Copy link

Interesante opción (no había pensado en ella, pero será muy útil).
Hasta ahora, ya venía haciéndolo yo, pero de una manera muy cutre/chapucera, poníendolo como un simple comentario/link a otra propuesta/propuestas complementaria o con la que agruparse.
Aprovecho... si se pudiera llevar a la práctica alguna de estas.... pues estaría muy bien.
https://decide.madrid.es/proposals/8938-recopilacion-de-propuestas-relativas-a-mejora-de-la-administracion-de-la-web-1
https://decide.madrid.es/proposals/11947-recopilacion-de-propuestas-relativas-a-mejora-de-la-administracion-de-la-web-2

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

No branches or pull requests

5 participants