NPM Resource Changed ? ? Pending

User tests: Successful: Unsuccessful:

avatar maliouris
maliouris
19 Mar 2019

Pull Request for Issue # .

Summary of Changes

Added the calling of connectedCallback in the constructor, because the buttonElement had undefined value. The connectedCallback was called only after the constructor and as the result buttons were enabled or disabled only after the first click.

Testing Instructions

Check toolbars in administration mode.

Expected result

Some buttons like batch or change status have to work only when a category (or article) is selected.

Actual result

It works fine after this addition

Documentation Changes Required

avatar maliouris maliouris - open - 19 Mar 2019
avatar maliouris maliouris - change - 19 Mar 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Mar 2019
Category JavaScript Repository NPM Change
avatar maliouris maliouris - change - 19 Mar 2019
Labels Added: NPM Resource Changed ?
avatar infograf768
infograf768 - comment - 19 Mar 2019

Drone failing. Please correct the unwanted tabs (useless new line)

/drone/src/github.com/joomla/joomla-cms/build/media_source/system/js/joomla-toolbar-button.w-c.es6.js
  28:1  error  Unexpected tab character     no-tabs
  28:1  error  Trailing spaces not allowed  no-trailing-spaces

✖ 2 problems (2 errors, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.
avatar infograf768
infograf768 - comment - 19 Mar 2019

BTW, this works fine!

avatar infograf768
infograf768 - comment - 19 Mar 2019

Sorry this is stil wrong. There should be a newline only without tab and spaces.
Screen Shot 2019-03-19 at 15 51 53

avatar infograf768
infograf768 - comment - 19 Mar 2019

I corrected it directly. :)

avatar infograf768
infograf768 - comment - 19 Mar 2019

Please do not modify anymore your maliouris:4.0-dev branch

avatar maliouris
maliouris - comment - 19 Mar 2019

Yeah sorry, I dont know why this happened

avatar chmst
chmst - comment - 19 Mar 2019

I have tested this item successfully on 2b0b305

Thank you!


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

avatar chmst chmst - test_item - 19 Mar 2019 - Tested successfully
avatar infograf768
infograf768 - comment - 19 Mar 2019

restarted drone

avatar infograf768
infograf768 - comment - 19 Mar 2019

I have tested this item successfully on 2b0b305


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

avatar infograf768 infograf768 - test_item - 19 Mar 2019 - Tested successfully
avatar infograf768 infograf768 - change - 19 Mar 2019
Status Pending Ready to Commit
Labels
avatar infograf768
infograf768 - comment - 19 Mar 2019

rtc


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

avatar infograf768 infograf768 - change - 20 Mar 2019
Labels Added: ?
avatar infograf768 infograf768 - close - 20 Mar 2019
avatar infograf768 infograf768 - merge - 20 Mar 2019
avatar infograf768 infograf768 - change - 20 Mar 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-03-20 07:23:31
Closed_By infograf768
avatar infograf768
infograf768 - comment - 20 Mar 2019

Thanks.

avatar Fedik
Fedik - comment - 20 Mar 2019

woh, that was fast and that is wrong 😄

Added the calling of connectedCallback in the constructor, because the buttonElement had undefined value.

the fix are wrong, connectedCallback are part of CE API called when element actually attached to DOM. it should not be called in constructor, it for sure introduce some more fancy bugs.

A proper fix is to find out why buttonElement not defined,
that something went wrong with #23767

avatar maliouris
maliouris - comment - 21 Mar 2019

I saw the changes that were made in the other pull request and as far as I can see this.buttonElement = this.querySelector('button, a'); was called in the constructor and after the change it was called in connectedCallback() with no usage at all. I moved it back to the constructor and it works properly now. Should I make a new pull request ?

avatar Fedik
Fedik - comment - 21 Mar 2019

@maliouris yes please

avatar infograf768
infograf768 - comment - 21 Mar 2019

:)

avatar Fedik
Fedik - comment - 21 Mar 2019

@maliouris another possible way to fix is to move this part

    // If list selection is required, set button to disabled by default
    if (this.listSelection) {
      this.setDisabled(true);
    }

to connectedCallback, somwhere after this.buttonElement = ...

avatar maliouris
maliouris - comment - 21 Mar 2019

Which one do you want think it's better?

avatar Fedik
Fedik - comment - 21 Mar 2019

second one, but need to test whether it will work

avatar maliouris
maliouris - comment - 21 Mar 2019

It worked for me

Add a Comment

Login with GitHub to post a comment