Commit Graph

32 Commits (437b188fe8e4c34022a6c71630fa1cea1234ae8b)

Author SHA1 Message Date
Ryan VanderMeulen 437b188fe8 Bug 1838903 - Fix Fenix formatting issues and update baseline 12 months ago
Roger Yang d8776a4c8e [fenix] Close https://github.com/mozilla-mobile/fenix/issues/24613: Remove history improvement feature flag 2 years ago
mcarare 932823c871 [fenix] For https://github.com/mozilla-mobile/fenix/issues/26844: Fix ktlint issues and remove them from baseline. 2 years ago
mike a 8e05fb3d63 [fenix] Revert "Closes https://github.com/mozilla-mobile/fenix/issues/24307: add synced history empty fragment, feature flag and history screen showing only local files 2 years ago
mike a 5c597031e3 [fenix] Closes https://github.com/mozilla-mobile/fenix/issues/26502: add isLocal parameter for history openItem telemetry event 2 years ago
mike a f70a6002f6 [fenix] Closes https://github.com/mozilla-mobile/fenix/issues/24307: add synced history empty fragment, feature flag and history screen showing only local files 2 years ago
mike a e076435191 [fenix] Closes https://github.com/mozilla-mobile/fenix/issues/24276: moved getHistory() to suspend 2 years ago
mike a 3bbd8d2571 [fenix] Closes https://github.com/mozilla-mobile/fenix/issues/24276: updating pagination library, changing history related classes 2 years ago
mike a a0651401f7 [fenix] Closes https://github.com/mozilla-mobile/fenix/issues/23517: history items are not being removed after deletion 2 years ago
Roger Yang d14ce03e37 [fenix] Close https://github.com/mozilla-mobile/fenix/issues/23894: Simplify distinct history algorithm 2 years ago
Roger Yang 96d0dfae36 [fenix] No issue: Remove showHistorySearchGroups feature flag 2 years ago
mcarare 94e5e66315 [fenix] Set a minimum number of sites a search group should contain. 2 years ago
Roger Yang 1b420ea198 [fenix] Close https://github.com/mozilla-mobile/fenix/issues/23250: Remove duplicate sites within a time period in history 2 years ago
Grisha Kruglov c367072d11 [fenix] Refactor History types to eliminate nullability
This introduces a separate HistoryDB type at the PagedHistoryProvider
layer, that doesn't need to deal with positions. Positioning logic in
HistoryDataSource becomes a type conversion between the new type and an
existing History type that UI and ItemKeyedDataSource API is written against.

With this refactor, we entirely eliminate nullability from these types.
3 years ago
Grisha Kruglov b13e149900 [fenix] Closes https://github.com/mozilla-mobile/fenix/issues/22764: Convert History.id to an Int position
We were converting Long timestamps into Ints (and getting negative
numbers back), and treating that as, basically, a position for the
paging API; the paging API would pass us back the obscure negative
number back as an offset, and we'll mishandle it resulting in an
infinite loop.

This patch removes all of the Long -> Int conversions, and introduces an
explicit 'position' that is calculated once we have a full page of
results completed.
3 years ago
Grisha Kruglov ca22bb6ceb [fenix] Closes https://github.com/mozilla-mobile/fenix/issues/22499: Emit search group disband action on history group removal
This is needed to prevent removed search groups from coming back after
user interacts with the tab. E.g. if we don't fire this action, upon
interaction with the tab after a corresponding search group was removed
we will end up creating metadat with the deleted 'searchTerms' (they'll
be read from the 'historyMetadata' state on the tab).

At this point we probably want to start encapsulating all of this in a
use case - let's do that separately in
https://github.com/mozilla-mobile/android-components/issues/11309, and
just fix the bug for now.
3 years ago
Arturo Mejia 5737a5533c [fenix] For issue https://github.com/mozilla-mobile/fenix/issues/5298 the same page appears in the History section multiple times 3 years ago
Grisha Kruglov 77f35fd757 [fenix] Post: move group removal logic into PagedHistoryProvider
This moves the group removal logic to the place where the groups are
actually formed. This helps clean-up the fragment code a bit, and
removes the awkward 'allow mutate some random internal state' API from
the provider.
3 years ago
Grisha Kruglov fc7e707538 [fenix] Closes https://github.com/mozilla-mobile/fenix/issues/22472: Filter out redirects from History search groups 3 years ago
Grisha Kruglov 6f1ba6ca6b [fenix] No issue: clean up code duplication in PagedHistoryProvider 3 years ago
Grisha Kruglov 31c2c7bf12 [fenix] No issue: history view search group missing
Our boundary conditions for matching search groups to visits was wrong.

This change switches the boundary buffer to only be applied to history
items, not the metadata items.

In other words, when checking if any of the metadata items match the
current "page" of history, we'll be looking to see if the item falls
within this time window:
buffer - oldest history item <= metadata item <= newest history item +
buffer

