Page MenuHomePhabricator

[lib][native][web] Introduce threadTypeIsSidebar
ClosedPublic

Authored by ashoat on Jul 22 2024, 8:05 AM.
Tags
None
Referenced Files
F2616336: D12839.id.diff
Thu, Sep 5, 11:21 PM
Unknown Object (File)
Thu, Sep 5, 3:07 AM
Unknown Object (File)
Wed, Sep 4, 4:52 PM
Unknown Object (File)
Wed, Sep 4, 1:58 PM
Unknown Object (File)
Wed, Sep 4, 9:00 AM
Unknown Object (File)
Tue, Sep 3, 9:22 PM
Unknown Object (File)
Tue, Sep 3, 9:22 PM
Unknown Object (File)
Tue, Sep 3, 9:22 PM
Subscribers
None

Details

Summary

In this diff we replace threadTypes.SIDEBAR checks with threadTypeIsSidebar, a new utility function that also checks threadTypes.THICK_SIDEBAR. This allows our business logic to treat the two in the same way.

Test Plan

I followed the test plan described in this Linear comment, specifically for sidebar creation

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek added inline comments.
lib/types/thread-types-enum.js
168 ↗(On Diff #42616)

It might be more convenient to accept an optional threadType. Then, in some places, we could simplify the usages by passing threadInfo?.threadType as a parameter.

This revision is now accepted and ready to land.Jul 23 2024, 1:12 AM
lib/types/thread-types-enum.js
168 ↗(On Diff #42616)

That's a fair point, but it's a change that makes sense to make for all of the threadTypeIs* functions above, and I don't have time to make it this morning