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

fixed long list items in dropdown were hidden, rename <Menu /> to <DropdownMenu /> #3206

Merged
merged 4 commits into from
Jun 2, 2023

Conversation

dimaMachina
Copy link
Collaborator

@dimaMachina dimaMachina commented Jun 1, 2023

fixes #3187 cc @jetsstarplus

Screen.Recording.2023-06-02.at.01.30.05.mov

@changeset-bot
Copy link

changeset-bot bot commented Jun 1, 2023

🦋 Changeset detected

Latest commit: 1216ef1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@graphiql/react Minor
@graphiql/plugin-explorer Patch
graphiql Patch

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

);
}

export const Menu = createComponentGroup(DropdownMenu.Root, {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thomasheyenbrock I renamed Menu to DropdownMenu because

  1. for me menu, listbox are confused names
  2. we follow radix convention
  3. even this file is name dropdown 😅
  4. major release is coming so we can do some adjustments :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good 👍

Since we're still on 0.x, I'd even be fine with doing this in a minor. The expectations around @graphiql/react always were that it's not yet stable.

[data-radix-menu-content] {
.graphiql-dropdown-content {
Copy link
Collaborator Author

@dimaMachina dimaMachina Jun 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to avoid conflicts with users’ maybe radix components

@@ -8,9 +8,11 @@
padding: var(--px-4);
font-family: var(--font-family);
color: hsl(var(--color-neutral));
max-height: calc(var(--radix-dropdown-menu-content-available-height) - 10px);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using all the available height seems too much for me, having the dropdown fill the whole height of the page looks weird. I'd propose to go with a smaller value here like 400px.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hardcoding 400px would provoke issues on small vh, we should use css' min function with it

Screen.Recording.2023-06-02.at.11.59.41.mov

@dimaMachina dimaMachina merged commit a2bb56b into radix-1 Jun 2, 2023
@dimaMachina dimaMachina deleted the radix-dropdown branch June 2, 2023 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants