Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array of References Pop-over: tiny max-width #4964

Closed
Ojay opened this issue Oct 2, 2023 · 5 comments
Closed

Array of References Pop-over: tiny max-width #4964

Ojay opened this issue Oct 2, 2023 · 5 comments

Comments

@Ojay
Copy link

Ojay commented Oct 2, 2023

Describe the bug

When adding a reference to an array of references the Popover has a max-width that is pretty tight and the absolute positioning is out. This results in you seeing a list of icons and the Popover displaying in an odd place.

When you click out and re-open the dialog it tends to display correctly, so this appears to only be occurring on the initial activation of the Popover.

To Reproduce

Steps to reproduce the behavior:

  1. Go to an array of references
  2. Click to add a reference
  3. Popover should display incorrectly

Expected behavior

An appropriately sized Popover

Which versions of Sanity are you using?

@sanity/dashboard 3.1.5 (up to date)
@sanity/eslint-config-studio 3.0.1 (up to date)
@sanity/ui 1.8.2 (up to date)
@sanity/vision 3.16.7 (up to date)
sanity 3.16.7 (up to dat

What operating system are you using?

Mac OS Big Sur 11.6.4

Which versions of Node.js / npm are you running?

9.5.0
v18.14.2

Additional context

Add any other context about the problem here.
Screenshot 2023-10-02 at 14 14 33
Screenshot 2023-10-02 at 14 14 57

@bybyers
Copy link

bybyers commented Oct 3, 2023

This started happening to me too. It looks like the div for data-ui="MenuButton__popover" got set to max-width of ~36 pixels.

image

@bjoerge
Copy link
Member

bjoerge commented Oct 4, 2023

Thanks for reporting! This was fixed by #4963 which was relased in v3.17.0 yesterday

@bjoerge bjoerge closed this as completed Oct 4, 2023
@bybyers
Copy link

bybyers commented Oct 5, 2023

Im still getting it with v3.17.0 with Nextjs with latest dependencies.

@bybyers
Copy link

bybyers commented Oct 5, 2023

A quick fix for anyone having this issue is to add this CSS class to their studio

[data-ui="MenuButton__popover"] {
  max-width: 681px !important;
}

Copy link
Contributor

github-actions bot commented Jan 4, 2024

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants