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

Unified Doc Viewer push flyout touchups #20

Conversation

davismcphee
Copy link

Summary

This PR includes a few minor touchups for the Unified Doc Viewer push flyout.

I noticed that when the window is slightly smaller, but not small enough to switch to the overlay flyout, expanding the push flyout can cause the Discover layout to become very squished and start breaking:

squished.mp4

I also found that when the push flyout is expanded and I resized the screen, it would overflow the window when I resized it small enough that the flyout switched to an overlay. TBH this feels like an EUI bug to me, but I think we can work around it for now and file an issue to see if EUI is willing to change the behaviour:

overflow.mp4

IMO the right longer term solution to the layout squishing issue is probably to do similar to what we've done with the flyout table and actions, and make the layout responsive based on container size instead of window size, but this would involve a number of changes across Discover and Unified Search, so probably best to save that for a followup. In the meantime, when the screen is large enough for the push flyout, I added a max width to the flyout that leaves enough room that the Discover layout doesn't break too much. Similarly, we can address the flyout overflow issue by applying a max width to the flyout when in overlay mode so it can take up most but not all of the available screen space (same approach EUI uses for the flyout on mobile):

squished_overflow_fixed.mp4

The other thing I noticed was that when in mobile mode, the actions popover isn't aligned with the actual button because of the flex group/item around it. The close button also becomes centered within the flyout footer due to the flex group/item around it:
mobile

I addressed the popover issue by just switching the flex group to a div, which fixes the alignment and preserves the responsiveness. For the close button, it looks like we can just drop the flex group entirely and it will remain aligned to the left:
mobile_fixed

@lukasolson lukasolson merged commit da63a18 into lukasolson:unified-doc-viewer/push-flyout Apr 10, 2024
1 of 2 checks passed
@davismcphee davismcphee deleted the unified-doc-viewer-push-flyout-touchups branch April 10, 2024 23: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.

2 participants