Show comment count across branches on api.drupal.org

Created on 27 April 2016, over 8 years ago
Updated 5 July 2024, 2 months ago

Problem/Motivation

Currently each minor release of Drupal 8 creates a separate documentation page on api.drupal.org. This is a very good thing when it comes to code documentation, however creates an issue with the comments.
Very good tips and tricks are gathered from user comments on the class/method/function page on that site and this was very easy in D7 since the function/hook documentation page never changed from D7 release day, so several years of comments are accumulated per each page. This will not happen with D8, considering that every ~6months a new minor release will be generated and will not have any reference to the comments done in the previous version, even 'tho most of the comments will be still valid for the new release as well.
Naturally the comments aren't lost, they are simply in the "old" page, which is still accessible, but the need to navigate through all the minor version pages to check if there are comments it's definitely a bad DX experience.

Proposed resolution

I have two options in mind as solutions:

1. Add a "comment count" to the page link:

2. Share the comments among D8 major release and add a text like "api version X.y" to ad reference on which page is the comment posted on.

Remaining tasks

TBD

User interface changes

Depending on chosen solution: TBD!

Feature request
Status

Needs work

Version

2.0

Component

User interface

Created by

🇳🇴Norway esolitos Trondheim

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇪🇸Spain fjgarlin

    As a note. Comments were disabled/hidden during the last months of the D7 version of api.drupal.org. Then, on new launch for the the D10 site, comments were not even imported. Related: 📌 Missing legacy comments on Drupal 7.X API docs Active

    The medium/long term plan for this module is to actually remove any code/logic regarding comments.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    @fjgarlin Does this mean that it will not be possible to comment on api.drupal.org pages?
    I do not personally see any use for comments on api.drupal.org, even if sometimes I have commented saying which function in Drupal 8 replaced a function in Drupal 7, which should be no longer necessary. There are probably some comments about how to correctly use Drupal API that cannot have another place to be posted, but I also know that comments on api.drupal.org pages would have a limited visibility. (I can image a comment posted on a Drupal 10.1 page, for example, that would not be seen by somebody who watches the same page, but for Drupal 10.3.)

  • 🇪🇸Spain fjgarlin

    Correct. That is the current behaviour and the plan going forward.

    Also, that was the case, a comment made in 8.1.x would not show up in 8.2.x. In addition to that, when cleaning up old branches, comments would dissapear with them.

    Newer versions of Drupal had less and less comments.

  • 🇬🇧United Kingdom joachim

    > There are probably some comments about how to correctly use Drupal API that cannot have another place to be posted

    The best way is to file a docs issue and improve the docs so they are clearer.

Production build 0.71.5 2024