Uh oh!
There was an error while loading. Please reload this page.
Add pack privacy switch - #42
Conversation
darinalleman
commented
Jan 23, 2021
This will need to be updated after MR #41 is merged. |
Callisto13
commented
Jan 24, 2021
Really nice 🎉 ! What do you think about the UX for when a Pack is not public? To me the spinner+pop-up says "something accidentally went wrong", where I think want we want here is more of "something is deliberately not allowed/found"... if that makes sense? Maybe a static (read: less spinny) page with a 404 and message like "Either the pack does not exist or you do not have permission to see it", or just "Pack not found" to give less away. What do you think? |
Callisto13
commented
Jan 24, 2021
Also what do you think about adding a marker of some sort on the owner's view pack page? |
darinalleman
commented
Jan 24, 2021
Good point! That certainly makes more sense. I don't think there are any existing full page error status pages, but I can make one. I'll also add something to the owner's view pack page that indicates public/private. Thanks! |
Add indicator to owner's pack view of private pack
Closes#8
Add a switch on the pack edit view for users to make their pack public or private.
Because all packs created so far have the default value of
public: falsein the database but packs are actually public no matter the value, after merging this PR I recommend running the following command in the database so that all existing packs are public.UPDATE packs SET public=true;If you'd like me to add a sequelize migration, I can certainly do it, I just wasn't sure what kind of workflow exists for how the production database is managed by code.
Here's a short clip that demonstrates that the user who is the owner of the pack can view their own pack whether or not it's private, but other users (including both users that are not logged in and users that are logged in) cannot view when the pack is marked private.
8-toggle-pack-privacy.mp4
The tooltip says "When public, the pack will be viewable by anyone with a link".
EDIT:
Added an indicator to the owner of a pack when viewing their private pack. It now says

PACK URL (PRIVATE)if the pack is private and justPACK URLwhen the pack is public. I think it makes sense there since most users would want to see that when they're about to copy the link to share with others.Also added a better error page instead of the vague notification and never-ending spinner:

Thanks for the feedback @Callisto13!