This repository has been archived by the owner on Mar 4, 2020. It is now read-only.
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.
TODO
This PR introduces uncontrolled mode to the
Popup
, so now it is possible to consume it in the following way for the simplest scenarios:FAQ
click
trigger's event only - is it usual the popup to be open always on click?No, it is not - and to parametrise this behavioral aspect, we should consider to introduce additional prop (like
triggerAction
) to the API ofPopup
:Also, this will introduce another benefit to us. Now related reasonable question could be asked - is it correct that we have a
PopupBehavior
as a default one (note thatPopupBehavior
's implementation now is tightly coupled with the click trigger concept - and, thus, should probably be renamed to something that will contain 'click' in its name!). Surely, no. But the reason it is introduce as a default one for now is that it covers the only uncontrolled case we have now. At the same time, withtriggerAction
prop introduced it would be possible to set accessibility behavior aspects for thePopup
.See this as a step that should be preempted by the set of careful investigations and experiments - and, thus, a separate dedicated PR should be introduced for that.