Introduce getMessageActionTooltipStyle to calculate style object for tooltip
Details
Flow; Tested with the rest of diffs stack.
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
This should also have some tests. Ideally, a test plan should include some description of how particular positions were tested.
web/chat/tooltip-utils.js | ||
---|---|---|
194 ↗ | (On Diff #15856) | We should avoid using switch |
197–198 ↗ | (On Diff #15856) | What is the meaning of these coordinates? I guess it's not a simple offset because it doesn't depend on the tooltip size. |
200 ↗ | (On Diff #15856) | It's not that intuitive that for top we use bottom. Can you explain this a bit? |
272 ↗ | (On Diff #15856) | Please include tooltipPosition in the message |
web/chat/tooltip-utils.js | ||
---|---|---|
194 ↗ | (On Diff #15856) | I'll change it, but I still disagree with this, because for me it looks a lot better here that if-else? |
197–198 ↗ | (On Diff #15856) | It's the anchor point - best to explain on the picture: The horizontalPosition and verticalPosition are relative to this point. That's why for top-aligned position, we display the tooltip below (bottom) |
web/chat/tooltip-utils.js | ||
---|---|---|
197–198 ↗ | (On Diff #15856) | If it's the anchor point then maybe include that info in the name? |
web/chat/tooltip-utils.js | ||
---|---|---|
197–198 ↗ | (On Diff #15856) | Yes, I'll do the rename from xCoord, yCoord to anchorPointX, anchorPointY in a separate diff. |