Conversation
Codecov Report
@@ Coverage Diff @@
## master #457 +/- ##
==========================================
- Coverage 89.2% 88.47% -0.73%
==========================================
Files 41 41
Lines 1417 1432 +15
Branches 177 181 +4
==========================================
+ Hits 1264 1267 +3
- Misses 149 161 +12
Partials 4 4
Continue to review full report at Codecov.
|
|
can you add unit test that cover the changes? Especially if we want to do internal refactoring. |
|
yes, but could we, please, start with reviewing the functionality itself - whether it satisfies the criterias. When we agree on that, I will add the tests. Also, given that this is a highly anticipated feature, I would rather split the PRs to not introduce the unnecessary delay (note that there were no tests for that before). |
docs/src/examples/components/Popup/Types/PopupNoFocusTrapExample.shorthand.tsx
Outdated
Show resolved
Hide resolved
|
|
||
| <Popup | ||
| trigger={<Button icon="expand" content="Lets trap your focus even more ツ" />} | ||
| focusTrap={{ |
There was a problem hiding this comment.
we kind of duplicating logic which is done in the Portal, for the exposing focusTrap prop.
So the original idea is
- Popup is not focus trapped by default
- FocusTrapZone props are coming from a behavior same way as for FocusZone.
Of course it's part of this PR, but what we need is to read FocusTrapZone props fromaccessibility.focusTrapZone = {}
After your PR merged, I will create PR that ads FocusTrapZone props to PopupBehavior.
There was a problem hiding this comment.
have discussion with @sophieH29, agreed on the following plan:
- prepare branch where focus trap properties will be read from behavior by
Popup - merge necessary changes to introduce this behavior into this PR
- remove
focusTrapprop from the API ofPopup
* Add focus trap props to Popup behavior * Small improvement * Make default behavior without focus trap. Improve examples. * Update comment * Improvements after CR comments * Update popupFocusTrapBehavior.ts
This PR introduces focus trap functionality to
Popup- this will allow to focus popup's content right after popup is opened.TODO
API
FAQ
Should be clear about that - the final goal of all the refactoring process around
Popupcomponent is to end up at the point where there won't be any code duplication - and this implies that finallyPopupwill reusePortal's functionality. At the same it is intentionally step-by-step process taken into consideration, for the sake of ensuring that only the necessary parts are introduced to both components, as well as there is clear separation of concerns between them.This PR will solidify final bits of the functionality expected from the
Popupon the client side - after that the next plans are to do inner refactoring by reusingPortalcomponent as part ofPopup's implementation - with the interface and behavior exposed to the client forPopupwon't be affected anyhow.