Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 75 commits into from Mar 25, 2019

Conversation

@roland-d
Copy link
Contributor

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

NunoLopes96 added some commits May 17, 2017

ciar4n and others added some commits Mar 7, 2019

@roland-d

This comment has been minimized.

Copy link
Contributor Author

commented Mar 14, 2019

@wilsonge Is there any desire to merge this or should it just be closed?

@wilsonge

This comment has been minimized.

Copy link
Contributor

commented Mar 14, 2019

There is desire! I'm trying to merge quite a lot of 3.9.0 into the 4.0 branch over the next few nights as my girlfriend is out the country. please don't hesitate to ping me after the weekend is over to come back to this!

@mbabker if you could confirm the xml schema changes you were after had been made it would save me from doing so much code review

Also a testable component here would be ideal - appreciate providing a sample component is hard - but i'm really trying not introduce anymore broken features in the 4.0 branch. More than happy to be the one that actually does the testing however if no one steps up

@roland-d

This comment has been minimized.

Copy link
Contributor Author

commented Mar 14, 2019

@wilsonge A testable extension is provided, see step 5 of the test instructions.

Enjoy the alone time :)

@brianteeman

This comment has been minimized.

Copy link
Contributor

commented Mar 14, 2019

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

This comment has been minimized.

Copy link
Contributor

commented Mar 20, 2019

@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 :)

roland-d added some commits Mar 21, 2019

Merge branch '4.0-dev' into show_changelog
# Conflicts:
#	libraries/src/Installer/Adapter/LibraryAdapter.php
Update changelog modal title #24026
Signed-off-by: Roland Dalmulder <contact@rolandd.com>
@roland-d

This comment has been minimized.

Copy link
Contributor Author

commented Mar 21, 2019

@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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Contributor Author

commented Mar 21, 2019

@ciar4n I think it looks great. Thank you.

@wilsonge

This comment has been minimized.

Copy link
Contributor

commented Mar 22, 2019

Javascript code style issues to solve

roland-d added some commits Mar 22, 2019

Fixing the JS errors #24026
Signed-off-by: Roland Dalmulder <contact@rolandd.com>
Make javascript-cs happy #24026
Signed-off-by: Roland Dalmulder <contact@rolandd.com>
@roland-d

This comment has been minimized.

Copy link
Contributor Author

commented Mar 23, 2019

@wilsonge Yay, all green :)

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

This comment has been minimized.

Copy link
@alikon

alikon Mar 23, 2019

Contributor

please remove

AFTER "element" 
AFTER `infourl` 

This comment has been minimized.

Copy link
@roland-d

roland-d Mar 23, 2019

Author Contributor

Done.

Update Postgres SQL #24026
Signed-off-by: Roland Dalmulder <contact@rolandd.com>
@alikon

This comment has been minimized.

Copy link
Contributor

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

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/drone/pr the build was successful
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@wilsonge wilsonge added this to the Joomla 4.0 milestone Mar 25, 2019

@wilsonge

This comment has been minimized.

Copy link
Contributor

commented Mar 25, 2019

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

@Quy

This comment has been minimized.

Copy link
Contributor

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 roland-d:show_changelog branch May 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.