There's a separate problem with buffer though: it's reset to 0 when requested
offset is >0, but that requires a larger refactor of this code, for a
separate PR.
3 years ago
Grisha Kruglov ef375069eb [fenix] Closes https://github.com/mozilla-mobile/fenix/issues/22083 - Match history groups to history pages by all items within the group
When deciding if we should include a history group within the "page of
history" results on the History View UI, we used to look at the most
recent timestamp of the metadata items within the group, and see if that
falls within the range of the timestamps of the history page, +/- some
buffer.

This assumes that each metadata entry will have a corresponding history
item. However, that's not true - when restarting the app, the selected
tab will be restored, and when opening History View right after we'll
record some metadata for it. However, we won't record a history visit
during the app restore for the selected tab.

That's all correct, but the assumption around group matching to history is now incorrect.

This patch changes the logic to instead look at every item within the
group, and see if any of them match the time window of the current
history page. This has a side-effect of also displaying search groups
multiple times on diffenent pages of history, if it makes sense to do so chronologically.
I think that's fine, it reflects reality at least (e.g. items within the
group may have been visited at very different points in time).

Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
3 years ago
Christian Sadilek c1f2c33a76 [fenix] Make search term grouping tolerant to (parent tab) navigation
Co-authored-by: Grisha Kruglov <gkruglov@mozilla.com>
3 years ago
Gabriel Luong 4d23db624f [fenix] For https://github.com/mozilla-mobile/fenix/issues/21551 - Add delete history metadata in the History view
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
3 years ago
Christian Sadilek c9e1bfe3dc [fenix] Fix mapping between history visits and groups to use createdAt
We currently have a 15s buffer to match metadata to its corresponding
visit. However, a existing metadata record can be updated more than
15s after it was created e.g. when closing the tab and updating
the view time.
3 years ago
Christian Sadilek a6a6b6f257 [fenix] For https://github.com/mozilla-mobile/fenix/issues/20893: Dedupe urls/site in history groups 3 years ago
Gabriel Luong e3bc494414 [fenix] Issue https://github.com/mozilla-mobile/fenix/issues/21117 - Modify layout for items displayed under "Recently Visited" in the HomeScreen to follow latest UX designs 3 years ago
Gabriel Luong bc30e53e5d [fenix] For https://github.com/mozilla-mobile/fenix/issues/21408 - Pass the corresponding HistoryMetadataKey to openToBrowserAndLoad and addTab use case 3 years ago
Gabriel Luong 793ceb8e28 [fenix] For https://github.com/mozilla-mobile/fenix/issues/20893 - Search term groups in history 3 years ago
MarcLeclair 78850c7e3d [fenix] 15278 detekt rule runblocking (https://github.com/mozilla-mobile/fenix/pull/15942)
* For https://github.com/mozilla-mobile/fenix/issues/15278: added CoroutineManager to count runBlocking calls

* For https://github.com/mozilla-mobile/fenix/issues/15278: Added actual detekt rule for runblocking and its config to the yaml

* For https://github.com/mozilla-mobile/fenix/issues/15278: Added unit test for RunblockingCounter

* For https://github.com/mozilla-mobile/fenix/issues/15278: renamed StrictModeStartupSuppressionCountTest.kt to PerformanceStartupTest.kt and added runBlockingCount test

* Lint fix

* For https://github.com/mozilla-mobile/fenix/issues/15278: made runblocking a Long to prevent overflow

* For https://github.com/mozilla-mobile/fenix/issues/15278: fixed MozRunblocking name, description and moved RunBlockingCounter to perf package

* For https://github.com/mozilla-mobile/fenix/issues/15278:Renamed MozillaRunblockingCheck to MozillaRunBlockingCheck

* For https://github.com/mozilla-mobile/fenix/issues/15278: Added setup for unit test, since it failed without restting counter

* For https://github.com/mozilla-mobile/fenix/issues/15278: Fixed naming for RunBlocking lint check

* For https://github.com/mozilla-mobile/fenix/issues/15278: removed changes made to test to use runBlockingIncrement

* For https://github.com/mozilla-mobile/fenix/issues/15728: added test exclusion for runBlocking check

* For https://github.com/mozilla-mobile/fenix/issues/15278: changed null check and added Synchronized to count setter

* For https://github.com/mozilla-mobile/fenix/issues/15278: fix for nits

* For https://github.com/mozilla-mobile/fenix/issues/15278: added StartupExcessiveResourceUseTest to CODEOWNERS

* For https://github.com/mozilla-mobile/fenix/issues/15278: fixed for nits

* For https://github.com/mozilla-mobile/fenix/issues/15278: Moved increment function to extension function and fixed indentation

* For https://github.com/mozilla-mobile/fenix/issues/15278: Added tests for Atomic Integer extension and nit fix
4 years ago
Tiger Oakes 6bff47c3c5 [fenix] Test paged history provider 4 years ago
ekager cfda0676e7 [fenix] For https://github.com/mozilla-mobile/fenix/issues/4137 - Adds pagination to the history view 5 years ago