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

Cookie Consent - Clean up #1171

Closed
3 tasks done
snmln opened this issue Sep 24, 2024 · 2 comments · Fixed by #1199
Closed
3 tasks done

Cookie Consent - Clean up #1171

snmln opened this issue Sep 24, 2024 · 2 comments · Fixed by #1199
Assignees
Labels
enhancement New feature or request

Comments

@snmln
Copy link
Contributor

snmln commented Sep 24, 2024

Notes from feedback on original Cookie Consent Form work:

  • Currently, the scripts that check cookies run every time a new page loads which I am not sure if it is necessary.
  • (might be related to 1.) I feel like Layout component is doing too much of cookie-related works, which should not be a part of layout's job. It might be slightly complicated in real life since it is layout's job to decide whether to render a specific component or not. But maybe there is something in the middle ground.
  • Banner and CookieConsent expects different forms for its content, Banner expects html and CookieConsent expects markdown. I am fine with either of them, but we should consolidate them.
  • Consolidate Banner and CookieConsent, wether they both should accept HTML or markdown within config props.
  • Extract Cookie consent functionality from the layout component.
  • Run Cookie validation scripts only when necessary (this might require further discussion to define upper and lower boundary of when is and is not necessary)
@snmln snmln added the enhancement New feature or request label Sep 24, 2024
@snmln snmln self-assigned this Oct 15, 2024
@snmln snmln linked a pull request Oct 18, 2024 that will close this issue
@aboydnw
Copy link
Contributor

aboydnw commented Oct 23, 2024

@hanbyul-here do we have a place to document all current feature flags for instance owners?

I think this could be a good thing to document somewhere, and specifically on the cookie consent form we might want to define:

  • When people should use it
  • How to turn it on
  • It's functionality (like how often users can expect to see this prompt, what the different selections do, etc)

@hanbyul-here
Copy link
Collaborator

@aboydnw There is this file: https://github.com/NASA-IMPACT/veda-ui/blob/main/docs/content/CONFIGURATION.md, which has all the configuration-related documents. These documents are mainly for developers, so they miss some elements, such as when people should use it 🤔 I feel like these elements should be handled separately from dev docs - but not sure where it should go though, do you have an idea about where to put these kinds of docs?

snmln added a commit that referenced this issue Nov 6, 2024
**Related Ticket:**
#1171

### Description of Changes

- Relocating cookie retrieval, validation, and creation functionality
from `layoutRoot` to `cookieConsentForm`
- Implementing `session item` to track when a session has begun for each
individual user and only run validation and retrieval functionality on
session start and when a response has not been recorded.
- Adjusting Banner content to accept markdown in config props.  

### Notes & Questions About Changes

### Validation / Testing
Clear out all cookies in your local machine to do so: open `dev tools`
-> navigate to `application tab`-> navigate to `cookies` in the left
panel -> right click `clear`
- After clearing your existing site cookies, navigate to any page. Click
on **Decline**. Navigate to another page and you should not see the
cookie consent form component.
- Clearing your existing site cookies again, navigate to any page. Click
on **Accept**. Navigate to another page and you should not see the
cookie consent form component.
- Clearing your existing site cookies again, navigate to any page. Click
on **X**. Navigate to another page and you should see the cookie consent
form component rerendered.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants