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
feat(Popover): add renderTimeout prop #3841
Merged
Merged
Conversation
This file contains 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
default timeout set to 0
Size Change: -43 B (0%) Total Size: 475 kB
ℹ️ View Unchanged
|
DSil
reviewed
May 4, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed about the non-breaking change. The timeout was undocumented and there are no API breaking changes, so no need to further document it 👍
I think this can just be slightly improved by:
- Adding the prop on the Popover Playground story
- Adding a test to the new prop (probably too tricky, so non-blocking for this)
DSil
approved these changes
May 5, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
It was asked here and here.
In my opinion, we should not have that delay we had before, although, it looks like setTimeout here was also used for removing the flickering on the initial render. It works fine with 0, because of the nature of the event loop. So I decided to keep the hook, but reduce the timeout to 0, just to look it more visually faster.
Added the prop to control that, if somebody still would need to have control, but I won't be useful much, just for case.
Also, do not think we should be 100% neat on that and mark it as breaking change. Can be as normal feature by mentioning that we just reduced the timeout.