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

Refactor LoginListViewController to MVVM #6779

Merged
merged 26 commits into from
Jun 26, 2020

Conversation

vphong
Copy link
Contributor

@vphong vphong commented Jun 10, 2020

@vphong vphong linked an issue Jun 10, 2020 that may be closed by this pull request
@mozillamobilebot
Copy link

mozillamobilebot commented Jun 10, 2020

SwiftLint found issues

Warnings

File Line Reason
FxAPushMessageHandler.swift 139 Colons should be next to the identifier when specifying a type and next to the key in dictionary literals. (colon)
TabManager.swift 443 if, for, guard, switch, while, and catch statements shouldn't unnecessarily wrap their conditionals or arguments in parentheses. (control_statement)
BookmarksPanel.swift 494 Prefer empty collection over optional collection. (discouraged_optional_collection)
BookmarksPanel.swift 524 Prefer empty collection over optional collection. (discouraged_optional_collection)
HistoryPanel.swift 517 Prefer empty collection over optional collection. (discouraged_optional_collection)
HistoryPanel.swift 625 Prefer empty collection over optional collection. (discouraged_optional_collection)
AppSettingsTableViewController.swift 20 Force casts should be avoided. (force_cast)
AppSettingsTableViewController.swift 152 Force casts should be avoided. (force_cast)
BrowserViewController.swift 980 Colons should be next to the identifier when specifying a type and next to the key in dictionary literals. (colon)
BrowserViewController.swift 502 Prefer empty collection over optional collection. (discouraged_optional_collection)
BrowserViewController.swift 893 Prefer empty collection over optional collection. (discouraged_optional_collection)
BrowserViewController.swift 1408 Prefer empty collection over optional collection. (discouraged_optional_collection)
BrowserViewController.swift 2499 Force casts should be avoided. (force_cast)
BrowserViewController.swift 2229 Don't add a space between the method name and the parentheses. (no_space_in_method_call)
BrowserViewController.swift 54 Variables should not have redundant type annotation (redundant_type_annotation)
AppSettingsOptions.swift 614 Force casts should be avoided. (force_cast)
AppSettingsOptions.swift 618 Force casts should be avoided. (force_cast)
AppSettingsOptions.swift 713 Force casts should be avoided. (force_cast)
AppSettingsOptions.swift 177 Setter value is not used. (unused_setter_value)
PushNotificationSetup.swift 30 Colons should be next to the identifier when specifying a type and next to the key in dictionary literals. (colon)
PushNotificationSetup.swift 1 Header comments should be consistent with project patterns. (file_header)
Prefs.swift 169 Prefer empty collection over optional collection. (discouraged_optional_collection)
Prefs.swift 198 Force casts should be avoided. (force_cast)

Errors

File Line Reason
BrowserViewController.swift 2014 Opening braces should be preceded by a single space and on the same line as the declaration. (opening_brace)
AppSettingsOptions.swift 610 There should be no space before and one after any comma. (comma)
UserAgent.swift 134 Opening braces should be preceded by a single space and on the same line as the declaration. (opening_brace)

Generated by 🚫 Danger

@vphong vphong marked this pull request as ready for review June 15, 2020 19:24
@vphong vphong requested a review from nbhasin2 June 16, 2020 19:05
@vphong vphong self-assigned this Jun 16, 2020
@nbhasin2
Copy link
Contributor

I think you'll also want to rebase as we moved to XCode 11.5 in the master branch. Otherwise the branch won't compile properly on BB

@nbhasin2
Copy link
Contributor

I tested locally and things look good. Except during the night mode the terms entered on searchbar are not in proper colour. This can be addressed later as it was there before.

image

@vphong Try it on iPad as well and other devices when you get a chance.

