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

implement auto placement for popovers #410

Closed
droshev opened this issue Jan 13, 2019 · 7 comments · Fixed by #633
Closed

implement auto placement for popovers #410

droshev opened this issue Jan 13, 2019 · 7 comments · Fixed by #633
Assignees
Labels
blocked blocked ticket enhancement New feature or request help wanted Extra attention is needed
Projects

Comments

@droshev
Copy link
Contributor

droshev commented Jan 13, 2019

Is this a bug, enhancement, or feature request?

enhancement

Briefly describe your proposal.

At the moment fundamental-ngx doesn't have an implementation for auto-placement of popovers.

Should be a change that also supports inline-help, and other components.

Which versions of Angular and Fundamental NGX are affected? (If this is a feature request, use current version.)

angular 7.1
fundamental-ngx 0.0.26 beta

@droshev droshev added enhancement New feature or request help wanted Extra attention is needed labels Jan 13, 2019
@droshev
Copy link
Contributor Author

droshev commented Jan 18, 2019

screen shot 2019-01-18 at 2 06 28 pm

@droshev droshev added the MVP1 label Jan 21, 2019
@mikerodonnell89
Copy link
Member

I'm confused by the screenshot, are you saying the popover should detect if the popover body will bleed off the viewport and position itself accordingly?

@droshev
Copy link
Contributor Author

droshev commented Jan 24, 2019

What I meant is that you may end up having a button(which shows a popover on click/hover) that is position at the bottom of the page and if you click on it, the popover won't be visible and the user might be confused. Offering an auto placement could be the solution.

@bcullman
Copy link
Contributor

bcullman commented Jan 30, 2019

there is a library called popperjs / popperjs github that provides this functionality. SAP Concur has had great success with it in our pre-funrdamentals component library. there are wrappers for react (whch we used) ngx and vue

https://www.npmjs.com/package/ngx-popper

please see
SAP/fundamental-react#313
SAP/fundamental-vue#134

@desaroxx
Copy link

Same problem here.

Popover is going out of bounds on the bottom of the window.

If I could control the popover's placement (top, right, bottom or left), then that would already solve my case.

@bcullman
Copy link
Contributor

@desaroxx - popper does placement. but it also does flipping when the preferred placement is unavailable (page edge issues)

@mikerodonnell89
Copy link
Member

blocked by SAP/fundamental#1286

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked blocked ticket enhancement New feature or request help wanted Extra attention is needed
Projects
No open projects
board
  
Awaiting triage
Development

Successfully merging a pull request may close this issue.

5 participants