-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add list hidden
screen
#4958
Add list hidden
screen
#4958
Conversation
Your Render PR Server URL is https://social-app-pr-4958.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-cr1uelrtq21c73e8q260. |
} | ||
} | ||
}, [navigation, canGoBack, onGoBackProp]) | ||
const goBack = useGoBack(onGoBack) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No change, just extracting this function to a reusable hook.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks so good!
We should also hide the list name under Moderation > Lists in user settings for subscribers |
Co-authored-by: Hailey <me@haileyok.com>
I'm going to PR this separately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Couple of nits. I can hit them in a bit if you don't beat me 👍
* cleanup * hide title of moderation list * temp * clean * add margin * loosen types * tweak type * add an `override` prop to `hider` * Props switcheroo --------- Co-authored-by: Eric Bailey <git@esb.lol>
* origin/main: Add `list hidden` screen (#4958)
* origin/main: (50 commits) Add `list hidden` screen (#4958) Expose more methods, support disabled items (#4954) Expose more props from button (#4953) Fix orphaned feed slices, handle blocks (#4944) Tweak `expo-modules-core` hack patch (#4955) [Experiment] Always show bottom bar (#4946) Revert "[Video] Download videos" (#4945) Move global "Sign out" out of the current account row (#4941) Hack patch for testing OTA update crash behavior (#4942) [Video] Download videos (#4886) swap control files (#4936) [Embed] Starter pack embed embed (#4935) [Video] set audio category to ambient every time a new player is made (#4934) Add `/live/` to supported YouTube embed URLs (#4932) [Video] Try/catch video play/pause (#4930) Don't kick to login screen on network error (#4911) Remove .withProxy() calls (#4929) [Video] Audio duck off main thread (#4926) subclass agent to add setPersistSessionHandler (#4928) [Video] Fix crash when switching tabs (#4925) ...
Why
Whenever a list gets a
!hide
flag applied to it, the app should prevent users from viewing the list. However, users do still need to be able to remove the list from their pins or subscribed mod lists. Let's add a screen to do that.We also were not hiding the list name from the title, since it was being set in
useSetTitle()
. I removed that, and it will showList Hidden
in those cases.How
Whenever viewing the list, a screen will be shown telling the user the list has been hidden. If they are the owner, they will have the option to delete the list. If they are subscribed to the moderation list, they will be able to unsubscribe. And if they have the list saved or in their pins, they'll be able to remove it from there.
Test Plan
Two test lists that I have made: http://localhost:19006/profile/haileyok.com/lists/3l247irgjn62r and http://localhost:19006/profile/haileyok.com/lists/3l24csobejw2r
You can also test deleting the list by changing the
isHidden
variable on line 151 inProfileList.tsx
totrue
.Whenever you are the creator of the list, you should be able to still tap into the list with "Show anyway".
Non-creators should not be able to see the list.
However, if you are not the creator and you have saved or subscribed to the list, you should be given the ability to unsave/unsubscribe from that list.