Skip to content

Conversation

@JohnMcGuinness
Copy link
Contributor

Updated multiSelectPair to use custom shed events

JohnMcGuinness and others added 27 commits November 14, 2019 11:45
@JohnMcGuinness
Copy link
Contributor Author

@ricksbrown This ready to review.

}
}

if (has("ie") === 8) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the right spirit however I suggest we delete the entire JS file (and remove any calls to it elsewhere).

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I concur

shed.subscribe(shed.actions.COLLAPSE, handleCollapseOrHide);
shed.subscribe(shed.actions.SHOW, instance.onshow);
shed.subscribe(shed.actions.HIDE, handleCollapseOrHide);
event.add(document.body, shed.events.EXPAND, instance.onexpandlistener);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We aim for camelCase close to 100%. Not sure why it wasn't adhered to before and I can see you have simply carried that over. Unless I am missing something I suggest we make it camelCase now.

*
* @param {Event} $event The shed event that fired.
*/
this.onshowlistener = function($event) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this public?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also camelCase the function name

*
* @param {Event} $event The shed event that fired.
*/
this.onexpandlistener = function($event) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this one, does it need to be public?

*/
function shedAjaxSubscriber(element, action) {
function shedAjaxSubscriber($event) {
var element = $event.target,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure this breaks shedAjaxSubscriber when it is called via processResponse.subscribe - looks like the introduction of a bug to me.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is definitely a problem - but why didn't our testing pick it up (well the answer to that is obvious and so I need to go write all those tests I have been promising since we moved off Doh) ?

observer.subscribe(function() {
order.push("high");
return Promise.reject("Observer testing reject in high subscriber");
return Promise.reject("Intentional error: Observer testing reject in high subscriber");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is good 👍

Copy link
Member

@ricksbrown ricksbrown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure there's a regression in there...

FYI I suggest when we merge this we squash rather than regular merge.

@ghost
Copy link

ghost commented Jul 28, 2020

@JohnMcGuinness you have put a lot of effort into this and it is mostly good. Can you fix the few issues identified by @ricksbrown and resubmit the PR please.

@ghost ghost assigned JohnMcGuinness Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants