• Members 7 posts
    Feb. 26, 2018, 8:10 p.m.

    Hi rafalp,

    Do you plan in the near future to build the feature solution/best answer and integrate it into misago? It is a nice feature which allows owner of a thread discussion to choose a thread as best answer or mark it as solved like flarum does:
    solved_flarum.png

    If not, can you point me out what the best way is to develop this feature? What is the ideal workflow? Django and react are somehow mixed and I would like to know how I can develop a feature for misago in the best way.

    Thank you for your help!
    Manuel

    solved_flarum.png

    PNG, 146.2 KB, uploaded by manuel on Feb. 26, 2018.

  • Feb. 27, 2018, 12:39 a.m.

    Hey Manuel!

    This feature is on project's roadmap:

    Mark post in question thread as answer, bringing basic Q&A functionality.

    I've always considered it low priority and focused on other things, but thinking about it now getting MVP implementation wouldn't be hard:

    New fields on Thread model:

    • answer ForeignKey to Post
    • answer_set_by ForeignKey to settings.AUTH_USER_MODEL
    • answer_set_on DateTimeField

    Add permissions for setting this field to threads permission provider.

    Next, create patch operation for setting and unsetting this field, based on permissions. Misago has comfortable framework in for writing those ops.

    Lastly, update the thread serializer and then our JS UI.


    I'm currently occupied refactoring and cleaning up the code behind our JSON API as groundwork for incoming frontend rewrite, but now and then and I'm taking breaks from that to cut new releases for folk out there. I've already made the mistake of becoming exclusively focused with "Big Next Thing" (TM) in the past. This seems like something simple enough for me to actually try to release this feature in basic version in few weeks.

  • Members 7 posts
    Feb. 27, 2018, 10:34 a.m.

    Thanks for pointing me out!

    Ah, great that you plan to release this feature soon! I am looking forward to it :).

  • March 4, 2018, 8:25 p.m.

    I'm working on the MVP for answers feature with general idea being that user may be granted permission to select post as answer to his thread, but I've got stuck on the semantics:

    I've originally went with the "select as an answer" for additive action that results in post being set as thread's answer, but got stuck on nice subtractive semantic. I've started out with the "remove answer" but that may suggest to some users that it won't unset post as answer as much as it will remove the post from thread. Next one I've tried was "set as thread's answer" and "uset thread answer", but I'm not really convinced on that one.

    If anyone has better idea, I'll welcome it. I'll also try to push answers permission provider that is the place where those semantics are used the most for people to have more material to think up their propositions.

    EDIT: Here's the python file. Comments and ideas are welcome.

    Another ideas:

    • Remove "answer" status? That would produce error messages like "You can't remove answer status from this post because its not selected as thread answer."
    • Remove answer choice - "You can't remove this answer choice because its not selected thread answer." or simply "This post is not selected as thread answer."

    And here's spreadsheet on googledocs that I'm experimenting with.

  • March 19, 2018, 9:58 p.m.

    User with permission to mark best answer has "Best answer" button next to "Like":

    Zrzut ekranu 2018-03-19 o 21.54.23.png

    Best answer gets green bar to visually differentiate it from other posts:

    Zrzut ekranu 2018-03-19 o 21.55.03.png

    Best answer gets dedicated shortcut:

    Zrzut ekranu 2018-03-19 o 21.56.01.png

    Marking best answer may be reversed if user has permission to unmark best answer:

    Zrzut ekranu 2018-03-19 o 21.56.38.png

    Zrzut ekranu 2018-03-19 o 21.56.38.png

    PNG, 177.9 KB, uploaded by rafalp on March 19, 2018.

    Zrzut ekranu 2018-03-19 o 21.56.01.png

    PNG, 11.6 KB, uploaded by rafalp on March 19, 2018.

    Zrzut ekranu 2018-03-19 o 21.55.03.png

    PNG, 163.5 KB, uploaded by rafalp on March 19, 2018.

    Zrzut ekranu 2018-03-19 o 21.54.23.png

    PNG, 149.1 KB, uploaded by rafalp on March 19, 2018.

  • Members 7 posts
    March 20, 2018, 10:03 a.m.

    Hi rafalp,

    It looks nice for the start! Great work.

    Are you talking about the user who has posted the initial post or about any user who got this permission to mark thread as best answer? Normally, only the initiator can mark any post in his thread as best answer. Otherwise the status can be switched too many times if some users cannot agree about the best answer.

    However, Misago is becoming more promising :).

  • March 20, 2018, 10:18 a.m.

    There are two permissions here:

    • Can mark best answer
    • Can change marked best answer

    Each of those has three levels:

    • No
    • In owned threads
    • All threads

    Those permissions are per-category. Selecting "All threads" will make User de-facto a moderator for best answers in category.