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

Feat: onboarding data privacy #48

Merged
merged 7 commits into from
Dec 3, 2024
Merged

Conversation

cimigree
Copy link
Contributor

@cimigree cimigree commented Dec 2, 2024

This is the two screens that follow the first screen when onboarding.
related to #42
They are mentioned in that Issue but the UI isn't described.
It can be found in Figma:
https://www.figma.com/design/UIA00RSP8Sz24V0vXvQHeL/(Desktop)-CoMapeo?node-id=0-1&node-type=canvas&t=4esd3jysAvxz8VlD-0
I had to add a bunch of images, some of which are SVG. If I could, I used pngs.
Right now I am just mocking the metrics toggle because the Logic from metrics that exists in mobile is not in the desktop app [yet?].

If you click on Get Started, you get to this screen:

Screenshot 2024-12-02 at 6 28 31 PM

And then if you click on Learn More, you get to this screen:

Screenshot 2024-12-02 at 6 29 09 PM

That is a very, very long scrollable screen.

Screenshot 2024-12-02 at 6 30 35 PM
Screenshot 2024-12-02 at 6 30 54 PM
Screenshot 2024-12-02 at 6 31 08 PM
Screenshot 2024-12-02 at 6 31 22 PM

**The Go back button will take you back to the previous screen. This is all Step 1 and that stays highlighted throughout **

@cimigree cimigree requested a review from EvanHahn December 2, 2024 23:33
Copy link

@EvanHahn EvanHahn left a comment

Choose a reason for hiding this comment

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

LGTM other than a few nitpicks.

Copy link

Choose a reason for hiding this comment

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

I didn't review any of the translation strings in this file or others. Let me know if that's wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that is fine!

padding: '12px 32px',
}}
>
<BackArrow>←</BackArrow>
Copy link

Choose a reason for hiding this comment

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

I'd love to give this an aria-label for screen readers. I don't think screen readers will do a great job with this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok done

Comment on lines 103 to 107
step === 1
? 'DataPrivacy'
: step === 2
? 'NextStep'
: 'PrivacyPolicyScreen'
Copy link

Choose a reason for hiding this comment

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

Nit: might just be me, but I find nested ternary expressions hard to read. Maybe something like this, if you want to maintain this being a single expression?

Suggested change
step === 1
? 'DataPrivacy'
: step === 2
? 'NextStep'
: 'PrivacyPolicyScreen'
{
1: 'DataPrivacy',
2: 'NextStep',
3: 'PrivacyPolicyScreen',
}[step]

Copy link
Contributor Author

@cimigree cimigree Dec 3, 2024

Choose a reason for hiding this comment

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

Good point! I replaced it with an object but not exactly as you suggested because sorry I wasn't sure what you meant/ how to do that.

setIsEnabled(newValue)
localStorage.setItem('MetricDiagnosticsPermission', String(newValue))

console.log('Permission updated:', newValue)
Copy link

Choose a reason for hiding this comment

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

Nit: maybe add a TODO to indicate that this code is going to be replaced?

{isSvg && icon ? (
React.createElement(icon, { width: 18, height: 18 })
) : (
<img src={icon as string} alt="" width={18} height={18} />
Copy link

Choose a reason for hiding this comment

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

Nit: I think TypeScript is smart enough to know that icon is a string, so we don't need this cast.

Suggested change
<img src={icon as string} alt="" width={18} height={18} />
<img src={icon} alt="" width={18} height={18} />

Copy link

Choose a reason for hiding this comment

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

The gradient on this dot looks a little weird. Not sure if that's intentional...feel free to ignore if so.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see what you mean. I found a new one to use.

@cimigree cimigree merged commit bacd1b2 into main Dec 3, 2024
1 check passed
@cimigree cimigree deleted the feat/onboarding-data-privacy branch December 3, 2024 15:54
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.

2 participants