Add the ability to delay tooltip closing so they can be interacted with.#4364
Merged
MLoughry merged 5 commits intomicrosoft:masterfrom Apr 2, 2018
Merged
Conversation
Contributor
Author
|
Whoops, look like this is the wrong version, hold on on this for a bit |
Contributor
Author
|
Okay, fixed the issues |
micahgodbolt
approved these changes
Mar 26, 2018
cschleiden
suggested changes
Mar 26, 2018
|
|
||
| this._closingTimer = window.setTimeout(() => { | ||
| this._toggleTooltip(false); | ||
| }, this.props.closeDelay); |
Contributor
There was a problem hiding this comment.
you should use this._async here so that it's correctly cleared etc.
Contributor
Author
|
I've fixed the requested change, is this PR good to go? |
cschleiden
suggested changes
Mar 29, 2018
|
|
||
| this._closingTimer = this._async.setTimeout(() => { | ||
| this._toggleTooltip(false); | ||
| }, this.props.closeDelay); |
Contributor
There was a problem hiding this comment.
duration is not optional and I don't see a default value for the prop, are we setting one?
Contributor
Author
There was a problem hiding this comment.
The default is not to delay at all, and thus not have a duration. Use of the delay is therefore guarded.
cschleiden
reviewed
Mar 29, 2018
| } | ||
|
|
||
| private _clearDismissTimer = (): void => { | ||
| window.clearTimeout(this._closingTimer); |
Contributor
There was a problem hiding this comment.
(thought I had commented on this before, somehow got lost..)
you should use the _async utility.
cschleiden
approved these changes
Mar 30, 2018
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request checklist
$ npm run changeDescription of changes
Adds
closeDelayto tooltip hosts, enabling interaction with the given tooltip via a delay on closing.