Language Change NPM Resource Changed PR-4.0-dev

Pending

User tests: Successful: Unsuccessful:

avatar roland-d
roland-d
26 Feb 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

6d1453a 3 Jul 2017 avatar NunoLopes96 NL
avatar roland-d roland-d - open - 26 Feb 2019
avatar roland-d roland-d - change - 26 Feb 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Feb 2019
Category SQL Administration com_admin Postgresql com_installer Language & Strings Installation Libraries
avatar roland-d roland-d - change - 26 Feb 2019
Labels Added: Language Change PR-4.0-dev
avatar mbabker
mbabker - comment - 26 Feb 2019

I still think this is best suited as an XML schema that is parsed into the modal instead of iframing an external page in (#17536 (comment)).

avatar roland-d
roland-d - comment - 26 Feb 2019

@mbabker Since I am not spending my time on this, I will move forward with the XML approach. Any guidelines of how the XML format should look like are welcome.

avatar mbabker
mbabker - comment - 26 Feb 2019

What you had in #17536 (comment) looks OK to me.

avatar ciar4n
ciar4n - comment - 27 Feb 2019

@roland-d I'm been hit with he following when attempting to find updates...

Update: Could not open update site #4 "My Extension's Updates", URL: https://www.jah-tz.de/downloads/core/gsoc17/extension.xml

I'm only noticing you tagged me in the original PR. Still looking for help on some styling?

avatar roland-d
roland-d - comment - 27 Feb 2019

@ciar4n Thank you for already checking it. I will prepare a new test setup, since this is also a few years old. I will do that after reworking the code to use the XML setup.

Yes, I am still looking for styling help, as I can barely float 2 divs :)

avatar joomla-cms-bot joomla-cms-bot - change - 3 Mar 2019
Category SQL Administration com_admin Postgresql com_installer Language & Strings Installation Libraries SQL Administration com_admin Postgresql com_installer Language & Strings Installation Layout Libraries
avatar joomla-cms-bot joomla-cms-bot - change - 4 Mar 2019
Category SQL Administration com_admin Postgresql com_installer Language & Strings Installation Libraries Layout SQL Administration com_admin Postgresql com_installer Language & Strings JavaScript Repository NPM Change Installation Layout Libraries
avatar roland-d roland-d - change - 4 Mar 2019
Labels Added: NPM Resource Changed
avatar roland-d roland-d - change - 4 Mar 2019
The description was changed
avatar roland-d roland-d - edited - 4 Mar 2019
avatar roland-d roland-d - change - 4 Mar 2019
The description was changed
avatar roland-d roland-d - edited - 4 Mar 2019
avatar roland-d roland-d - change - 4 Mar 2019
The description was changed
avatar roland-d roland-d - edited - 4 Mar 2019
avatar roland-d roland-d - change - 4 Mar 2019
The description was changed
avatar roland-d roland-d - edited - 4 Mar 2019
avatar roland-d
roland-d - comment - 4 Mar 2019

@ciar4n I have updated the PR and the majority of the work is done as far as I am concerned. Could you apply the needed styling on the file layouts/joomla/installer/changelog.php ? You can see the current layout in the opening post screenshots. Thank you.

avatar roland-d roland-d - change - 4 Mar 2019
The description was changed
avatar roland-d roland-d - edited - 4 Mar 2019
avatar ciar4n
ciar4n - comment - 5 Mar 2019

Sure. Give me a couple days and i will take a look!

avatar joomla-cms-bot joomla-cms-bot - change - 7 Mar 2019
Category SQL Administration com_admin Postgresql com_installer Language & Strings Installation Libraries Layout JavaScript Repository NPM Change SQL Administration com_admin Postgresql com_installer Language & Strings Templates (admin) JavaScript Repository NPM Change Installation Layout Libraries
avatar ciar4n
ciar4n - comment - 7 Mar 2019

Updated styling...

image

avatar roland-d roland-d - change - 7 Mar 2019
The description was changed
avatar roland-d roland-d - edited - 7 Mar 2019
avatar roland-d
roland-d - comment - 14 Mar 2019

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

avatar wilsonge
wilsonge - comment - 14 Mar 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

avatar roland-d
roland-d - comment - 14 Mar 2019

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

Enjoy the alone time :)

avatar brianteeman
brianteeman - comment - 14 Mar 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

avatar wilsonge
wilsonge - comment - 20 Mar 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 :)

avatar roland-d
roland-d - comment - 21 Mar 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.

avatar ciar4n
ciar4n - comment - 21 Mar 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.

avatar roland-d
roland-d - comment - 21 Mar 2019

@ciar4n I think it looks great. Thank you.

avatar wilsonge
wilsonge - comment - 22 Mar 2019

Javascript code style issues to solve

avatar roland-d
roland-d - comment - 23 Mar 2019

@wilsonge Yay, all green :)

avatar alikon
alikon - comment - 23 Mar 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.

avatar alikon alikon - test_item - 23 Mar 2019 - Tested successfully
avatar wilsonge wilsonge - change - 25 Mar 2019
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-03-25 11:29:02
Closed_By wilsonge
avatar wilsonge wilsonge - close - 25 Mar 2019
avatar wilsonge wilsonge - merge - 25 Mar 2019
avatar wilsonge
wilsonge - comment - 25 Mar 2019

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

avatar Quy
Quy - comment - 26 Mar 2019

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

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

avatar hgh-esn
hgh-esn - comment - 27 May 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

avatar wilsonge
wilsonge - comment - 27 May 2019

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

Add a Comment

Login with GitHub to post a comment