statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
4.12k stars 540 forks source link

Set picker positioning switches between groups #8173

Open robdekort opened 1 year ago

robdekort commented 1 year ago

Bug description

When you have replicator/bard set picker with a few groups the picker can switch above/below the plus button. gif

Perhaps the picker should always open where it opened on first click.

How to reproduce

Add a set picker with a bunch of groups and items. Click around.

Logs

No response

Environment

Environment
Laravel Version: 9.52.7
PHP Version: 8.2.3
Composer Version: 2.2.7
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Statamic
Addons: 5
Antlers: runtime
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.1.3 PRO

Statamic Addons
rias/statamic-color-swatches: 2.2.0
studio1902/statamic-peak-browser-appearance: 2.0
studio1902/statamic-peak-commands: 2.1
studio1902/statamic-peak-seo: 2.0
studio1902/statamic-peak-tools: 3.2

Installation

Starter Kit using via CLI

Antlers Parser

runtime (new)

Additional details

No response

jasonvarga commented 1 year ago

The picker is positioned below, but if there's not enough space below, it switches to above.

When you change groups to one with more items, the height gets bigger, doesn't fit below, so it moves above. And then the opposite when you go to a group with less options.

If you had something underneath the replicator so there's more space underneath, you wouldn't see this issue.

Not sure how to solve this. Maybe we just make it a fixed height and be scrollable.

robdekort commented 1 year ago

Ah yeah, tricky! That might be a nice solution though.

jackmcdade commented 1 year ago

Can we turn off the above/below logic and just force it below? If so, does it get clipped by the browser or will it just expand the viewport to show it? If so, you'd need to scroll down sure but then it would stay in the same place and be usuable.

jasonvarga commented 1 year ago

It gets clipped because various things could add overflow: hidden to the body.