arc/docs/badges/discourse_integration.rst

123 lines
7.6 KiB
ReStructuredText
Raw Normal View History

.. _discourse_integration:
Integrate Fedora Discussions with the Fedora Badges System
====
Fedora Badges has not only been a means to incentivize contribution for the
Fedora Project community but also been an topic of active conversation and a
healthy competition among the community members. One of the attempts to bring
the system to the forefront was made by
`Matthew Miller <https://accounts.fedoraproject.org/user/mattdm>`_ on
`this Fedora Discussions thread <https://discussion.fedoraproject.org/t/magical-experimental-fedora-badges-topic/35007>`_
and participated by a lot of community members. This turned out to be quite a
successful experiment and the badges that people have acquired got integrated
with the Discourse badges page (For eg. here is a catalog of badges acquired by
`Akashdeep Dhar <https://discussion.fedoraproject.org/u/t0xic0der/badges>`_).
As it stands, the usage of Discourse (or Fedora Discussions) happens to help
with simplifying the creation (and maintenance) of the frontend of the Fedora
Badges system. Although this is a welcome proposal, the frontend happens to be
the least challenging component of the system (as mentioned by Ryan Lerch in
`his reply <https://discussion.fedoraproject.org/t/discourse-badges-should-we-or-shouldnt-we/34698/6>`_
to the
`original post <https://discussion.fedoraproject.org/t/discourse-badges-should-we-or-shouldnt-we/34698>`_
about testing waters around
`Discourse Badges <http://discussion.fedoraproject.org/badges>`_ created on
23rd Nov 2021) but the fact that it still has not been maintained and requires
modernization cannot be denied. At the very same time, it is a very alluring
choice which helps us save efforts in developing the frontend from ground up
and redirect them into redeveloping the backend, which admittedly requires the
most attention.
The original post about exploring the idea of using Discourse as the frontend
for Fedora Badges system (which can be found
`here <https://discussion.fedoraproject.org/t/exploring-the-idea-of-using-discourse-as-a-badges-frontend-the-backend-implications/34887>`_
created on 1st Dec 2021) further details on the proposed approaches of making
it happen. Although the study is superficial but the implications provided
there should be adequate enough to connect with our study regarding the
entities involved in the proposed redevelopment of the system (the one that can
be found
`here <https://fedora-arc.readthedocs.io/en/latest/badges/prop_rewrite_entities.html>`_
) to deduce that Fedora Discussions could very well be used to be a drop-in
replacement of sorts for our Liberation entity (information about the internal
entities can be found
`here <https://fedora-arc.readthedocs.io/en/latest/badges/prop_rewrite_entities.html#internal-entities>`_
).
The discussions in the aforementioned post were continued over at the original
post sharing notes of the things needed to be taken care of while implementing
the same (which can be found
`here <https://discussion.fedoraproject.org/t/badges-to-discourse-experiment-notes-on-discourse-as-a-badges-front-end/35262>`_
created on 16th Dec 2021). The following are the key points we derived and
discussed about from the said treatise.
1. The Discourse frontend does provide for a much faster loading of badges list
(Source:
`JSON acquring time for user mattdm <https://discussion.fedoraproject.org/t/badges-to-discourse-experiment-notes-on-discourse-as-a-badges-front-end/35262#:~:text=Getting%20list%20of%20badges%20for%20mattdm%20via%20JSON%20here%3A%20about%20140ms.%20From%20badges%20site%2C%20about%2035%20whole%20seconds>`_
) and the plugin system is convenient enough to allow for adding features
and elements atop a stock interface.
2. The global listing of badges on the Discourse interface allows marking of
acquired badges and for grouping, which can help solve the issue of
introducing badge paths, although the listing of badges according to their
age needs looking into.
3. The per-user listing of badges could use some organization according to
categories and/or badge paths but favourite badges can be picked and shown
on the profile card, which makes these badges more than a royal collectible
but something to start discussions around.
4. The leaderboards also remain something to be seen, though the implementation
should be fairly easy if we are to have the same format as that of the
current frontend (i.e. show weekly, monthly and all-time leaders). The badge
count for the users should be added too.
5. The use of Discourse's internal badge levels alongside our badge paths has a
possibility of doing more harm than good, as it allegedly allows for only
three levels (i.e. bronze, silver and gold). This might confuse the frontend
if certain badges of a path belong to a level or tier.
6. The UI for manually awarding badges is allegedly restricted to only those
who are admins of the forum. Integrating that access capacity with a FAS
group should allow for members belonging to that group to award badges while
restricting them from any other admin-like operations.
7. The inclusion of QR codes or links to receive badges does not seem to be a
feature on the Discourse frontend but it is something that we could play
around with and implement using automation scripts. Also, there should be a
way for folks to opt-in or opt-out of these as they fit.
The following are the pain-points we derived out of the study.
1. There are possibilities that the users would get bombarded with loads of
notifications as they receive loads of badges in a short duration of time.
If this is understood correctly, this issue can be safely ignored as this
happens to be a one-time problem only.
2. There can be times when the user can have their account activated for
Fedora Badges and not on Discourse, or vice-versa. We would require to
rework the database (and the access to it from the Discourse frontend) to
ensure that the Badges database has the precedence.
How do go about it?
----
We swap out the Liberation entity part from the
`internal entity chart <https://fedora-arc.readthedocs.io/en/latest/_images/badges-proposed-architecture.png>`_
and replace it with the Discourse frontend. The interactions, for the most
parts, should stay the same but a considerably different set of technologies
would be required to work on the Discourse frontend.
Is there a Plan B?
----
Of course, there is. Just in case, the proposal for the use of the Discourse
frontend is not met with the community's approval or if it becomes too
difficult to work on - we can always make the current implementation of
integration work with the redeveloped system. In this way, we can have our own
frontend all while ensuring that our badges are not left behind catching
electronic dust by giving them the attention on the Fedora Discussions forum,
with their use as custom titles and listing them on the user cards.
Further reading
----
1. `Discourse Badges - should we or shouldn't we? <https://discussion.fedoraproject.org/t/discourse-badges-should-we-or-shouldnt-we/34698>`_
2. `Badges on Fedora Discussions <https://discussion.fedoraproject.org/badges>`_
3. `Exploring the idea of using Discourse as a badges frontend — the backend implications <https://discussion.fedoraproject.org/t/exploring-the-idea-of-using-discourse-as-a-badges-frontend-the-backend-implications/34887>`_
4. `Magical Experimental Fedora Badges Topic! <https://discussion.fedoraproject.org/t/magical-experimental-fedora-badges-topic/35007>`_
5. `Badges-to-Discourse experiment... notes on Discourse as a badges front-end <https://discussion.fedoraproject.org/t/badges-to-discourse-experiment-notes-on-discourse-as-a-badges-front-end/35262>`_