NPM Resource Changed ?

Pending

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
14 Jul 2021

Redo of Pull Request #33234 .

This one should be treated as Release Blocker

(The alert code wasn't production-grade...)

Summary of Changes

The Alert Custom Element had some known issues and this PR is pulling a version that fixes all of them joomla-projects/custom-elements#179

Testing Instructions

Go to front end and backend and check that alerts are functioning as before (there are no styling changes, although the source is using CSS Vars for almost all parameters)

You can fire an alert using the browser's console with these snippets:

// Danger
Joomla.renderMessages({danger: ['Something happen']})
// Warning
Joomla.renderMessages({warning: ['Something happen']})
// Success
Joomla.renderMessages({success: ['Something happen']})
// Info
Joomla.renderMessages({info: ['Something happen']})

Actual result BEFORE applying this Pull Request

Expected result AFTER applying this Pull Request

Screenshot 2021-07-14 at 12 38 57
Screenshot 2021-07-14 at 12 39 12

Documentation Changes Required

The way that messages are rendered is exactly the same (only one internal change, not exposed to the API), so there is not anything to document.

@wilsonge DO NOT MERGE THIS WITHOUT MERGING THE OTHER PR CREATE A RELEASE AND CHANGE THE PACKAGE.JSON TO USE A VERSION!!!!

a757dc9 14 Jul 2021 avatar dgrammatiko redo
avatar dgrammatiko dgrammatiko - open - 14 Jul 2021
avatar dgrammatiko dgrammatiko - change - 14 Jul 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Jul 2021
Category JavaScript Repository NPM Change
avatar dgrammatiko dgrammatiko - change - 14 Jul 2021
Labels Added: NPM Resource Changed ?
avatar richard67
richard67 - comment - 14 Jul 2021

@dgrammatiko Npm still fails in drone.

Update: Would not be a problem as such because composer.lock will be updated anyway later when a new release has been made of custom_elements, but the failing npm causes other tests like the system tests not to run, so if it is possible to fix it, it would help with that.

avatar dgrammatiko
dgrammatiko - comment - 14 Jul 2021

Npm still fails in drone.

I saw that but I have no other tricks here (we need to install an npm package using git but for some reason, the drone script doesn't support that). If you know another way please edit the packge.json directly

PS it should be the same reason why the other PR for the SCSS compiler also failed (spawn... )

PS it turns out that drone is using the node alpine container which doesn't have git (https://github.com/nodejs/docker-node/blob/fd130acf063b312355a5d88d51716db3ff34ae49/14/alpine3.11/Dockerfile)... I can propose a docker container based on node 14 alpine with git, this will probably solve the problem here but also in #33170

avatar wilsonge
wilsonge - comment - 14 Jul 2021

Do we not need the close-text attribute on the hardcoded alert elements around core?

avatar dgrammatiko
dgrammatiko - comment - 14 Jul 2021

Are there any hard coded custom elements? If so yes, it's for a11y

@wilsonge there is only one instance with dismiss attribute and now it's also patched

avatar joomla-cms-bot joomla-cms-bot - change - 14 Jul 2021
Category JavaScript Repository NPM Change JavaScript Repository NPM Change Front End Plugins
3b306d9 21 Jul 2021 avatar dgrammatiko lock
avatar wilsonge wilsonge - test_item - 22 Jul 2021 - Tested successfully
avatar wilsonge
wilsonge - comment - 22 Jul 2021

I have tested this item successfully on 2c92281

Navigated around the logins, stats plugin alert and javascript generated alerts (e.g. when trying to save an article with no title). All seemed fine afterwards


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

avatar wilsonge wilsonge - close - 22 Jul 2021
avatar wilsonge wilsonge - merge - 22 Jul 2021
avatar wilsonge wilsonge - change - 22 Jul 2021
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-07-22 08:55:05
Closed_By wilsonge
avatar wilsonge
wilsonge - comment - 22 Jul 2021

Thanks!

avatar dgrammatiko
dgrammatiko - comment - 22 Jul 2021

Thanks!

Add a Comment

Login with GitHub to post a comment