Page MenuHomePhabricator

[lib/web] introduce useThreadSettingsNotifications
ClosedPublic

Authored by ginsu on Jul 3 2024, 1:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 22, 10:57 PM
Unknown Object (File)
Mon, Dec 16, 7:21 PM
Unknown Object (File)
Thu, Dec 5, 7:38 PM
Unknown Object (File)
Nov 11 2024, 3:17 AM
Unknown Object (File)
Nov 10 2024, 9:32 PM
Unknown Object (File)
Nov 10 2024, 8:44 PM
Unknown Object (File)
Nov 10 2024, 1:06 PM
Unknown Object (File)
Nov 8 2024, 10:39 PM
Subscribers

Details

Summary

This diff introduces a new hook called useThreadSettingsNotifications which factors out all the shared thread notification settings logic that will be used in both web and native

Test Plan

Confirmed that there were no regresssions with the notifications modal on web

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ginsu requested review of this revision.Jul 3 2024, 1:22 AM
lib/shared/thread-settings-notifications-utils.js
64–74 ↗(On Diff #41929)

A subsequent diff will handle improving the error handling

inka added inline comments.
lib/shared/thread-settings-notifications-utils.js
28 ↗(On Diff #41929)

This name sounds like a function name, like this variable can be called to disable the save button. Can we call it saveButtonDisabled?

This revision is now accepted and ready to land.Jul 3 2024, 2:39 AM
ashoat added inline comments.
lib/shared/thread-settings-notifications-utils.js
82–85 ↗(On Diff #41929)

Thanks for adding loading state here

102–104 ↗(On Diff #41929)

Do we really need all three of these, versus just exposing setNotificationSettings, and letting the caller continue creating the callbacks?

lib/shared/thread-settings-notifications-utils.js
102–104 ↗(On Diff #41929)

I guess it's reused in D12647 and so we'd need to be creating the callbacks in two different places. Feel free to ignore this feedback

Removing this diff from the stack so I can land as is (locally rebased + confirmed that this is safe)

This revision was landed with ongoing or failed builds.Jul 3 2024, 3:13 PM
This revision was automatically updated to reflect the committed changes.