Skip to content
This repository has been archived by the owner on Jul 6, 2020. It is now read-only.

Added cookie consent #316

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

Kajol-Kumari
Copy link
Member

@Kajol-Kumari Kajol-Kumari commented Apr 5, 2020

Feature added:

  • Cookie consent

The cookie consent will appear when-

  • someone opens the site for the first time

  • everytime when someone opens the site in incognito window

Screenshot:
Screenshot from 2020-05-28 21-46-17

For tablets:
Screenshot from 2020-05-28 21-45-50

Mobile view:
Screenshot from 2020-05-28 21-49-28

@codecov-io
Copy link

codecov-io commented Apr 5, 2020

Codecov Report

Merging #316 into master will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #316      +/-   ##
==========================================
+ Coverage   50.63%   50.66%   +0.02%     
==========================================
  Files          66       66              
  Lines        3772     3774       +2     
  Branches      444      444              
==========================================
+ Hits         1910     1912       +2     
  Misses       1767     1767              
  Partials       95       95              
Impacted Files Coverage Δ
src/app/app.component.ts 36.98% <100.00%> (+1.77%) ⬆️
Impacted Files Coverage Δ
src/app/app.component.ts 36.98% <100.00%> (+1.77%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b9f2bf...6e662a2. Read the comment docs.

src/index.html Outdated Show resolved Hide resolved
@RishabhJain2018
Copy link
Member

@Shekharrajak Can you please review this again?

@Shekharrajak
Copy link
Member

@Kajol-Kumari , can you please provide some description how this PR will work and perform better ? Can you make sure you write details in PR itself ? Adding comments to your code change will help to approve and understand it better.

@codecov-commenter
Copy link

codecov-commenter commented May 20, 2020

Codecov Report

Merging #316 into master will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #316      +/-   ##
==========================================
+ Coverage   50.16%   50.19%   +0.02%     
==========================================
  Files          66       66              
  Lines        3873     3875       +2     
  Branches      450      450              
==========================================
+ Hits         1943     1945       +2     
  Misses       1836     1836              
  Partials       94       94              
Impacted Files Coverage Δ
src/environments/environment.staging.ts 100.00% <ø> (ø)
src/environments/environment.ts 100.00% <ø> (ø)
src/app/app.component.ts 36.98% <100.00%> (+1.77%) ⬆️
Impacted Files Coverage Δ
src/environments/environment.staging.ts 100.00% <ø> (ø)
src/environments/environment.ts 100.00% <ø> (ø)
src/app/app.component.ts 36.98% <100.00%> (+1.77%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 932a9c0...1700876. Read the comment docs.

@Kajol-Kumari
Copy link
Member Author

@Kajol-Kumari , can you please provide some description how this PR will work and perform better ? Can you make sure you write details in PR itself ? Adding comments to your code change will help to approve and understand it better.

@Shekharrajak I have added the required description and comments.can u please review it now.

Copy link
Member

@Shekharrajak Shekharrajak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall it is looking good, but I am still not sure what are the browser cookies the site will be using and how it will behave in mobile/tablet device size.

// configuration of cookie consent
const cookieConfig: NgcCookieConsentConfig = {
cookie: {
domain: 'localhost' // or 'your.domain.com' // it is mandatory to set a domain, for cookies to work properly (see https://goo.gl/S2Hy2A)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What will be the domain when it is in production or staging environment? At that time how will we configure it? Can it pick the domain without setting it - can you explore about it ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Shekharrajak we just need to change the domain in here for the production mode and in it's doc, i couldn't find any feature of automatic domain detection.So will have to change it manually at the time of production.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to make it environment variable then.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for suggestion @Shekharrajak . I have made the suggested changes. Can you please now check if this looks good to you?

package.json Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants