backdrop / backdrop-issues

Issue tracker for Backdrop core.
144 stars 40 forks source link

Add link to release notes for Backdrop installed version on status and available updates reports. #6587

Open izmeez opened 5 months ago

izmeez commented 5 months ago

Description of the need

The status report at admin/reports/status and available updates report at admin/reports/updates both show which version of Backdrop CMS is installed. It would be helpful to have a link to the release notes for the version always available.

This is especially useful before and even after installing a new version.

The new Backdrop 1.28.0 release notes, like others before it, provide important details on changes and new features. The release notes for this version include information on the new configurable config storage feature.

A simple link to the release notes will be useful and save a lot of time to quickly check when questions arise.

Proposed solution

Add a link to the release notes of the installed version of Backdrop Core on both the Status and Available Updates Reports.

izmeez commented 5 months ago

@klonos I started to take a look at doing this by adding a link to the Status Report. Unfortunately, I had difficulty locating where the code needs to be updated. I was looking in the core > modules > system files. Seems to be several layers deep or I'm in the wrong place.

kswan commented 5 months ago

@izmeez , The Status Report is built using hook_requirements(). The line that shows up as "Backdrop CMS" is added here https://github.com/backdrop/backdrop/blob/fe5c21ced7a7e3bcb9b41df15a7977ee89384a17/core/modules/system/system.api.php#L2578

To find any other lines of the status report, you may need to search the codebase for "hook_requirements".

izmeez commented 5 months ago

@kswan Thanks for the heads up. I was actually looking at this, the hook_requirements in system.api.php and wondered if it might be. So, I'm assuming the 'value' needs to be changed or expanded. From what I have glanced over there may already be a helper function that fetches the url.

klonos commented 5 months ago

@izmeez any .api.php file is not participating actively in the code that runs as part of the site - it is meant to be used as examples and it is what our API/docs site "consumes" in order to build the various documentation around the APIs.

You don't need the hook_requirements() function itself, rather than an actual implementation of that function (a function that has an actual module name instead of hook_). The specific hook implementation that you should be looking to tweak is system_requirements(). All hook_requirements() implementations go in the respective .install file of each module, so you should be looking at the core/modules/system/system.install file specifically.

If you happen to join the office hours, I can help you further with general tips on where/how to find the code that needs tweaking 😉 (too much to be typing it all here - sorry)

izmeez commented 5 months ago

@klonos No apology needed. I appreciate the efforts you make to help me. I am hoping to make it to office hours and hope I have enough bandwidth.

izmeez commented 4 months ago

@kswan and @klonos Both your comments are helpful and with that I searched the code base for _requirements with 110 results in 32 files. More than needed for this item, yet an interesting package of examples to peruse.

klonos commented 4 months ago

Yes, I believe that system_requirements() in system.install within the System module is what you need. The rest of the implementations could serve as examples as you said @izmeez 👍🏼

izmeez commented 4 months ago

And that is just the first rabbit hole. I found my way to another hook, hook_update_status_alter ... I must admit using VS Code makes this easier.