instructure / instructure/instructure-ui

Popover doesn't respect placement prop

Open
#1,411 3 comments 0 reactions 1 assignee View on GitHub

@HerrTopi is already working on this.

Since Feb 13, 2024.

Dominant language
TypeScript
Stars
480
Forks
108
Avg merge
6d 1h
Merged PRs (30d)
16

Description

Background Information

Package Version(s):
ui-popover v8.51.0

Browser:
Chrome (All Versions)
Safari (All Versions)

OS:
MacOS 14.1.2

Device:
Macbook Pro

Component:
Popover

Describe the Bug

Popover doesn't respect placement property. See Steps To Reproduce.

Steps To Reproduce
1. Go to my minimal reproducible example: https://codesandbox.io/p/sandbox/busy-murdock-q3rwyy?file=%2Findex.js
2. Click on 'Sign In' to open the Popover
3. Reduce window size, and around the width of the Popover, the placement changes from 'bottom start' to 'bottom center'
4. On such small Popover this doesn't seem like a big issue, but the same exact behaviour is present with bigger Popover content; around the width of the content, the placement changes.
Expected Behavior

Placement prop is respected

Screenshots

https://github.com/instructure/instructure-ui/assets/125990622/eca4518f-3033-4355-a0e2-9887d8ca9300

Additional Information

Current Workaround(s):
Doesn't seem like it

Products Affected:

Are you willing to submit a PR to fix?

  • Yes, I'm willing to submit a PR

Requested Priority:
Normal

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.