-
Notifications
You must be signed in to change notification settings - Fork 11
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
Improve Handling of noData Import Errors #2494
Conversation
…rror. Don't show feedback on `noData` errors.
@@ -29,6 +29,7 @@ final class FirefoxLoginReader { | |||
case couldNotDetermineFormat = -2 | |||
|
|||
case couldNotFindLoginsFile = 0 | |||
case couldNotFindKeyDB |
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.
please don‘t change the case ordering to keep the original pixel error codes, add the new case to the end of the list, also consider adding a comment to keep the ordering when adding new errors
case (.bookmarks, .failure(let error)): | ||
if error.errorType == .noData { |
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 can be split into different cases to remove the nested if
: case (.bookmarks, .failure(let error)) where error.errorType == .noData:
and case (.bookmarks, .failure(let error)):
String(format: NSLocalizedString("import.nodata.bookmarks.subtitle", value: "If you have %@ bookmarks, try importing them manually instead.", comment: "Data import error subtitle: suggestion to import Bookmarks manually by selecting a CSV or HTML file."), source.importSourceName) | ||
} | ||
static func importNoDataPasswordsSubtitle(from source: DataImport.Source) -> String { | ||
String(format: NSLocalizedString("import.nodata.passwords.subtitle", value: "If you have %@ passwords, try importing them manually instead.", comment: "Data import error subtitle: suggestion to import passwords manually by selecting a CSV or HTML file."), source.importSourceName) |
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.
consider adding a comment for translator what is "%@" here,
BTW, will localization of the added copy be run as a follow-up task or is it in progress?
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 updated copy was added as part of ship review and the copy review is still open. Once approved I’ll run translation as part of this task.
Thanks for the review @mallexxx. PR updated. |
+ Text(zeroString).bold() | ||
} | ||
|
||
case (.bookmarks, .failure(let error)): |
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.
fix the 'error' was never used
warning
HStack { | ||
skippedImage() | ||
Text("Bookmarks:", | ||
comment: "Data import summary format of how many bookmarks (%lld) were successfully imported.") |
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.
fix the comment (no formatting here)
HStack { | ||
skippedImage() | ||
Text("Passwords:", | ||
comment: "Data import summary format of how many passwords (%lld) were successfully imported.") |
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.
fix the comment (no formatting here)
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.
LGTM!
see couple more minor notes about locatization comments above
Task/Issue URL: https://app.asana.com/0/0/1206886138223455/f **Description**: Stop prompting the user for feedback when we are handling a noData error. When no data is found initially, and user chooses to skip manual import, no summary screen is displayed (the import dialog is dismissed)
* main: (338 commits) Fixes the VPN restarting logic on update (#2545) fix download save panel disappearing on navigation (#2549) Add CI support for handling installation attribution (#2502) Bump version to 1.82.0 (152) Pixel changed in subscription (#2541) add LSHandlerRank for .duckload document type (#2537) Fix usertext comment to ensure it matches localizable string (#2546) Update Neighbor Report (#2542) DBP: Compare by url and not name (#2544) DBP: Compare by url and not name (#2544) Adds a series of UI tests for Bookmarks Bar visibility Improve Handling of noData Import Errors (#2494) Bump version to 1.82.0 (151) Use the default action button style for VPN onboarding (#2529) Redirect from purchase page to macOS native purchase flow (#2538) Closing empty tabs after download (#2510) Add Web UI loading state pixels (#2531) fix localization warnings (#2288) Select URL in address bar when editing and use cmd+L (#2536) Add attemptId to Captcha /result endpoint (#2530) ...
* main: (22 commits) Removes last instance of NETWORK_PROTECTION flag (#2573) Bye bye NETWORK_PROTECTION (#2509) QWD: Enable Hide/Show for Autofill Credit Card Number and CVV (#2539) Removed the VPN waitlist beta pixels (#2555) VPN: Cleanup authorize call (#2565) Revert "VPN: Cleanup authorize call (#2553)" VPN: Cleanup authorize call (#2553) Improves underlying error pixel information (#2543) Fixes the VPN restarting logic on update (#2545) fix download save panel disappearing on navigation (#2549) Add CI support for handling installation attribution (#2502) Fix usertext comment to ensure it matches localizable string (#2546) Update Neighbor Report (#2542) DBP: Compare by url and not name (#2544) Adds a series of UI tests for Bookmarks Bar visibility Improve Handling of noData Import Errors (#2494) Use the default action button style for VPN onboarding (#2529) Closing empty tabs after download (#2510) Add Web UI loading state pixels (#2531) fix localization warnings (#2288) ...
Task/Issue URL: https://app.asana.com/0/0/1206886138223455/f
Description:
Why
Changes
noData
Icon)noData
Icon)Note: Testing below will involve moving your Firefox/Chrome browser data. Make sure you put these files back if you use Firefox/Chrome as your browser
Pre-Requisites for Tests
Steps to test this PR:
~/Library/Application Support/Firefox/Profiles/
logins.json
file outside the directory (i.e to your desktop).~/Library/Application Support/Firefox/Profiles/
places.sqlite
file outside the directory (i.e to your desktop)logins.json
file is present (i.e put it back).~/Library/Application Support/Google/Chrome/Default/
Login Data
andLogin Data For Account
files outside the directory (i.e to your desktop)~/Library/Application Support/Google/Chrome/Default/
Bookmarks
file outside the directory (i.e to your desktop)Login Data
andLogin Data For Account
files are present (i.e put it back).—
Internal references:
Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation