Skip to content

[4.0] Show changelog - GSoC Expand Extensions Manager #17536 redo#24026

Merged
wilsonge merged 75 commits intojoomla:4.0-devfrom
roland-d:show_changelog
Mar 25, 2019
Merged

[4.0] Show changelog - GSoC Expand Extensions Manager #17536 redo#24026
wilsonge merged 75 commits intojoomla:4.0-devfrom
roland-d:show_changelog

Conversation

@roland-d
Copy link
Contributor

@roland-d roland-d commented Feb 26, 2019

Redo

This is a continuation of issue #17536 as I can no longer push to that repo, starting a new PR.

Introduction

At this time, users have to look for external sources of information about changes in an extension, when they are going to update their extensions. In most cases, users install an extension without checking the changelog due to the difficulty to find the associated changelog. With this new feature, users can review the changelog of the extensions when they are about to install an update (granted that the changelog is provided by the extension's developer), and after the extension is installed.

Summary of Changes

Added a new parameter on the xml updateserver files 'changelogurl' and adding it to #__updates table.

Testing Instructions

  1. Apply this pull request
  2. Run the command npm ci to compile the JavaScript
  3. Login to the administrator side
  4. Go to Extensions -> Database -> Fix to make sure the database changes are applied
    screenshot from 2017-07-24 21-36-09
  5. Install the test extension from https://github.com/roland-d/component_joomla/releases/tag/v0.0.2
  6. Go to Manage
  7. Filter the list on List of Students
  8. Click on the version number 0.0.2
  9. A modal shows up with the changelog as shown below under Manage View
  10. Go to Update
  11. Click on Find Updates
  12. The update is shown and click on the Changelog button
  13. A modal shows up with the changelog as shown below under Update View

Changelog format

The changelogurl is supported for all extensions, you just need to add tags in your installation xml with a valid url.
<changelogurl>https://rolandd.com/24026/changelog.xml</changelogurl>

The format of the XML file is as follows:

<changelogs>
    <changelog>
        <element>com_lists</element>
        <type>component</type>
        <version>4.0.0</version>
        <security>
            <item>Item A</item>
            <item>Item b</item>
        </security>
        <fix>
            <item>Item A</item>
            <item>Item b</item>
        </fix>
        <language>
            <item>Item A</item>
            <item>Item b</item>
        </language>
        <addition>
            <item>Item A</item>
            <item>Item b</item>
        </addition>
        <change>
            <item>Item A</item>
            <item>Item b</item>
        </change>
        <remove>
            <item>Item A</item>
            <item>Item b</item>
        </remove>
        <note>
            <item>Item A</item>
            <item>Item b</item>
        </note>
</changelog>
<changelog>
	<element>com_lists</element>
	<type>component</type>
	<version>0.0.2</version>
	<security>
		<item>Big issue</item>
	</security>
</changelog>
</changelogs>

This file contains 2 changelogs:

  • Version 0.0.2 (for testing the manage view)
  • Version 4.0.0 (for testing the update view)

Update View
Install the List component https://github.com/roland-d/component_joomla/releases/tag/v0.0.2
By default you will have always an update from 0.0.2 to 4.0.0 just for testing

If the changelog is not available it will show N/A like in the Folder column

image

It will open a modal window that loads the changelog via AJAX from the given changelog URL.
The title of the modal is version ' - ' component_name

image

Manage View
On the manage view the changelog is triggered by clicking on the version number.

image

image

Expected result

In Updates View you will have a new column that will show a changelog button to open a modal if there is a changelogurl in the #__updates table.
In Manage View you will have an tag in the version with a info icon on the right side if your extension has a changelogurl in the #__extensions table.

Documentation Changes Required

Add changelogurl parameter on updatesite information and in extension.
Add changelog XML format to updatesite information

NunoLopesPT and others added 30 commits May 17, 2017 15:02
@brianteeman
Copy link
Contributor

The title of the modal is version ' - ' component_name

The modal must have a title - I would suggest Changelog - component_name

For the title it is better to present the component_name before the version number

@wilsonge
Copy link
Contributor

@roland-d i'm done with merge conflicts for a bit so coming back to this. Can you fix the conflict here and address the a11y point raised by brian and i'll try and get this tested :)

# Conflicts:
#	libraries/src/Installer/Adapter/LibraryAdapter.php
Signed-off-by: Roland Dalmulder <contact@rolandd.com>
@roland-d
Copy link
Contributor Author

@wilsonge All updated and modal title changed as well. I have kept the version number though, I do think this is useful information. As such it now looks like this:

image

The title is a language string now, so it can be translated as people wish.

@ciar4n
Copy link
Contributor

ciar4n commented Mar 21, 2019

@roland-d I created roland-d#13 which makes the modal responsive. Feel free to close if you believe it outside the scope of this PR.

@roland-d
Copy link
Contributor Author

@ciar4n I think it looks great. Thank you.

@wilsonge
Copy link
Contributor

Javascript code style issues to solve

Signed-off-by: Roland Dalmulder <contact@rolandd.com>
Signed-off-by: Roland Dalmulder <contact@rolandd.com>
@roland-d
Copy link
Contributor Author

@wilsonge Yay, all green :)

@@ -0,0 +1,2 @@
ALTER TABLE "#__extensions" ADD COLUMN "changelogurl" text AFTER "element";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove

AFTER "element" 
AFTER `infourl` 

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Signed-off-by: Roland Dalmulder <contact@rolandd.com>
@alikon
Copy link
Contributor

alikon commented Mar 23, 2019

I have tested this item ✅ successfully on 775e102


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24026.

@wilsonge wilsonge merged commit 48af582 into joomla:4.0-dev Mar 25, 2019
@wilsonge wilsonge added this to the Joomla 4.0 milestone Mar 25, 2019
@wilsonge
Copy link
Contributor

There's a test and there's a merge :) Thanks @roland-d and @NunoLopes96 for all the hard work on this!

@Quy
Copy link
Contributor

Quy commented Mar 26, 2019

@roland-d Please investigate issue #24360. Thanks.

PHP Notice: Undefined index: namespace in \libraries\src\Installer\Adapter\ComponentAdapter.php on line 1423

@roland-d roland-d deleted the show_changelog branch May 4, 2019 06:33
@hgh-esn
Copy link
Contributor

hgh-esn commented May 27, 2019

@roland-d

I tested your nice extension, while working on updates to J4 for my plugin: stophitcounts.
In the plugin-manage-view I get the modal-window when clicking to the "changelog-version-item-link"
2019-05-27_13h43_22

When trying to look to the changelog in the auto-updates, it fails. See

@wilsonge
Copy link
Contributor

Rolands written docs for this here https://docs.joomla.org/Adding_changelog_to_your_manifest_file so removing the docs required tag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

Comments