-
-
Notifications
You must be signed in to change notification settings - Fork 290
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: web account deletion #3416
feat: web account deletion #3416
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #3416 +/- ##
===========================================
+ Coverage 10.32% 11.36% +1.03%
===========================================
Files 260 260
Lines 12596 12559 -37
===========================================
+ Hits 1301 1427 +126
+ Misses 11295 11132 -163
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
packages/smooth_app/lib/pages/preferences/account_deletion_webview.dart
Outdated
Show resolved
Hide resolved
packages/smooth_app/lib/pages/preferences/account_deletion_webview.dart
Outdated
Show resolved
Hide resolved
Just an idea, but maybe it's better if we hide the app bar (the one at the bottom), @teolemon ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heyy and thanks @Pierre-Monier the code looks good. Just one little code related comment.
The others are more general especially openfoodfacts/openfoodfacts-server#7825 is somewhat not good. If I'm not the only one expierencing this problem we should probably comment out the localization and just always use the englisch version. That shouldn't be a problem because of the autofill.
Besides that everything looks great 🥳
AccountDeletionWebviewState createState() => AccountDeletionWebviewState(); | ||
} | ||
|
||
class AccountDeletionWebviewState extends State<AccountDeletionWebview> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class should be private
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep the english version looks like the only one work, stick to english smarter ^^
}, | ||
"account_deletion_path_segment": "account-deletion", | ||
"@account_deletion_path_segment": { | ||
"description": "Path segment of the url open in a webview open when the user wants to delete his account" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"description": "Path segment of the url open in a webview open when the user wants to delete his account" | |
"description": "Path segment of the url open in a webview open when the user wants to delete his account, go to "https://blog.openfoodfacts.org/en/account-deletion" and choose your language on the top right. Use the text behind the last "/" |
'your-subject': subject, | ||
if (userId != null && userId.isEmail) | ||
'your-mail': userId | ||
else if (userId != null) | ||
'your-name': userId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to check if they need to be localized too, (hopefully not) though it seems the account deletion form is currently only available in english
body: WebView( | ||
initialUrl: _getUrl(userPreferences), | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when the user deleted his account. The webview stay open?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently yes, I think it's hard to detect when the user has delete his account. The page doesn't switch url when deletion is done. So the only way is to watch html content but this is clearly overkill. Note that the form doesn't directly delete the account.
One good question is if the user delete his account, it should be remove from localStorage, I think it's not the case now (but I havn't check deeply)
yeah, why not ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for the quick iteration @Pierre-Monier
I agree we don't need the app bar but as it's really not that simple to remove it lets just keep it like that
Hi @Pierre-Monier! Just curious: was there a specific need for a I'm asking because
|
@monsieurtanuki it was tangling around with Apple. They force to provide a native way to delete the account. We were near an update block until we provided that 😬 |
Thank you @M123-dev for your answer! Not very convinced we have a good solution now, as we cannot pre-populate the language and the first 3 fields are a bit mysterious: I would prefer a flutter solution to android and ios solutions. That said, that's not a priority. |
I can, though first mid next week Could you create a small issue just to keep track |
What
Screenshot
Fixes bug(s)