Commit Graph

16 Commits

Author SHA1 Message Date
Jonathan Almeida ef2af26b69 Bug 1795105: Remove usages of ContentState.thumbnail 2022-11-03 13:56:42 +00:00
DreVla bc76907605 For #10344 - Enable tab reordering in beta/release 2022-11-01 12:11:42 +00:00
sarah541 8ac2dc317b Truncate urls to prevent slowing down of UI 2022-10-20 03:55:56 +00:00
mcarare ffcef5ff2e For #26844: Fix ktlint issues and remove them from baseline. 2022-09-09 16:52:09 +00:00
Noah Bond 7e59a644d5 For #21898 - Remove search term tab groups from the Tabs Tray 2022-07-19 16:59:57 +00:00
Arturo Mejia 5f1448460e For #21894: Move Tabs Tray to compose: Individual tab viewholders: ListViewHolder. 2022-06-27 21:27:55 +00:00
Alexandru2909 f170772f0c For #24599 - Remove Event.wrapper for Tab telemetry 2022-04-08 10:35:44 +00:00
Alexandru2909 740566992a For #24099 - Remove Event.wrapper for Collections telemetry 2022-04-01 06:59:55 +00:00
Alexandru2909 d7803e6dc7 For #14954 - Use TabSessionState.id to check if tab is selected 2022-02-09 09:04:08 +00:00
Jonathan Almeida 01ba8959ce Issue #22757: Check the parent cast to AbstractBrowserTrayList first
We re-use the same ViewHolders in search term groups, so when we need to
cast to a AbstractBrowserTrayList for tab reordering, we need to check
our parent correctly first.
2021-12-08 23:54:46 +00:00
Christian Sadilek 6637f61088
Support tab movement/reordering (#22751)
* Adds basic support for tab reordering via drag-and-drop selected tabs

* ktlint/detekt formatting

* Use defaultTabsFilter (now not private) instead of getter

* Convert from position+filter API to target+placeAfter
Unfortunately I still need the filter passed around a bit

* Handle inactive tabs' holder being children of the RecyclerView of the normal tabs
Don't go through LayoutManager needlessly

* Non-working use tabID the whole way. Does not compile.

* Fix to do direct tab ID and use grid setting directly

* Remove non-null assertion. Now fully works for "other" tabs.

* Prevent grouped tabs from being dragged

* Remove unused import

* Add/fix comments

* Do API version check and use deprecated startDrag if too old.

* Build process fails: both outdated and too new, so reverting to just too new

* Use deprecated function and suppress warning

* fix space

* Suppress "TooManyFunctions" on DefaultTabsTrayController

* Repeatedly update tab movement during drag

* Remove multi-tab movement, only allow dragging if tab groups disabled, fix tab positioning during movement
I'm forced to suppress LongParameterList to get the settings information where it needs to go though

* Remove settings argument and corresponding long args suppression: instead get settings from parent AbstractBrowserTrayList's context

* New UI: Select a tab and then, while holding down, start dragging

* Revert to using before/after boolean to accomodate delays
Move drag transparency to start of drag

* Use new BlankDragShadowBuilder and DraggableItemAnimator to handle tab movement

* Replace Pair<>s with data classes

* Only drag if exactly 1 tab selected, don't consume drag event if not used

* Auto-scroll tab tray while dragging near top/bottom edge

* Remove unexpected scrolling on tab bind (triggered when tab is selected)

* Fix broken scroll behavior during dragging

* Cleanup for ktlint/detekt

* Constantly set elevation during drag in case of update
Clean code at drag start

* Add custom drag start behavior

* Add drag distance constant, do all touch-drag behavior in OnTouchListener

* Disable parent vertical scrolling on drag start, fix detekt ComplexCondition

* Minor cleanup/comments

* Revert removal of scroll on bind, this was related to something different

* Correction to prepareForDrop to match documentation- doesn't seem to have any effect

* Simplify via unchecked typecast, use ViewCompat

* Use ViewConfiguration.scaledTouchSlop instead of arbitrary 30px

* Added tabReorderingFeature flag, split drag interactor to separate function to satisfy complexity requirement

Co-authored-by: Steven Knipe <ssk97@case.edu>
Co-authored-by: ssk97 <knipesteven@gmail.com>
Co-authored-by: Sebastian Kaspari <s.kaspari@gmail.com>
2021-12-08 16:36:49 +00:00
Gabriel Luong 660300f770 For #21776 - Replace 'isEmpty' with 'ifEmpty' 2021-10-26 18:26:50 +00:00
Jonathan Almeida 7666f0e4c2 No issue: Replace TabsTray.Tab with TabSessionState
Co-authored-by: Arturo Mejia <arturomejiamarmol@gmail.com>
2021-10-26 01:57:47 +00:00
Mugurell 09e8d34c26 For #20507 - Inactive tabs telemetry
Two new events are added:
- "inactive_tabs_expanded" for when the inactive tabs section is expanded
- "inactive_tabs_collapsed" for when the inactive tabs section is collapsed

For tracking when an inactive tab is opened / closed I've repurposed the
existing tabs tray telemetry (since the functionality uses the same code)
- tabs_tray.opened_existing_tab
- tabs_tray.closed_existing_tab
to support an extra "source" key indicating the feature from which a tab was
opened or closed. The current values for this new key are:
- "Tabs tray" for when a tab was opened/closed from tabs tray
- "Inactive tabs" for when a tab was openes/closed from the Inactive tabs
section of the tabs tray.
2021-08-24 12:10:58 +00:00
codrut.topliceanu bf5b4a5655 For #17917: Use View binding in tabs tray 2021-08-20 14:18:39 +00:00
Jonathan Almeida bd753d3f94 Issue #19002: Correct browser viewholder naming 2021-05-11 19:40:14 +04:00