Skip to content

feat: DCMAW-17333 create left aligned screen v3#396

Closed
JacksonJ2W wants to merge 7 commits into
mainfrom
feat/DCMAW-17333-create-left-aligned-v3-talkback-fix
Closed

feat: DCMAW-17333 create left aligned screen v3#396
JacksonJ2W wants to merge 7 commits into
mainfrom
feat/DCMAW-17333-create-left-aligned-v3-talkback-fix

Conversation

@JacksonJ2W

@JacksonJ2W JacksonJ2W commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

DCMAW-17333: create Left Aligned Screen v3

Ticket

  • Start with copy of Left Aligned Screen
  • Change LazyColumn to Column
  • Remove item wrapping over elements that are only compatible with LazyColumn
  • Update deprecated usages of UI elements
  • Update default colour for divider

Evidence of the change

Note: this evidence is applied to the Wallet DocumentInformationScreen but these changes are just here to highlight behaviour, and are not production changes

Defective Talkback Fixed Talkback Scrolling Behaviour
17333Defect.mp4
17333Fix.mp4
17333EvidenceDoesntBreakScrollingCompressed.mp4

Checklist

Before creating the pull request

  • Commit messages that conform to conventional commit messages.
  • Ran the app locally ensuring it builds.
  • Tests pass locally.
  • Pull request has a clear title with a short description about the feature or update.
  • Created a draft pull request if it's not ready for review.

Before the CODEOWNERS review the pull request

  • Complete all Acceptance Criteria within Jira ticket.
  • Self-review code.
  • Successfully run changes on a testing device.
  • Complete automated Testing:
    • Unit Tests.
    • Integration Tests.
    • Instrumentation / Emulator Tests.
  • Review Accessibility considerations.
  • Handle PR comments.

Before merging the pull request

@JacksonJ2W JacksonJ2W requested review from a team as code owners February 23, 2026 10:38
@JacksonJ2W JacksonJ2W force-pushed the feat/DCMAW-17333-create-left-aligned-v3-talkback-fix branch from 8dabcad to 135eca4 Compare February 23, 2026 10:41
@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

fun LeftAlignedScreenV3(
title: @Composable (horizontalPadding: Dp) -> Unit,
modifier: Modifier = Modifier,
body: @Composable ((horizontalItemPadding: Dp) -> Unit)? = null,

@jonnyandrew jonnyandrew Feb 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm concerned about removing the lazy-list performance optimisation. The reason being, this pattern needs to work performantly with long screens potentially with lots of images (example of a longer style screen).

Did we look into other ways to achieve this using Modifier.semantics configuration?

Also, taking a step back, are we sure we don't want the default talkback 'in-list' announcements that we get with the lazy list? In other areas (e.g. screen reader pronounciation) we prefer the defaults even though they seem unintuitive.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The 'in-list' announcements are supposed to be for user facing lists, where they make sense, and less for areas where we have just used lazy-lists for other reasons (performance, convenience, etc).

I would argue that our accessibility requirements out-weigh the performance requirements, but I guess a compromise would be a variation on the LeftAlignedScreen instead of a complete replacement deprecating the old version?

My understanding is that the performance increases for using lazy-list is generally beneficial for things where the numbers enter the hundreds and / or have perpetual scrolling, and not a finite number making the screen long, but I could be wrong. In XML I definitely would have used a RecyclerView, but we had more control over the accessibility stuff.

@jonnyandrew jonnyandrew Feb 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah, the lazy scrolling is essential when there are hundreds of items or endless scroll. Up until now LeftAlignedScreen doesn't need to cope with that.

Having said that, the Compose Lists docs mention that Column is for use cases that don't require any scrolling and that we should consider using lazy lists in situations where we have an unknown number of items.

If we were to stick with lazy for any scrolling content, we know that we're doing the best we can to support cheaper, low powered devices with small screens (which is also an accessibility/inclusion concern).

Before we commit to an approach - do you mind if we see if there's anything we can do using the semantics config?

I discovered there's a CollectionInfo semantics property that lets us set the number of items in lists. In my testing I set rowCount to 0 and that seems to remove all the list announcements.

LazyColumn(
    modifier = Modifier.semantics {
        collectionInfo = CollectionInfo(rowCount = 0, columnCount = 0)
    }
) { ... }

If that works, maybe we can satisfy both performance and accessibility?

@jonnyandrew jonnyandrew Feb 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Edited: for this to work, rowCount needs to be 0, not -1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If collectionInfo is satisfying all new a11y requirements for wallet, yes - it's preferred and simpler change. Otherwise, we might have 2 versions of layout: one based on simple column, second on lazy column. (LeftAlignedScreenV3 and LazyLeftAlignedScreenV3?)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've tested with LeftAlignedScreen and

LazyColumn(
    modifier = Modifier.semantics {
        collectionInfo = CollectionInfo(rowCount = 0, columnCount = 0)
    }
) { ... }

Result: in list is still announced, the same to @JacksonJ2W results.

@jonnyandrew jonnyandrew Feb 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've just tried making the change in LeftAlignedScreen and tested (with rowCount = 0) and it seems to work:

Before

Screen_recording_20260223_152647.webm

After

Screen_recording_20260223_153400.webm

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh yes you're totally right, setting to 0 instead of -1 does work, sorry I misread your message earlier.
This would save a lot of time! Thanks @jonnyandrew

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@JacksonJ2W @jonnyandrew I've tested with a new LazyColumn and collectionInfo configured with zeroes -> there is no extra in list.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry, I'd originally written -1 before editing it. Sorry about that confusion!

@JacksonJ2W

Copy link
Copy Markdown
Contributor Author

Closing as setting collection info to "0" instead of "-1" achieves the talkback behaviour without sacrificing LazyList behaviour

@JacksonJ2W JacksonJ2W closed this Feb 23, 2026
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.

4 participants