Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Support tab movement/reordering #22751

Merged
merged 50 commits into from
Dec 8, 2021
Merged

Conversation

csadilek
Copy link
Contributor

@csadilek csadilek commented Dec 8, 2021

This is to land #21157.

ssk97 and others added 30 commits September 5, 2021 00:10
Unfortunately I still need the filter passed around a bit
…e normal tabs

Don't go through LayoutManager needlessly
# Conflicts:
#	app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayInteractor.kt
# Conflicts:
#	app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayInteractor.kt
Also replaced Tab with TabSessionState in:
AbstractBrowserTrayList.kt, TabsTrayController.kt
…, fix tab positioning during movement

I'm forced to suppress LongParameterList to get the settings information where it needs to go though
…tead get settings from parent AbstractBrowserTrayList's context
Move drag transparency to start of drag
# Conflicts:
#	app/src/main/java/org/mozilla/fenix/tabstray/browser/AbstractBrowserTrayList.kt
@csadilek csadilek requested review from a team as code owners December 8, 2021 15:22
@pocmo pocmo added the pr:needs-landing-squashed PRs that are ready to land (squashed) [Will be merged by Mergify] label Dec 8, 2021
@pocmo
Copy link
Contributor

pocmo commented Dec 8, 2021

@Mergifyio refresh

@mergify
Copy link
Contributor

mergify bot commented Dec 8, 2021

refresh

✅ Pull request refreshed

@mergify mergify bot merged commit 6637f61 into mozilla-mobile:main Dec 8, 2021
@pocmo pocmo deleted the land-21157 branch December 8, 2021 17:10
pkirakosyan pushed a commit to gexsi/user-agent-android that referenced this pull request Mar 8, 2022
* 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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr:needs-landing-squashed PRs that are ready to land (squashed) [Will be merged by Mergify]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants