Skip to content
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

597: Accept or Decline Cookies #635

Merged

Conversation

CodeWritingCow
Copy link
Collaborator

@CodeWritingCow CodeWritingCow commented May 15, 2024

Description

This PR creates a cookie consent banner for users to accept or decline cookies in their Web browser.

When user declines cookies and then clicks the "Save Property" button, the property won't be saved. Instead, the cookie-consent banner will appear again and ask for their permission to save cookies in their browser.

Closes #597

Screenshots

Desktop view

Screen Shot 2024-05-28 at 11 46 42 PM

Mobile view

Screen Shot 2024-05-28 at 11 45 44 PM

Screen recordings

These videos show 3 of the scenarios where the cookie-consent banner will appear:

1) User visits homepage for the first time

2) User clicks "Cookie Settings" in footer

Screen.Recording.2024-05-28.at.11.50.53.PM.01.edited.mov

3) User clicks "Save Property" button after declining cookies

Screen.Recording.2024-05-28.at.11.50.53.PM.02.edited.mov

Create UI component for users to accept or decline cookies in their Web browser.
Copy link

vercel bot commented May 15, 2024

@CodeWritingCow is attempting to deploy a commit to the Clean and Green Philly Team on Vercel.

A member of the Team first needs to authorize it.

Add link to footer.
Update footer styling to match new UX requirements. Center align footer elements and separate them with dash symbols.
@nlebovits
Copy link
Collaborator

@thansidwell take a look?

@nlebovits nlebovits requested a review from paulhchoi May 15, 2024 10:34
@thansidwell
Copy link
Collaborator

@nlebovits How do I take a look? Usually there's a post with a Preview link.

Copy link

vercel bot commented May 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vacant-lots-proj ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 18, 2024 6:28pm

@brandonfcohen1
Copy link
Collaborator

@nlebovits How do I take a look? Usually there's a post with a Preview link.

I just approved the preview link, but @CodeWritingCow this is still a draft PR, is it ready for review?

@thansidwell
Copy link
Collaborator

Yeah, the cookie banner doesn't show up in the Preview.

@CodeWritingCow
Copy link
Collaborator Author

CodeWritingCow commented May 15, 2024

@brandonfcohen1 it's not ready for review yet. I've built a UI component for the banner. However, I still need to write the actual logic for allowing/disabling cookies. I'll change the PR status to "ready for review" once it's ready.

@Moylena
Copy link
Collaborator

Moylena commented May 28, 2024

@thansidwell @nlebovits can you review and approve please?

Add shouldAllowCookies, setShouldAllowCookies to CookieProvider.
If user clicks Save Property button after declining cookies,
display cookie-consent banner again.
@CodeWritingCow CodeWritingCow marked this pull request as ready for review May 29, 2024 03:43
@CodeWritingCow
Copy link
Collaborator Author

CodeWritingCow commented May 29, 2024

@bacitracin @thansidwell can you review this PR when you get a chance? Thank you!

Rewrite parts of click handler into helper methods.
@nlebovits nlebovits merged commit 6c6e6c8 into CodeForPhilly:staging May 31, 2024
1 of 2 checks passed
Sign up for free to 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.

5 participants