-
Notifications
You must be signed in to change notification settings - Fork 949
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
Fix: Tab switcher UI issues #5736
base: develop
Are you sure you want to change the base?
Conversation
This reverts commit 25987d5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've noticed that in some instances we animate to the selected tab rather than being on it immediately. I need to look into how to reproduce.
Screen_recording_20250306_093644.mp4
@@ -92,6 +92,18 @@ | |||
app:layout_constraintStart_toStartOf="parent" | |||
app:layout_constraintTop_toBottomOf="@id/title" /> | |||
|
|||
<ImageView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓Why do we need a new ImageView to load the dax logo into? What was stopping us from using the existing tabPreview ImageView and adjusting as needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The webpage previews need to use matrix scaling, which doesn't work for the logo. I thought it'd be complicating things trying to change it on the fly when views are recycled. But after giving it another thought it's not that bad: Use a single ImageView for all tabs
@@ -219,6 +219,7 @@ open class BrowserActivity : DuckDuckGoActivity() { | |||
if (wasSwipingStarted) { | |||
wasSwipingStarted = false | |||
|
|||
currentTab?.onTabSwipedAway() | |||
viewModel.onTabsSwiped() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡Could we not make this part of onTabPageSwiped? Feels like this belongs there as well
app:layout_constraintHorizontal_bias="0.0" | ||
app:typography="h5" | ||
tools:text="Slashdot" /> | ||
tools:text="Slashdot test tes tes tes tes tes tew tes tes tes tes tes tes tes" /> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍Maybe we can reduce this a bit? 😅
android:layout_marginEnd="7dp" | ||
android:layout_marginBottom="10dp"> | ||
android:layout_marginHorizontal="@dimen/keyline_2" | ||
android:layout_marginVertical="6dp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed on MM, it's probably worth following up and finding out why our List item does not currently match the designs and if there is any good reason why 👍
app:layout_constraintTop_toTopOf="parent" /> | ||
android:src="@drawable/ic_dax_icon" | ||
android:layout_marginStart="@dimen/keyline_2" | ||
app:layout_constraintTop_toTopOf="@id/close" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓Shouldn't this be keyline_3 (12dp)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. It seems like the 12dp margin in the spec is used to compensate for the narrow icon used. Yes. Fixed.
Task/Issue URL: https://app.asana.com/0/1207418217763355/1209581022862153
Description
This PR fixes a couple of minor UI issues in the tab switcher:
Steps to test this PR
Tab switcher item layout
Tab switcher item layout
Tab preview image