[Popper] Allow more control over avoidCollisions #1683
Closed
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.
Ref #1568.
Description
Expands the possible values for
avoidCollisions
to include the following:auto
— current behavior (as of 1.0.0) — Shift along the main axis and flip over the cross axisflip
— Flip along both axes, but don't shiftshift
— Shift along the main axis only, but don't flipoff
— disable collision avoidanceBoolean values are still accepted for compatibility:
true
→auto
false
→off
I looked for Stories that would be appropriate to extend, but couldn't find any that demonstrated the shift+flip/auto behavior. Happy to add one if a maintainer pointed me in the right direction.
Open questions
shift
mode, should we setcrossAxis: true
? Or shouldflip
andshift
act as strict behavioral subsets ofauto
, per the current implementation?