google / horologist

Horologist is a group of libraries that aim to supplement Wear OS developers with features that are commonly required by developers but not yet available.
https://google.github.io/horologist/
Apache License 2.0
560 stars 91 forks source link

Scrollbar not shown when navigating to a scrollable screen #1137

Closed tametter closed 7 months ago

tametter commented 1 year ago

When navigating to a screen, it would be great if it was possible to force show the scrollbar to indicate to the user that the content is scrollable. This should also work in case the content is loaded asynchronously.

yschimke commented 1 year ago

cc @BowerSteve any advice here?

BowerSteve commented 1 year ago

Hi - I don't think there's currently a way to force the PI to be shown initially with a ScalingLazyColumn (I seem to recall the UX spec was that it should not be shown until scrolling occurred). However, it's possible to provide a CustomPositionIndicatorState, like in this demo, which controls the Show/Hide visibility: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:wear/compose/integration-tests/demos/src/main/java/androidx/wear/compose/integration/demos/PositionIndicatorDemos.kt;l=216?q=file:wear%2Fcompose%20CustomPosition&sq=&ss=androidx%2Fplatform%2Fframeworks%2Fsupport

yschimke commented 1 year ago

Nice, I can add that. That might actually improve a bunch of things with how WearNavScaffold swaps the state.

I thought it was internal, because it's missing public. Is that an accidental ommission?

https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:wear/compose/compose-material/src/commonMain/kotlin/androidx/wear/compose/material/PositionIndicator.kt;l=123?q=PositionIndicatorState

@Stable
interface PositionIndicatorState {
BowerSteve commented 1 year ago

Functions are public by default in Kotlin - we normally state it explicitly in Wear/Material, but given that other libraries like Compose/Material omit it, we will also omit the 'public' in future APIs.

tdnghia98 commented 11 months ago

Hi, has there been any progress on this feature? My app has got rejected by Google due to missing scrollbar when user enters the screen

yschimke commented 11 months ago

When did this happen? That requirement has been removed, so shouldn't have happened this week.

Can you copy the full message?

JulienDev commented 11 months ago

Happened again to me today:

Issue found: Missing scrollbar Your app does not display the scroll bar when the user enters a scrollable view and/or when the user scrolls. For more information, see Show the scrollbar.

About the Wear App Quality Guidelines We do not accept apps into Wear OS that don't adhere to Wear App Quality Guidelines.

yschimke commented 11 months ago

It's likely a mistake in the text they sent. And only because of a screen with missing position indicator.

tdnghia98 commented 11 months ago

Sorry for the late reply. Here is the rejection message

image

I have then displayed the position indicator when entering the page and now they are challenging on other things. It means that this is really something that is taken into account during the approuval

Kpeved commented 7 months ago

ScrollBar should be showed by default in Wear Compose 1.4.0-alpha01