Page MenuHomePhabricator

[native] Display a button and navigate to invite links if they are present
ClosedPublic

Authored by tomek on May 5 2023, 9:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 2:56 PM
Unknown Object (File)
Thu, Dec 19, 2:30 PM
Unknown Object (File)
Sun, Dec 15, 10:04 PM
Unknown Object (File)
Sun, Dec 15, 10:04 PM
Unknown Object (File)
Sun, Dec 15, 10:04 PM
Unknown Object (File)
Sun, Dec 15, 10:04 PM
Unknown Object (File)
Sun, Dec 15, 10:04 PM
Unknown Object (File)
Sun, Dec 15, 10:04 PM
Subscribers

Details

Summary

When a community has a primary link, display three dots button next to it. The links are updated on every drawer open. Clicking this link shows a button that can be used to open a modal with the links.

Depends on D7730

Test Plan

Create a primary link for one community. Check if the button is displayed next to it. Click the button and open invite links modal - it should contain the link.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.May 5 2023, 9:12 AM
Harbormaster failed remote builds in B19077: Diff 26125!
tomek requested review of this revision.May 8 2023, 4:26 AM
native/navigation/community-drawer-item.react.js
208 ↗(On Diff #26177)

It looks like we don't care about the return type, so should we return mixed there? That will make it easier to eg. pass in an async function in case we ever need to do that

lib/utils/drawer-utils.react.js
49 ↗(On Diff #26177)

can there be links for subchannels?

lib/utils/drawer-utils.react.js
49 ↗(On Diff #26177)

Maybe in the future we could consider this, but probably not in the near future. Going to make inviteLink undefined for the subchannels.

native/navigation/community-drawer-item.react.js
208 ↗(On Diff #26177)

I've been suggesting this to people, but now I've made the same mistake. Sure, it should be mixed.

Do not pass invite links to subchannels. Update return type to mixed.

Use new navigation structure

Select action sheet theme

This revision is now accepted and ready to land.May 17 2023, 3:35 AM
tomek requested review of this revision.May 19 2023, 9:52 AM

The code changed significantly. It is much simpler, though.

kamil added inline comments.
native/invite-links/invite-links-button.react.js
46 ↗(On Diff #26680)

I think this can be defined outside of the component

This revision is now accepted and ready to land.May 22 2023, 7:54 AM
native/invite-links/invite-links-button.react.js
46 ↗(On Diff #26680)

Yes, but a couple of diffs later D7881 this becomes more complicated.