Page MenuHomePhabricator

[lib] Add comments in messageTypes definition
ClosedPublic

Authored by inka on Jul 19 2022, 5:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 10, 12:41 PM
Unknown Object (File)
Apr 12 2024, 10:15 AM
Unknown Object (File)
Apr 12 2024, 10:15 AM
Unknown Object (File)
Apr 12 2024, 10:15 AM
Unknown Object (File)
Apr 12 2024, 10:15 AM
Unknown Object (File)
Apr 12 2024, 10:13 AM
Unknown Object (File)
Apr 5 2024, 2:00 AM
Unknown Object (File)
Apr 2 2024, 10:25 PM

Details

Summary

Add comments in messageTypes definition to clarify the difference between CREATE_SUB_THREAD and
CREATE_THREAD/CREATE_SIDEBAR. The CREATE_SUB_THREAD is now referencing only creating subthreads, but it used to also reference
creating sidebars. This can be observed in the database. For this reason this usecase has to be acknowledged in the code (eg.
in lib/shared/messages/create-sub-thread-message-spec.js).

Test Plan

Check if the types actually correspond to specified chat types by changing the robotext displayed to the user based
on them.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

inka requested review of this revision.Jul 19 2022, 5:33 AM
inka retitled this revision from Add comments in messageTypes definition to [lib] Add comments in messageTypes definition.Jul 19 2022, 7:20 AM
ashoat requested changes to this revision.Jul 19 2022, 8:45 AM

It's always good to try and stay consistent with the style in the file you're editing. In this case, you can see that there is a comment above UNSUPPORTED that looks a little different:

  1. The comment appears above instead of beside the code
  2. The line length is limited to 80 chars (this is actually a universal rule in our codebase)
  3. The comment starts with a capital letter
This revision now requires changes to proceed.Jul 19 2022, 8:45 AM

Fix formatting to match what was prevoiusly in the file

Right! This looks much better

This revision is now accepted and ready to land.Jul 19 2022, 11:53 AM