Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Add read receipt times to the hovertip of read markers #586

Merged
merged 3 commits into from
Dec 9, 2016

Conversation

kegsay
Copy link
Member

@kegsay kegsay commented Dec 8, 2016

Fixes element-hq/element-web#2709. Surprisingly, this data was never passed down to
ReadReceiptMarker.

Fixes #2709. Surprisingly, this data was never passed down to
ReadReceiptMarker.
@kegsay
Copy link
Member Author

kegsay commented Dec 8, 2016

I don't understand why Travis is upset with me.

PhantomJS 2.1.1 (Linux 0.0.0) RoomView joins by alias if given an alias FAILED
	Error: Expected false to exist (/home/travis/build/matrix-org/matrix-react-sdk/test/all-tests.js:25080 <- webpack:///~/expect/lib/assert.js:29:0)

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good otherwise

var room = this.props.matrixClient.getRoom(this.props.mxEvent.getRoomId());
if (room) {
// [ {type/userId/data} ]
room.getReceiptsForEvent(this.props.mxEvent).forEach(function(r) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not terribly happy about this being here as well as this.props.readReceipts. It gives a very odd interface to this component, which is becoming less and less 'view'-like.

Can we push this up into MessagePanel and add the timestamp data to this.props.readReceipts?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused. I have not changed the interface to this component.

I dislike how this.props.readReceipts aren't read receipts at all, and are in fact a list of RoomMembers, which is why I have to contort like this. Are you asking for me to modify the interface to this component to make this.props.readReceipts actually be read receipts with an additional roomMember field?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, something like that.

@richvdh
Copy link
Member

richvdh commented Dec 8, 2016

(I don't know what's up with travis either; will investigate)

@richvdh richvdh assigned dbkr and kegsay and unassigned richvdh and dbkr Dec 8, 2016
Instead of passing a list of RoomMembers, pass a list of records with a
`roomMember` prop and a `ts` prop so we can display the timestamp on hover.
@kegsay
Copy link
Member Author

kegsay commented Dec 9, 2016

@richvdh PTAL

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

much better. lgtm.

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.

3 participants