Conversation
🦋 Changeset detectedLatest commit: b2fc2c9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Preview deployments for this pull request: storybook - |
| plural = '%d forslag', | ||
| className, | ||
| id, | ||
| autoPlacement = true, |
There was a problem hiding this comment.
oh, should this rather be data-placement="auto" so it alignes with the naming convention used in dialog and is possible to recreate in pure HTML-components?
There was a problem hiding this comment.
yes it can, I just followed what was done on Popover
There was a problem hiding this comment.
ah, I see! hm, in Mattilsynet, autoPlacement is always true - no possibility to turn it off - without any complains so far! But we have added the overscroll feature which kind of deals with keeping the popover consistently placed within viewport: https://design.mattilsynet.no/?path=/docs/designsystem-popover--docs#scroll
There was a problem hiding this comment.
I've given this some quick though, and I think it's cleaner to introduce this prop so it is similar to other floating components first. Then we can later on deprecate all of these, and change them to data-placement or data-autoplacement.
This makes sure we have a cohesive API across all component using floating-ui
|
Its kind of weird how the snapshot is broken but not in regulaer storybook |
Yeah I'll look into it. Works fine in storybook outside of chromatic 🦐 |
I checked the story (controlled-independent-label-value) and It is expected behaviour with the new code. The dropdown tries to stay inside viewport when the input is overflowing to the right in this particular story |
hm, maybe we should make the story width then, before merging |
Co-authored-by: Oddbjørn Øvernes <oddbjorn.overnes@gmail.com>
Summary
resolves #4356
see https://floating-ui.com/docs/flip
Checks
pnpm changesetif relevant)