Skip to content

Commit a6fc39d

Browse files
authored
New Privacy Policy (codesandbox#3815)
Major changes to our currently outdated and privacy statement containing inaccurate statements. Main reason for the rewrites are: * Add European or EEA focus and compliance with laws and regulations; * Support introduction of upcoming email campaigns; * Tell you who we partner with; * Provide more accurate information on how we treat personal data. This PR also introduces homepage and editor notifications, informing viewers about the applicability of the policy. Privacy is an ongoing concern for CodeSandbox and our next update is likely to contain more information on international relations, such as there is the Privacy Shield Framework between US-EU. Please do reach out to us with questions.
1 parent fc2397d commit a6fc39d

File tree

9 files changed

+294
-269
lines changed

9 files changed

+294
-269
lines changed

packages/app/src/app/overmind/onInitialize.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
import { convertTypeToStatus } from '@codesandbox/common/lib/utils/notifications';
12
import { OnInitialize } from '.';
23

34
export const onInitialize: OnInitialize = async (
45
{ state, effects, actions },
56
overmindInstance
67
) => {
78
const provideJwtToken = () => state.jwt || effects.jwt.get();
9+
const seenTermsKey = 'ACCEPTED_TERMS_CODESANDBOX';
810

911
state.isFirstVisit = Boolean(
1012
!effects.jwt.get() && !effects.browser.storage.get('hasVisited')
@@ -104,4 +106,26 @@ export const onInitialize: OnInitialize = async (
104106
});
105107

106108
effects.preview.initialize(overmindInstance.reaction);
109+
110+
// show terms message on first visit since new terms
111+
if (!effects.browser.storage.get(seenTermsKey)) {
112+
effects.notificationToast.add({
113+
message:
114+
'Hello, our privacy policy has been updated recently. What’s new? CodeSandbox emails. Please read and reach out.',
115+
title: 'Updated Privacy',
116+
status: convertTypeToStatus('notice'),
117+
sticky: true,
118+
actions: {
119+
primary: [
120+
{
121+
label: 'Open Privacy Policy',
122+
run: () => {
123+
window.open('https://codesandbox.io/legal/privacy', '_blank');
124+
},
125+
},
126+
],
127+
},
128+
});
129+
effects.browser.storage.set(seenTermsKey, true);
130+
}
107131
};

packages/homepage/content/legal/policy.md

Lines changed: 0 additions & 267 deletions
This file was deleted.

0 commit comments

Comments
 (0)