[fenix] For FNX-22339: Recently saved bookmarks (https://github.com/mozilla-mobile...
commitad66003755918c9b74acfbd9df3313f0c2b9dc90
authorElise Richards <erichards@mozilla.com>
Fri, 9 Jul 2021 19:36:20 +0000 (9 14:36 -0500)
committerGitHub <noreply@github.com>
Fri, 9 Jul 2021 19:36:20 +0000 (9 19:36 +0000)
treeb716db2d34230f7f63a2feb5878fc92d05fb637d
parent6138c3f8c56b25adb752bf872d32cabc0ab4153f
[fenix] For FNX-22339: Recently saved bookmarks (https://github.com/mozilla-mobile/fenix/pull/19835)

* Title and button for home screen recently saved bookmarks section

Create bookmark item view with favicon and title

* View holders and interactors for recently saved bookmarks

Recent bookmark item view holder binding

Create adapter for recent bookmarks. Implement controller methods. Implement view holder bindings for items

Top level adapter for recent bookmarks section

Retrieve list of recent bookmarks on home

View holders and interactors for recently saved bookmarks

Recent bookmark item view holder binding

Create adapter for recent bookmarks. Implement controller methods. Implement view holder bindings for items

Top level adapter for recent bookmarks section

Retrieve list of recent bookmarks on home

Update list on app start and when bookmarks are added

View holders and interactors for recently saved bookmarks

Recent bookmark item view holder binding

Create adapter for recent bookmarks. Implement controller methods. Implement view holder bindings for items

Top level adapter for recent bookmarks section

Retrieve list of recent bookmarks on home

Update list on app start and when bookmarks are added

Make a use case for retrieving and updating the list of recently saved bookmarks

Add adapter items and define header viewholder binding

Use session interactor for header button clicks. Bind in the adapter

* Retrieve list of bookmarks asynchronously on home

Interactor and controller tests

Address review comments

Split up tests for recent bookmarks

Update to new interactors

Dark mode and light mode styles

Refactor bookmarks home stuff

* Add RecentBookmarksFeature to home

Move interactor to SessionControlInteractor

Clean up lint, styles, and dimens.

* Bookmarks use case tests for retrieving recently saved bookmarks. Linting.

* View holder tests

* Match ux to designs for colors, margins, and scrolling

* Clean up clean up

* Tests for the view bound feature

* Controller test

* Clean up: check state of store in feature tests; ellipsize textviews for bookmark item; remove unused attr; format

Co-authored-by: Jonathan Almeida <jalmeida@mozilla.com>
34 files changed:
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/bookmarks/BookmarksUseCase.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragmentStore.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/recentbookmarks/RecentBookmarksFeature.kt [new file with mode: 0644]
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/recentbookmarks/RecentBookmarksItemAdapter.kt [new file with mode: 0644]
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/recentbookmarks/controller/RecentBookmarksController.kt [new file with mode: 0644]
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/recentbookmarks/interactor/RecentBookmarksInteractor.kt [new file with mode: 0644]
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/recentbookmarks/view/RecentBookmarkItemViewHolder.kt [new file with mode: 0644]
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/recentbookmarks/view/RecentBookmarksViewHolder.kt [new file with mode: 0644]
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlAdapter.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlInteractor.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlView.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/TabInCollectionViewHolder.kt
mobile/android/fenix/app/src/main/res/color/primary_state_button_text_color.xml [deleted file]
mobile/android/fenix/app/src/main/res/color/primary_state_title_text_color.xml [deleted file]
mobile/android/fenix/app/src/main/res/color/recent_bookmark_item_text_color.xml [deleted file]
mobile/android/fenix/app/src/main/res/layout/collection_home_list_row.xml
mobile/android/fenix/app/src/main/res/layout/component_recent_bookmarks.xml
mobile/android/fenix/app/src/main/res/layout/recent_bookmark_item.xml
mobile/android/fenix/app/src/main/res/layout/recent_bookmarks_header.xml
mobile/android/fenix/app/src/main/res/layout/recent_tabs_list_row.xml
mobile/android/fenix/app/src/main/res/values-night/colors.xml
mobile/android/fenix/app/src/main/res/values/colors.xml
mobile/android/fenix/app/src/main/res/values/dimens.xml
mobile/android/fenix/app/src/main/res/values/styles.xml
mobile/android/fenix/app/src/test/java/org/mozilla/fenix/components/bookmarks/BookmarksUseCaseTest.kt
mobile/android/fenix/app/src/test/java/org/mozilla/fenix/home/DefaultSessionControlControllerTest.kt
mobile/android/fenix/app/src/test/java/org/mozilla/fenix/home/HomeFragmentStoreTest.kt
mobile/android/fenix/app/src/test/java/org/mozilla/fenix/home/SessionControlInteractorTest.kt
mobile/android/fenix/app/src/test/java/org/mozilla/fenix/home/recentbookmarks/DefaultRecentBookmarksControllerTest.kt [new file with mode: 0644]
mobile/android/fenix/app/src/test/java/org/mozilla/fenix/home/recentbookmarks/RecentBookmarksFeatureTest.kt [new file with mode: 0644]
mobile/android/fenix/app/src/test/java/org/mozilla/fenix/home/recentbookmarks/view/RecentBookmarkItemViewHolderTest.kt [new file with mode: 0644]
mobile/android/fenix/app/src/test/java/org/mozilla/fenix/home/recentbookmarks/view/RecentBookmarksViewHolderTest.kt [new file with mode: 0644]