Page MenuHomePhabricator

[web] introduce usePushUserProfileModal hook
ClosedPublic

Authored by ginsu on Oct 12 2023, 9:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jul 2, 8:18 PM
Unknown Object (File)
Mon, Jul 1, 1:26 AM
Unknown Object (File)
Sat, Jun 29, 4:37 AM
Unknown Object (File)
Sat, Jun 29, 4:37 AM
Unknown Object (File)
Sat, Jun 29, 4:37 AM
Unknown Object (File)
Sat, Jun 29, 4:37 AM
Unknown Object (File)
Sat, Jun 29, 4:35 AM
Unknown Object (File)
Sat, Jun 29, 1:47 AM
Subscribers

Details

Summary

This diff introduces usePushUserProfileModal hook which is going to be used to push the user profile modal. This logic will need to be repeated in every place we want the user profiles to be accessible, so I thought that instead of copy+pasting the logic we should preemptively factor out this logic into this helper hook.

Linear task: https://linear.app/comm/issue/ENG-5246/introduce-hook-to-push-user-profile-modal

Test Plan

Confirmed that I can push the user profile modal (the subsequent diffs will have the demo videos for each of the access points)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu edited the test plan for this revision. (Show Details)
ginsu added reviewers: atul, inka.
Harbormaster returned this revision to the author for changes because remote builds failed.Oct 12 2023, 10:01 PM
Harbormaster failed remote builds in B23224: Diff 31980!
atul added inline comments.
web/modals/user-profile/user-profile-utils.js
9 ↗(On Diff #31981)

Let's pull this out as Props type and mark as read-only for for consistency.

If it leads to annoying merge conflicts/rebasing, feel free to add to end of stack as followup before landing this.

This revision is now accepted and ready to land.Oct 16 2023, 11:26 AM
web/modals/user-profile/user-profile-utils.js
9 ↗(On Diff #31981)