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

Bug: 'Share Users' Dialog Layout Shift #29

Closed
JYLN opened this issue Nov 16, 2023 · 4 comments · Fixed by #33
Closed

Bug: 'Share Users' Dialog Layout Shift #29

JYLN opened this issue Nov 16, 2023 · 4 comments · Fixed by #33
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@JYLN
Copy link
Owner

JYLN commented Nov 16, 2023

Summary of Potential Bug

When opening the share users dialog, the dialog opens on the lower half of the screen, then zips up toward the center. I will need to debug this more to see where this is happening at. I think it could be a transition timing or weird portal issue with one of the libraries.

@JYLN JYLN added bug Something isn't working help wanted Extra attention is needed labels Nov 16, 2023
@JYLN JYLN self-assigned this Nov 16, 2023
@JYLN
Copy link
Owner Author

JYLN commented Nov 16, 2023

When attempting #16, I was having weird issues with the tooltip. As described by the primary maintainer of shadcn-svelte,

basically the floating/popper components portal to the body by default to get around Z-index hell, etc.

-huntabyte

I think this is the same issue here, but setting the portal prop to null within the UserSelect custom component does not seem to be helping the strange layout shift when the dialog first opens. Attempting to set the openFocus prop to [data-bits-dialog-close] didn't seem to help me either.

I'm thinking I should create a small repro of this issue to work on it further, I'm feel somewhat certain the portal is related to this in some fashion as the Popover and Dialog components used within this implementation should be portalled to the body given their similar implementation style.

@JYLN
Copy link
Owner Author

JYLN commented Nov 17, 2023

Minimal repro of issue

Within this minimal repro, I can see that the layout shift isn't occurring. So while above I initially thought this could be a portal issue, I don't believe that is the case anymore.

I'm thinking this likely has something to do with my styling or the way the data is being populated in the current implementation. There's also a preventScroll prop that can be used on the Root of the dialog that may help with this. Will have to test within the normal dev environment.

@JYLN
Copy link
Owner Author

JYLN commented Nov 18, 2023

I've reached out to help within Huntabyte's discord for this because the idea with preventScroll didn't help nor did messing with individual transitions

@JYLN
Copy link
Owner Author

JYLN commented Nov 19, 2023

After some reflection, it may be better to utilize the Sheet components for the sharing time entries and viewing notes. I'm gonna play with this idea a little bit in a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant