react icon indicating copy to clipboard operation
react copied to clipboard

SelectPanel inside Dialog v2 footer incorrectly chooses its anchor side on opening (memex)

Open anleac opened this issue 2 years ago • 21 comments

Description

Hi!

While using a SelectPanel inside of the Dialog V2 footer (via the renderFooter prop); it appears that the SelectPanel does not correctly pick the direction to open in, which leads to the panel opening off the page downwards.

Such as: Screenshot a select panel opening downwards and overflowing off the screen

However, I am unable to reproduce this when rendering the same SelectPanel inside of the dialog's body, which indicates most likely an issue with the dialog footer wrapping container not properly communicating it's position on the screen (probably related to the anchor positioning logic: https://github.com/primer/behaviors/blob/main/docs/anchored-position.md)

Steps to reproduce

  1. Create a Dialog V2
  2. Ensure that the dialog has enough contents such that it fills most of the screen
  3. Render a Select Panel in the dialogs footer
  4. Open the panel, and observe it will always go off the bottom of the screen (opening downwards) regardless if it overflows.

Version

v36.0.0

Browser

Firefox

anleac avatar Nov 08 '23 14:11 anleac

👋 @keithamus curious if you think this might be something we could easily solve as part of the active work on Dialog with <dialog> https://github.com/github/primer/issues/2531?

lesliecdubs avatar Nov 13 '23 16:11 lesliecdubs

Yeah this should be resolved implicitly. I’ll double check as we get a shippable version.

keithamus avatar Nov 13 '23 18:11 keithamus

👋 from the Issues team, @lesliecdubs would you happen to have an estimate for when this would be fixed? I see an epic being linked here but the last update was from 3 weeks ago (and it has no target date).

japf avatar Nov 20 '23 16:11 japf

👋 Hi @japf, we're currently on target for 8 December for completion of the Dialog refactor, including fix of this bug.

lesliecdubs avatar Nov 20 '23 22:11 lesliecdubs

@lesliecdubs - 👋 Based on @keithamus 's last update, are we on track for the Dialog updates here? Can we test out the updates in Issues?

inkblotty avatar Jan 04 '24 22:01 inkblotty

We failed to reach the target date due to the holiday period and so work has rolled over into this Q. As we start integrating I can take a look at this particular bug to ensure it has been resolved.

keithamus avatar Jan 19 '24 09:01 keithamus

@keithamus has this been resolved?

sunnyi101 avatar Jun 27 '24 13:06 sunnyi101

Other work was prioritised over this so it has not been resolved.

keithamus avatar Jun 27 '24 14:06 keithamus

@keithamus do we have a timeline for when this could be resolved?

sunnyi101 avatar Jul 08 '24 05:07 sunnyi101

It's not in our OKRs for this quarter so it's unlikely for us to get around to this in the next few months. Perhaps we will pick this work up in September.

keithamus avatar Jul 08 '24 08:07 keithamus