Skip to content

Add pack privacy switch - #42

Merged
maplethorpej merged 9 commits into
Packstack-Tech:masterfrom
darinalleman:8-toggle-pack-privacy
Feb 13, 2021
Merged

Add pack privacy switch#42
maplethorpej merged 9 commits into
Packstack-Tech:masterfrom
darinalleman:8-toggle-pack-privacy

Conversation

@darinalleman

@darinallemandarinalleman commented Jan 23, 2021

Copy link
Copy Markdown
Contributor

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: false in 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.

image
image

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 just PACK URL when 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.
image

Also added a better error page instead of the vague notification and never-ending spinner:
image

Thanks for the feedback @Callisto13!

@darinallemandarinalleman changed the title Add Pack privacy switchAdd pack privacy switchJan 23, 2021
@darinalleman

Copy link
Copy Markdown
ContributorAuthor

This will need to be updated after MR #41 is merged.

@Callisto13

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

Also what do you think about adding a marker of some sort on the owner's view pack page?

@darinalleman

Copy link
Copy Markdown
ContributorAuthor

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!

@darinalleman
darinalleman marked this pull request as draft January 24, 2021 14:49
Add indicator to owner's pack view of private pack
@darinalleman
darinalleman marked this pull request as ready for review January 27, 2021 02:45
@maplethorpej
maplethorpej merged commit 46e32a5 into Packstack-Tech:masterFeb 13, 2021
@darinalleman
darinalleman deleted the 8-toggle-pack-privacy branch February 16, 2021 12:15
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Toggle pack privacy

3 participants

@darinalleman@Callisto13@maplethorpej