Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

feat(tooltip): support more positioning options (WIP) #1676

Closed
wants to merge 1 commit into from

Conversation

pkozlowski-opensource
Copy link
Member

This changes moves logic of relative positioning of 2 elements out of the tooltip. There are several goals of this refactoring:

  • easily test positioning computations
  • re-use positioning logic in different directives (tooltips but also date / time picker and typeahead)
  • add more positioning options to the mentioned directives
  • build on top of this common service to add even more positioning options (for example, those aware of the viewport size)

@bekos would be awesome if you could have a look at this one and let me know if the API would work for you in date / time pickers.

@pkozlowski-opensource
Copy link
Member Author

Still need to update docs etc. but yeh, wanted to have early feedback....

@bekos
Copy link
Contributor

bekos commented Jan 25, 2014

@pkozlowski-opensource Nice addition! I will check asap.

@bekos
Copy link
Contributor

bekos commented Jan 25, 2014

@pkozlowski-opensource It's works nice and it looks really promising, but atm for datepicker/typeahead etc is missing the ability to specify the corner for the targetEl also. This way we will be able to show the datepicker above the input element or float on the right of the input. I hope I make sense, otherwise I will elaborate more on this.

@pkozlowski-opensource
Copy link
Member Author

@bekos thnx for looking into this one. I see what you mean since typeahead is using the same positioning API as datepicker window.

I'm going to land this one as I think it is both simplifying tooltips / popovers while making them more flexible. Then I'm going to work on another PR to have an API for the typeahead / popover etc.

@chrisirhc
Copy link
Contributor

@pkozlowski-opensource check out http://github.hubspot.com/tether/ for some inspiration.

@csabattilas
Copy link

Hello, I'd like to collaborate also to tooltip enhancement, how can I do it? I'd like to have dynamic styling for background and text, and advanced positioning options based on the overflown text.

Thank you

@chrisirhc chrisirhc deleted the ttip_refactor branch March 28, 2015 06:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants