NPM Resource Changed ? ? Pending

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
19 Mar 2021

Pull Request for Issue # .

Summary of Changes

  • This PR moves the core.js logic for rendering messages to another file
  • It uses import for bringing in the alert custom element (one less HTTP request)

Why?

Well, there is no way to override this part of the code without overriding the whole core.js, which is terrible as this is supposed to be the javascript API of the CMS. Bad architecture.

Depends/extends #32740

Testing Instructions

  • Apply the PR
  • try to login with the wrong credential in the front end and back end (should get an alert)
  • Try to upload an image in the media manager (you should also get an alert)

Actual result BEFORE applying this Pull Request

Expected result AFTER applying this Pull Request

Documentation Changes Required

Not really, the code is the same, we only moved it to an own file that is included from the respective layout (thus is properly overridable now)

avatar dgrammatiko dgrammatiko - open - 19 Mar 2021
avatar dgrammatiko dgrammatiko - change - 19 Mar 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Mar 2021
Category JavaScript Repository NPM Change Layout
avatar dgrammatiko dgrammatiko - change - 19 Mar 2021
Title
]
[4.0] Decouple core.js from Bootstrap
avatar dgrammatiko dgrammatiko - edited - 19 Mar 2021
avatar dgrammatiko dgrammatiko - change - 19 Mar 2021
The description was changed
avatar dgrammatiko dgrammatiko - edited - 19 Mar 2021
avatar dgrammatiko dgrammatiko - change - 19 Mar 2021
Labels Added: NPM Resource Changed ?
avatar joomla-cms-bot joomla-cms-bot - change - 19 Mar 2021
Category JavaScript Repository NPM Change Layout JavaScript Repository NPM Change Installation Layout
avatar dgrammatiko dgrammatiko - change - 19 Mar 2021
Title
[4.0] Decouple core.js from Bootstrap
[4.0] Decouple messages from core.js
avatar dgrammatiko dgrammatiko - edited - 19 Mar 2021
avatar joomla-cms-bot joomla-cms-bot - change - 20 Mar 2021
Category JavaScript Repository NPM Change Layout Installation JavaScript Repository NPM Change Installation Layout Unit Tests
avatar dgrammatiko dgrammatiko - change - 20 Mar 2021
Labels Added: ?
0b7552b 24 Mar 2021 avatar dgrammatiko init
avatar dgrammatiko dgrammatiko - change - 24 Mar 2021
Labels Added: ?
Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 24 Mar 2021
Category JavaScript Repository NPM Change Layout Installation Unit Tests JavaScript Repository NPM Change Installation Layout
avatar dgrammatiko dgrammatiko - change - 24 Mar 2021
Labels Removed: ?
avatar Quy
Quy - comment - 25 Mar 2021

Please fix conflicts. Thanks.

avatar Quy
Quy - comment - 25 Mar 2021

Go to Smart Search.
Click Clear Index button.

Before PR:
32747-before

After PR (missing first message):
32747-after

avatar dgrammatiko
dgrammatiko - comment - 25 Mar 2021

@Quy thanks for testing, it seems a bug with (animation transition [?]) alerts custom element as the HTML part was created correctly
Screenshot 2021-03-25 at 18 45 29

avatar dgrammatiko
dgrammatiko - comment - 25 Mar 2021

@Quy 268a29e should fix it

avatar Quy
Quy - comment - 25 Mar 2021

Fixed, however, the first message is colored blue and not green.

32747

avatar Quy
Quy - comment - 25 Mar 2021

Go to System > Redirects
Click Redirect System Plugin in the alert.

Alert should be red.
Modal does not open.

avatar dgrammatiko
dgrammatiko - comment - 25 Mar 2021

Modal does not open.

Say hello to HTML sanitization, will check this

avatar dgrammatiko
dgrammatiko - comment - 25 Mar 2021

@Quy fixed both, I have to alter also the other PR for the allowed attributes

455d218 25 Mar 2021 avatar dgrammatiko CS
avatar Quy
Quy - comment - 25 Mar 2021

Go to Media.
Click Delete button.

Alert should be red.

avatar dgrammatiko
dgrammatiko - comment - 25 Mar 2021

Alert should be red.

So I thought that I could drop the old strings but I guess that will be B/C break, so they're back

avatar Quy
Quy - comment - 25 Mar 2021

Looks good!! I will test some more.

In the meantime, if you can look at these related issues: #30880 #29152

Thanks!

avatar dgrammatiko
dgrammatiko - comment - 25 Mar 2021

@Quy #32868 should solve both the issues

avatar particthistle particthistle - test_item - 17 Apr 2021 - Tested successfully
avatar particthistle particthistle - test_item - 17 Apr 2021 - Tested unsuccessfully
avatar particthistle particthistle - test_item - 17 Apr 2021 - Tested unsuccessfully
avatar particthistle
particthistle - comment - 17 Apr 2021

I have tested this item ? unsuccessfully on aa80075

Last moment test fail :(


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

avatar dgrammatiko
dgrammatiko - comment - 17 Apr 2021

Last moment test fail :(

What failed?

avatar particthistle
particthistle - comment - 17 Apr 2021

Doh! Comment got lost as I was editing it.

  • The items on your test list all passed.
  • The items @Quy tested I also tested and they also passed. The note on the link colour on the redirect plugin IMO isn't an issue - in Beta 8 it's green. After applying your PR, it's also green. @Quy suggested it should be red. The modal there did work.
    image

The error encountered was in Joomla Update.

After testing, I went to reinstall Beta 7 to then update to Beta 8. Got to the point where I logged into Joomla Update and it was about to start unpacking the archive, and this AJAX error came up, rendering the update process broken.
image

avatar dgrammatiko
dgrammatiko - comment - 17 Apr 2021

After testing, I went to reinstall Beta 7 to then update to Beta 8. Got to the point where I logged into Joomla Update and it was about to start unpacking the archive, and this AJAX error came up, rendering the update process broken.

This is not related to alerts AFAICT, something else is broken there as that is a native confirm not the alerts that this PR is patching

avatar particthistle particthistle - test_item - 17 Apr 2021 - Tested successfully
avatar particthistle
particthistle - comment - 17 Apr 2021

I have tested this item successfully on aa80075

Thanks for looking at that so quickly.
I've just tested the Joomla Update process again and it worked successfully

I think I'd broken it by clicking Apply Patch instead of installing the download package at the start of the process.


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

avatar Quy Quy - test_item - 17 Apr 2021 - Tested successfully
avatar Quy
Quy - comment - 17 Apr 2021

I have tested this item successfully on aa80075


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

avatar Quy Quy - change - 17 Apr 2021
Status Pending Ready to Commit
avatar Quy
Quy - comment - 17 Apr 2021

RTC


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

avatar rdeutz rdeutz - change - 19 Apr 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-04-19 06:26:55
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 19 Apr 2021
avatar rdeutz rdeutz - merge - 19 Apr 2021

Add a Comment

Login with GitHub to post a comment