Introduce getMessageActionTooltipStyle to calculate style object for tooltip
Details
Flow; Tested with the rest of diffs stack.
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
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 | We should avoid using switch | |
197–198 | 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 | It's not that intuitive that for top we use bottom. Can you explain this a bit? | |
272 | Please include tooltipPosition in the message |
web/chat/tooltip-utils.js | ||
---|---|---|
194 | I'll change it, but I still disagree with this, because for me it looks a lot better here that if-else? | |
197–198 | 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 | If it's the anchor point then maybe include that info in the name? |
web/chat/tooltip-utils.js | ||
---|---|---|
197–198 | Yes, I'll do the rename from xCoord, yCoord to anchorPointX, anchorPointY in a separate diff. |