-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Comments
Interesante opción (no había pensado en ella, pero será muy útil). |
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 therelated_content_id
(i.e.23
).related_content_id
(integer): id in table of origin of the content found as related toparent_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 id23
that has as related content aProposal
with id456
, 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.
The text was updated successfully, but these errors were encountered: