? Pending

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
28 Dec 2018

Pull Request for Issue # .

Summary of Changes

Fix various problems on:

  • plg_joomlaupdate
  • plg_extensionupdate
  • plg_overridecheck

Testing Instructions

Apply patch and check if the three button work correctly
screenshot 2018-12-28 at 12 11 18

Expected result

Actual result

Problems:

  • Usage of for loops
  • No check before calling a fn on a document element (for whatever reason that element might not exist)
  • ESLint

Documentation Changes Required

No

avatar dgrammatiko dgrammatiko - open - 28 Dec 2018
avatar dgrammatiko dgrammatiko - change - 28 Dec 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 28 Dec 2018
Category JavaScript Repository
avatar dgrammatiko dgrammatiko - change - 28 Dec 2018
Labels Added: ?
avatar Fedik
Fedik - comment - 28 Dec 2018

Usage of for loops

it not a problem, but I don't mind ?

avatar dgrammatiko
dgrammatiko - comment - 28 Dec 2018
avatar Fedik
Fedik - comment - 28 Dec 2018

complicated != problem ?

avatar dgrammatiko
dgrammatiko - comment - 28 Dec 2018

True but also for() is slower in new browsers and not really compatible with Joomla's CS: https://github.com/airbnb/javascript

avatar Fedik
Fedik - comment - 28 Dec 2018

but also for() is slower in new browsers

nope, it is faster than any loop ?
http://jsben.ch/gROW8
https://jsperf.com/for-vs-foreach/75

and not really compatible with Joomla's CS

okay got it

avatar dgrammatiko
dgrammatiko - comment - 28 Dec 2018

nope, it is faster than any loop

New browsers also means ES6+ code, not vars...

avatar Fedik
Fedik - comment - 28 Dec 2018

New browsers also means ES6+ code, not vars...

nope, it still faster https://jsperf.com/for-vs-foreach-vs-for-of/575 ?

avatar wilsonge wilsonge - change - 30 Dec 2018
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-12-30 13:13:41
Closed_By wilsonge
avatar wilsonge wilsonge - close - 30 Dec 2018
avatar wilsonge wilsonge - merge - 30 Dec 2018
avatar wilsonge
wilsonge - comment - 30 Dec 2018

I think the readability trumps the small performance enhancement here. Although if we decide it practically doesn't work on scaling sites we can always come back to this :) This fixes various pieces of broken html so doing this for now

avatar infograf768
infograf768 - comment - 3 Jan 2019

See #23434 where js is corrected.

Add a Comment

Login with GitHub to post a comment