garvankeeley and others added 15 commits June 22, 2020 17:48
Update the lib to v1.1.3 which has fix for this
…on (#6827)

* Bugzilla 1646756: close last priv tab clears the WKWebViewConfiguration

* use prefkey for blockpopups
* Try installing Carthage

modify carthage_command file

add comment

* remove space

Co-authored-by: isabel rios <[email protected]>
* Fix #4717 - Provide feedback when pinning a site from inside the Library panel

Display toast notification on the Library panel
Display toast notification on the Bookmarks panel
Display toast notification on the Website tab

* Change to remove

Co-authored-by: Vlad Dramaretskyi <[email protected]>
…wsing (#6757)

* Fixed #6730: open apps preview should hide all screens in private browsing

* #6730 changed color of backdropContainer and changed it edges to fill whole screen, added it TrayView as well

* Added new color #1D1133 for Ink90
noorhashem and others added 9 commits June 24, 2020 20:40
* Use .afterFirstUnlock on all apnsToken instances

* Re-register push on subscriptionExpired
The durable sync servers 503 if major version == 0 to sidestep
a bug.
…er copying link and color contrast of the copied link label" (#6860)

* Revert "code styling"

This reverts commit b1af71b.

* Revert "code styling"

This reverts commit cd8a09b.

* Revert "code styling"

This reverts commit a552d58.

* Revert "edits to label color variables definetions"

This reverts commit 9c5da0a.

* Revert "code styling"

This reverts commit 911f098.

* Revert "removed extra tabs"

This reverts commit 9545675.

* Revert "fixed support for ios 112.4 colors"

This reverts commit 5dd6c0c.

* Revert "removed tab + edits to constraints for buttons"

This reverts commit 33f8d21.

* Revert "edit in constraint for widget button"

This reverts commit 48a429a.

* Revert "styling edits"

This reverts commit dd561ac.

* Revert "removed commented lines"

This reverts commit 4085267.

* Revert "bug fixes : widget constraints + color contrasts of labels in light/dark themes + added pdf button designs"

This reverts commit 981ead9.

* Revert "fixed the cut-off of copied link labels and the contrast of the color for light/dark mode"

This reverts commit 8ec8a75.
* fixed the cut-off of copied link labels and the contrast of the color for light/dark mode

* bug fixes : widget constraints + color contrasts of labels in light/dark themes + added pdf button designs

* removed commented lines

* styling edits

* edit in constraint for widget button

* removed tab + edits to constraints for buttons

* fixed support for ios 112.4 colors

* removed extra tabs

* code styling

* edits to label color variables definetions

* code styling

* code styling

* code styling

Co-authored-by: noorhashem <[email protected]>
@vphong vphong merged commit c0b16b0 into vphong/breachalerts Jun 26, 2020
@vphong vphong deleted the vphong/loginslist-mvvm branch June 26, 2020 17:44
vphong added a commit that referenced this pull request Jun 26, 2020
* Fix #6788: enable QR pairing for china edition (#6811)

* Fix #6723: telemetry lib out-of-space fatal exception (#6813)

Update the lib to v1.1.3 which has fix for this

* [nobug, build] remove duplicate carthage copy-frameworks objcexc. step (#6832)

* Bugzilla 1646756: close last priv tab clears the WKWebViewConfiguration (#6827)

* Bugzilla 1646756: close last priv tab clears the WKWebViewConfiguration

* use prefkey for blockpopups

* Try installing Carthage (#6836)

* Try installing Carthage

modify carthage_command file

add comment

* remove space

Co-authored-by: isabel rios <[email protected]>

* Update SnapshotHelper file (#6839)

Co-authored-by: isabel rios <[email protected]>

* Fix #4717 - Provide feedback when pinning a site (#6785)

* Fix #4717 - Provide feedback when pinning a site from inside the Library panel

Display toast notification on the Library panel
Display toast notification on the Bookmarks panel
Display toast notification on the Website tab

* Change to remove

Co-authored-by: Vlad Dramaretskyi <[email protected]>

* Fixed #6730: open apps preview should hide all screens in private browsing (#6757)

* Fixed #6730: open apps preview should hide all screens in private browsing

* #6730 changed color of backdropContainer and changed it edges to fill whole screen, added it TrayView as well

* Added new color #1D1133 for Ink90

* fixed the cut-off of copied link labels and the contrast of the color for light/dark mode

* bug fixes : widget constraints + color contrasts of labels in light/dark themes + added pdf button designs

* removed commented lines

* styling edits

* edit in constraint for widget button

* removed tab + edits to constraints for buttons

* fixed support for ios 112.4 colors

* removed extra tabs

* code styling

* edits to label color variables definetions

* code styling

* code styling

* code styling

* Push subscription expired handling (#6851)

* Use .afterFirstUnlock on all apnsToken instances

* Re-register push on subscriptionExpired

* Send dev in UA instead of 0.0.1 (#6849)

The durable sync servers 503 if major version == 0 to sidestep
a bug.

* Revert "Fix: #6764 #6763 #6766 #6765 String cutting off in widget after copying link and color contrast of the copied link label" (#6860)

* Revert "code styling"

This reverts commit b1af71b.

* Revert "code styling"

This reverts commit cd8a09b.

* Revert "code styling"

This reverts commit a552d58.

* Revert "edits to label color variables definetions"

This reverts commit 9c5da0a.

* Revert "code styling"

This reverts commit 911f098.

* Revert "removed extra tabs"

This reverts commit 9545675.

* Revert "fixed support for ios 112.4 colors"

This reverts commit 5dd6c0c.

* Revert "removed tab + edits to constraints for buttons"

This reverts commit 33f8d21.

* Revert "edit in constraint for widget button"

This reverts commit 48a429a.

* Revert "styling edits"

This reverts commit dd561ac.

* Revert "removed commented lines"

This reverts commit 4085267.

* Revert "bug fixes : widget constraints + color contrasts of labels in light/dark themes + added pdf button designs"

This reverts commit 981ead9.

* Revert "fixed the cut-off of copied link labels and the contrast of the color for light/dark mode"

This reverts commit 8ec8a75.

* Noorhashem/today widget fixes (#6861)

* fixed the cut-off of copied link labels and the contrast of the color for light/dark mode

* bug fixes : widget constraints + color contrasts of labels in light/dark themes + added pdf button designs

* removed commented lines

* styling edits

* edit in constraint for widget button

* removed tab + edits to constraints for buttons

* fixed support for ios 112.4 colors

* removed extra tabs

* code styling

* edits to label color variables definetions

* code styling

* code styling

* code styling

Co-authored-by: noorhashem <[email protected]>

* Fix #6862: UA test broken (#6863)

Co-authored-by: Garvan Keeley <[email protected]>
Co-authored-by: isabelrios <[email protected]>
Co-authored-by: isabel rios <[email protected]>
Co-authored-by: Daniela Arcese <[email protected]>
Co-authored-by: Vlad Dramaretskyi <[email protected]>
Co-authored-by: Haris Zaman <[email protected]>
Co-authored-by: noorhashem <[email protected]>
Co-authored-by: Edouard Oger <[email protected]>
@vphong vphong restored the vphong/loginslist-mvvm branch June 26, 2020 21:14
vphong added a commit that referenced this pull request Jun 30, 2020
@vphong vphong deleted the vphong/loginslist-mvvm branch July 15, 2020 23:15
vphong added a commit that referenced this pull request Aug 17, 2020
* Base BreachAlertsManager with loadBreaches() and compareToBreaches() (#6696)

* Revert "Base BreachAlertsManager with loadBreaches() and compareToBreaches() (#6696)" (#6698)

This reverts commit 6110fd0.

* Base BreachAlertsManager class with loadBreaches() + compare() (#6699)

* Test BreachAlertsManager.loadBreaches() and compareToBreaches() (#6715)

* Refactor LoginListViewController to MVVM (#6779)

* Refactor LoginListViewController to MVVM (again) (#6871)

* Refactor LoginListViewController to MVVM
* New PR made because previous changes were not merged correctly

* Test LoginsList-related refactored classes (#6897)

* LoginsList test stubs

* fix test db deletion

* query test

* more view model tests

* test on properties set by setLogins

* open logins db

* LoginListSelectionHelper tests

* VM helper tests

* headers

* Delete LoginListDataSourceHelper.swift

* queue-ify loadLogins

* queue-ify tests

* computeSectionsFromLogin + revert queues

* remove tests requiring loadLogins to be called + cleanup

* review changes

* cleanup after renaming

* Incorporate BreachAlertsManager in to LoginsListViewController (#6934)

* Add breach alert icon to Logins List cells and display if item is breached (#6992)

* basic BreachAlerts surfacing

* UI update for breaches

* record breach IndexPaths

* rewrite findUserBreaches

* findUserBreaches refinement

* reload table after breaches are loaded to update UI

* rework cell reload method

* review changes

* rudimentary asset display

* positioning using custom cell

* hide icon and show when needed

* refinement

* positioning, vector size, additional mock data

* cleanup

* bug cleanup/polish

* convert array to set for performance

* forEach reloadRows optimization

* margins + breach reload optimization

Co-authored-by: Garvan Keeley <[email protected]>
Co-authored-by: Nishant Bhasin <[email protected]>

* Fix margins within LoginListTableViewCell (#7022)

* Update LoginListTableViewCell.swift and add custom stack views + containers

* FXIOS-710 ⁃ Create breach details view (#7041)

* stubbing

* stack views

* convert [BreachRecord] to set; basic view population

* formatting + string population

* UI polish

* commenting

* button implementation

* breach link malformation handling

* VoiceOver support

* more elegant url handling

* use delegate

* better delegation

* setup function for breach detail view

* re-add long login

* tests + comments + better accessibility support

* spacing + mock data redo

* UX updates (#7127)

* FXIOS-731 ⁃ HTTP HEAD etags to cut down on data requests from Breach Alerts (#7100)

* first pass

* etag & last accessed date integration

* test compatibility

* better completion handling

* cleanup

* review 1

* review 2

* Update BreachAlertsManager.swift

* formatting/test reformation

* fix logic errors

* Update BreachAlertsManager.swift

* fix logic

* remove mock data

* Lint

Co-authored-by: Garvan Keeley <[email protected]>
Co-authored-by: isabelrios <[email protected]>
Co-authored-by: isabel rios <[email protected]>
Co-authored-by: Daniela Arcese <[email protected]>
Co-authored-by: Vlad Dramaretskyi <[email protected]>
Co-authored-by: Haris Zaman <[email protected]>
Co-authored-by: noorhashem <[email protected]>
Co-authored-by: Edouard Oger <[email protected]>
Co-authored-by: Kayla Galway <[email protected]>
Co-authored-by: Nishant Bhasin <[email protected]>
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.

FXIOS-15 ⁃ Refactor LoginsViewController to use MVVM
9 participants