primer / react

An implementation of GitHub's Primer Design System using React
https://primer.style/guides/react
MIT License
3.14k stars 536 forks source link

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

Open anleac opened 11 months ago

anleac commented 11 months ago

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

lesliecdubs commented 11 months ago

👋 @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?

keithamus commented 11 months ago

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

japf commented 11 months ago

👋 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).

lesliecdubs commented 11 months ago

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

inkblotty commented 10 months ago

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

keithamus commented 9 months ago

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.

sunnyi101 commented 4 months ago

@keithamus has this been resolved?

keithamus commented 4 months ago

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

sunnyi101 commented 3 months ago

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

keithamus commented 3 months ago

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.

alondahari commented 2 weeks ago

@keithamus any updates on this item? You mentioned you were going to maybe pick this up in September? thanks!

keithamus commented 2 weeks ago

Sorry to be a bad news bear but this didn't make our priority list for Sep-Dec quarter.