Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENYO-5271: Add debugging utilities to core/handle #1652

Merged
merged 9 commits into from
May 18, 2018
Merged

Conversation

ryanjduffy
Copy link
Contributor

Issue Resolved / Feature Added

Debugging core/handle usage can be frustrating when everything is named anonymous.

Resolution

  • Added some names to internal functions that show up in the call stack
  • Added named() to handlers to provide a means to name them when dev tools can't figure it out
  • Added bindAs() to handlers to combine binding and naming when using core/handle with ES6 classes
  • Adopting naming in ui/Touchable which is used everyone and could benefit from the naming the most
Was Now
image image

Additional Considerations

See ariya/phantomjs#14310 for why the try/catch block exists :( Its __DEV__ only so a minor inconvenience.

Enact-DCO-1.0-Signed-off-by: Ryan Duffy ([email protected])

Ryan Duffy and others added 9 commits May 11, 2018 10:50
Enact-DCO-1.0-Signed-off-by: Ryan Duffy ([email protected])
Enact-DCO-1.0-Signed-off-by: Ryan Duffy ([email protected])
Enact-DCO-1.0-Signed-off-by: Ryan Duffy ([email protected])
Enact-DCO-1.0-Signed-off-by: Ryan Duffy ([email protected])
Enact-DCO-1.0-Signed-off-by: Ryan Duffy ([email protected])
Enact-DCO-1.0-Signed-off-by: Ryan Duffy ([email protected])
* // development tool call stacks
* //
* // this.handleKeyDown = logEnter.bind(this)
* logEnter.bindAs(this, 'handleKeyDown');
Copy link
Contributor

@webOS101 webOS101 May 18, 2018

Choose a reason for hiding this comment

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

Where does logEnter come from? Aha, above. It was redundant here, I guess?

Copy link
Contributor

@webOS101 webOS101 left a comment

Choose a reason for hiding this comment

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

LGTM!

@Djspaceg Djspaceg merged commit 9e6bfd1 into develop May 18, 2018
@Djspaceg Djspaceg deleted the feature/ENYO-5271 branch May 18, 2018 23:13
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.

3 participants