-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Tooltip rtl #1830
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
Tooltip rtl #1830
Conversation
@andrewseguin needs rebase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reminded me that a feature still missing from the tooltip is ensuring that the position changes to be on-screen if it would otherwise go off-screen.
(the connected position strategy handles this already, but updating the transform origin would still be on the tooltip).
## `[md-tooltip]` | ||
### Properties | ||
|
||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| `md-tooltip` | `string` | The message to be displayed. | | ||
| `tooltip-position` | `"above"|"below"|"before"|"after"` | The position of the tooltip. | | ||
| `tooltip-position` | `"start"|"end"|"top"|"bottom"|"left"|"right"` | The position of the tooltip. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed this in the past and had decided that tooltip would use before
and after
instead of start
and end
.
The reasoning was that anything that is positioned relative to some other element would use before
and after
, and anything where the alignment is global (just based on the page layout) will be start
and end
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, my brain latched on to before
and after
and I completely missed that we do want to keep above
and below
and relatively positioned items as well.
(this is something we need to make sure is consistent before beta)
3d32e24
to
6ff7911
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM aside minor comments; you can add the merge: ready
label after changes
return { originX: 'center', originY: this.position }; | ||
} | ||
|
||
const isDirectionLtr = !this._dir || this._dir.value == 'ltr'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional: might be more readable to just say isRtl
if (this.position == 'right' || | ||
this.position == 'after' && isDirectionLtr || | ||
this.position == 'before' && !isDirectionLtr) { | ||
return { originX: 'end', originY: 'center' }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Superfluous whitespace
@andrewseguin can you rebase / address last comments and then add the |
2b69e4a
to
82d0f52
Compare
Address comments. No longer a breaking change, just adding left and right values. Added merge ready label |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Closes #1085