Skip to content
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

Update Uamp Player Screen bottom buttons layout #2407

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

rajat4064g
Copy link
Collaborator

WHAT

Update Uamp Player Screen for two buttons and app icon layout at the bottom

WHY

HOW


SettingsButtonsDefaults.BrandIcon(
modifier = Modifier
.align(Alignment.Bottom)
.weight(1f)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why weight and size?

@yschimke
Copy link
Collaborator

Can we make sure this is covered by some sort of screenshot test? or is it already and there is no layout change?

import org.robolectric.annotation.Config
import kotlin.time.Duration.Companion.seconds

class UampMediaPlayerA11yScreenshotTest : WearLegacyA11yTest() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why A11y test? Shoudl it just be a normal screenshot test?

@yschimke
Copy link
Collaborator

yschimke commented Oct 1, 2024

This seems like a bigger change now, is it worth changing the title?

@yschimke yschimke closed this Oct 1, 2024
@yschimke yschimke reopened this Oct 1, 2024
@yschimke
Copy link
Collaborator

yschimke commented Oct 1, 2024

Closing and reopening to trigger a build.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an empty text here? Is that deliberate?

textAlign = textAlign,
followGap = followGap,
startGap = startGap,
startEdgeGradientWidth = edgeGradientWidth,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this also set endEdgeGradientWidth?

@ExperimentalHorologistApi
@Composable
public fun MarqueeText(
text: String,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a lot of new forms of this method, if this is a more advanced form and we want to keep the existing simpler forms, should we only add the AnnotatedString version?

method @androidx.compose.runtime.Composable @com.google.android.horologist.annotations.ExperimentalHorologistApi public static void MarqueeText(String text, optional androidx.compose.ui.Modifier modifier, optional long color, optional androidx.compose.ui.text.TextStyle style, optional int textAlign, optional float followGap, optional float edgeGradientWidth, optional float marqueeDpPerSecond, optional long pauseTime);
method @androidx.compose.runtime.Composable @com.google.android.horologist.annotations.ExperimentalHorologistApi public static void MarqueeText(androidx.compose.ui.text.AnnotatedString text, optional androidx.compose.ui.Modifier modifier, optional java.util.Map<java.lang.String,androidx.compose.foundation.text.InlineTextContent> inlineContent, optional long color, optional androidx.compose.ui.text.TextStyle style, optional int textAlign, optional float followGap, optional float startGap, optional float startEdgeGradientWidth, optional float endEdgeGradientWidth, optional float marqueeDpPerSecond, optional long pauseTime);
method @androidx.compose.runtime.Composable @com.google.android.horologist.annotations.ExperimentalHorologistApi public static void MarqueeText(androidx.compose.ui.text.AnnotatedString text, optional androidx.compose.ui.Modifier modifier, optional java.util.Map<java.lang.String,androidx.compose.foundation.text.InlineTextContent> inlineContent, optional long color, optional androidx.compose.ui.text.TextStyle style, optional int textAlign, optional float followGap, optional float startGap, optional float edgeGradientWidth, optional float marqueeDpPerSecond, optional long pauseTime);
method @androidx.compose.runtime.Composable @com.google.android.horologist.annotations.ExperimentalHorologistApi public static void MarqueeText(String text, optional androidx.compose.ui.Modifier modifier, optional long color, optional androidx.compose.ui.text.TextStyle style, optional int textAlign, optional float followGap, optional float startGap, optional float startEdgeGradientWidth, optional float endEdgeGradientWidth, optional float marqueeDpPerSecond, optional long pauseTime);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we think the new form with separate startGap, startEdgeGradientWidth, endEdgeGradientWidth is the right general form, then we should either

a) Remove the old form.
b) Leave them for compatibility, maybe deprecated.

As in the old methods are gone, since you have changed the params, added startGap.

WearDeviceScreenshotTest(device = device) {

@Test
fun nothingPlayerScreen() = runTest {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth combining this into the test above? Just different test methods, both part of UampMediaPlayerScreenshotTest?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this dangerously close to clipping? intended?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clipping

)
horizontalArrangement = Arrangement.Center,
) {
Text(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be Text? or can now just be an Icon?

)
MarqueeText(
text = currentTitle.orEmpty(),
startGap = if (titleIcon != null) 8.dp else 0.dp,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does startGap really need to be part of MarqueeText? or could it be a Spacer in this Row?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure this startGap is really needed? is this not just the startEdgeGradientWidth?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants