Page MenuHomePhabricator

[lib] Create types for message editing
ClosedPublic

Authored by kuba on Tue, Mar 7, 1:32 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 30, 3:02 AM
Unknown Object (File)
Wed, Mar 22, 12:16 AM
Unknown Object (File)
Thu, Mar 16, 11:35 PM
Unknown Object (File)
Sun, Mar 12, 9:04 AM
Unknown Object (File)
Sun, Mar 12, 9:04 AM
Unknown Object (File)
Sat, Mar 11, 2:13 PM

Details

Summary

Created types for new 'edit_message' message type.

Test Plan

Checked if the app still works.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kuba requested review of this revision.Tue, Mar 7, 1:47 AM

Can you also updates lib/types/messages.js? EDIT ah I see these are in the next diff

In general I personally find it better to introduce types along with code that actually uses them, but many people on the team do what you did here and introduce them in a separate diff. It just makes it much harder to test... eg. your Test Plan doesn't actually test any of the types at all, which means it's quite a poor test plan.

Separately, I think it might be good to add @ginsu to your list of reviewers for this work, given how recently he touched reactions

Can you also updates lib/types/messages.js? EDIT ah I see these are in the next diff

In general I personally find it better to introduce types along with code that actually uses them, but many people on the team do what you did here and introduce them in a separate diff. It just makes it much harder to test... eg. your Test Plan doesn't actually test any of the types at all, which means it's quite a poor test plan.

Sure, I didn't know whether I should divide it or not. Next time I will do it in one diff.

This revision is now accepted and ready to land.Thu, Mar 9, 9:56 AM

Removed localID from the type

Can you clarify in what scenarios the id can be null? Usually we only see that for types that also have localID

Can you clarify in what scenarios the id can be null? Usually we only see that for types that also have localID

You are right. I couldn't find such scenario. I also tested the app and it still works as expected. Updating the diff.

id is no longer nullable

lib/types/messages/edit.js
16 ↗(On Diff #23978)

Why isn't this readonly?

kuba marked an inline comment as done.Mon, Mar 27, 8:28 AM