fider
fider copied to clipboard
Allow visitors to create posts with tags
Posts can be sorted with tags, but theses tags can only be added and modified by administrators and collaborators.
Users (with visitor role) might already know the necessary tags. It would make administration with tags a lot easier if visitors could specify tags while creating posts.
It would also help with automation. For example to send an email or a message to different contacts depending on which tag is used.
Solution proposal
Front-End
The post creation form could be extended to look like this model :
This new field could be automatically filled with the tags specified in the URL through the tag filter search or an external link. It would help placing links on different web apps or physically through QR codes.
API
Should the tagging and untagging permissions be given to the creator of the post after creation ?
- If this is the case the tagging and untagging routes would have to be made accessible to the creator :
(Un)Tag a Post
- Authentication: Required
- Required Role: Collaborator or Administrator
- Allow post creator to use
Some other routes (like post editing) allow the post's creators to use them but it is not documented
POST /api/v1/posts/{number}/tags/{slug}
...
- Else in the route used to create posts
POST /api/v1/poststhe payload could be extended to include tags :
Create a Post
- Authentication: Required
POST /api/v1/posts
Parameters
| Name | Type | Description |
|---|---|---|
| title | string | Required. The title of the post. |
| description | string | The description of the post. |
| tags | list | The list of tags to create the post with |
Example
POST <baseURL>/api/v1/posts
---
{
"title": "Allow users to edit any comment",
"description": "This is useful to fix some minor typos or introduce more details"
"tags": ["feature"]
}
Both these solutions would allow visitors to specify tags while creating posts.
Feature enabling
Should this feature be behind a feature flag ? Or should it be enabled for everybody ?
This feature request is quite important for us as we use Fider as a global feedback plateforme for our university projects, with @MercierMateo with your approval, we are ready to develop this feature !
It is part of an educational projet, I'm supervising the project.
Hey there.
Thanks very much for this. What you're proposing sounds like a nice addition to the app.
We're more than happy for you to take this on, here are some thoughts / comments from us:
UI
I'm not sure if this is what you're proposing, but yes we think it's OK to allow the tags to be selected when you're adding the post - use the same UI / components that we currently use for tagging posts when you're an admin.
Allowing users to change tags once it's been added.
First I was going to suggest that you should be able to change tags, since you can do so when you create posts. But, after some thought and discussions, we've changed our mind on that one. It gets very complicated since you wouldn't want tags that have been assigned from admins to be edited from the post creators. So for now, we think it would be better to only allow tags to be created when you create the post?
Feature enabling
I think it might be a good idea if you develop this with a feature switch so that if some people don't want it, they can turn it off. You can add something to the config to support this.
Hey,
Thanks for your reponse, I will start working on these improvements. I agree with the choices you suggest.
#1221 I created this draft pull request with the API part working, I will add the feature enabling support soon.
On the UI part I am not quite sure what should be done. I realized two different post filter component were used, the SimilarPosts and the PostsContainer. The behaviour of these components is different when handling tags : SimilarPosts does not filter by tag while PostsContainer does.
Should I just add a tag selection input to the submit form while ignoring the different behaviours ? If we want to be able to put the tags in the URL, certainly using the same parameter in the URL as the PostsContainer, wouldn't it be weird looking to the user if new posts appear while he is typing even if their tags are not related.