CrowdStrike / ember-velcro

Ember Velcro sticks one element to another with Floating UI.
MIT License
13 stars 8 forks source link

Propose autoPlacement behavior. #119

Closed NullVoxPopuli closed 6 months ago

NullVoxPopuli commented 1 year ago

Resolves: https://github.com/CrowdStrike/ember-velcro/issues/96

I think autoPlacement is better than flip, but folks should still have the option to choose, probably.

changeset-bot[bot] commented 1 year ago

⚠️ No Changeset found

Latest commit: 42069570b1236ed13759e8a5265f3d89954b5c29

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

ynotdraw commented 1 year ago

Looks like some type errors, but otherwise looks good to me!

. prepare: [!] (plugin Typescript) TS2345: Argument of type 'true | [options?: Partial<Options & Omit<Options, "boundary"> & { boundary: Boundary; }> | undefined]' is not assignable to parameter of type 'Partial<Options & Omit<Options, "boundary"> & { boundary: Boundary; }> | undefined'.
. prepare:   Type 'true' has no properties in common with type 'Partial<Options & Omit<Options, "boundary"> & { boundary: Boundary; }>'.
. prepare: src/modifiers/velcro.ts (82:49)
. prepare: 
. prepare: 82           (autoPlacementOptions ? autoPlacement(autoPlacementOptions) : flip(flipOptions)),
. prepare:                                                    ~~~~~~~~~~~~~~~~~~~~
. prepare: 
. prepare: undefined

Let me know and I can add a changeset on top of this. A minor I assume, eh?

NullVoxPopuli commented 1 year ago

Ye

I hadn't tried for Polish because i didn't know yet if ya'll wanted to feature yet 😅