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

CellHeader dropdown floats above the sidebar #594

Closed
asharonbaltazar opened this issue Aug 22, 2021 · 8 comments
Closed

CellHeader dropdown floats above the sidebar #594

asharonbaltazar opened this issue Aug 22, 2021 · 8 comments
Labels
good first issue Everything in "Help wanted", PLUS being relatively easy and straightforward to implement. help wanted Community contributors can implement this ready Ready for implementation work: frontend Related to frontend code in the mathesar_ui directory
Milestone

Comments

@asharonbaltazar
Copy link
Contributor

Description

The <CellHeader /> dropdown appears above the sidebar

Expected behavior

The dropdown should slide underneath the menu.

To Reproduce

Open a dropdown and scroll left.

Environment

  • OS: Windows 10 21H1
  • Browser: Edge (Chromium)
  • Browser Version: v92

Additional context

image

@asharonbaltazar
Copy link
Contributor Author

Assuming issues can be fixed in semi-related features, I can fix this in my PR (#584)

@pavish pavish added good first issue Everything in "Help wanted", PLUS being relatively easy and straightforward to implement. ready Ready for implementation work: frontend Related to frontend code in the mathesar_ui directory labels Aug 23, 2021
@pavish
Copy link
Member

pavish commented Aug 23, 2021

@asharonbaltazar This issue can be taken up and fixed separately. Thanks for reporting this!

@asharonbaltazar
Copy link
Contributor Author

Can I take it then? Please assign it to me.

@kgodey
Copy link
Contributor

kgodey commented Aug 23, 2021

@asharonbaltazar Sure, assigned to you, thanks!

@asharonbaltazar
Copy link
Contributor Author

Would you want to dropdown to slide only underneath the menu? Or the cell indexes as well?

image

@pavish
Copy link
Member

pavish commented Aug 24, 2021

@asharonbaltazar I presume for positioning the dropdown, you are passing down the target to the portal action.

In this particular case, it's okay for the dropdown to not slide under the cell indexes.

@pavish
Copy link
Member

pavish commented Aug 26, 2021

Suggestions to fix this issue

This issue is a side-effect of the dropdown attaching by default to the body. This ensures it always appears over other elements.

There are two ways, this can be resolved:

  1. For this particular case, the dropdown can be attached to the table wrapper or the header element. We can specify the parent (header) as reference to the portal action. This has to be passed down to the dropdown and then to the portal action.
  2. The simpler approach, which I recommend: Hide the dropdown when column header is not visible. It can be done using css. Refer: https://popper.js.org/docs/v2/modifiers/hide/

Either of these approaches should only be applied on the column dropdowns, and not commonly to the dropdown component.

@kgodey kgodey added the help wanted Community contributors can implement this label Sep 13, 2021
@kgodey kgodey modified the milestones: [06.2] 2022-04 improvements, [08.1] 2022-05 improvements May 2, 2022
@kgodey kgodey modified the milestones: [08.1] 2022-05 improvements, Low Priority Jun 1, 2022
@kgodey kgodey removed this from the 2023 or later milestone Jul 19, 2022
@kgodey kgodey added this to the Cycle 4: Live Demo milestone Jul 19, 2022
@seancolsen
Copy link
Contributor

I'm closing because this will be irrelevant when we implement the Table Inspector.

Repository owner moved this from Ready to Done in [NO LONGER USED] Mathesar work tracker Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Everything in "Help wanted", PLUS being relatively easy and straightforward to implement. help wanted Community contributors can implement this ready Ready for implementation work: frontend Related to frontend code in the mathesar_ui directory
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants