Skip to content

Conversation

@bjorkert
Copy link
Contributor

@bjorkert bjorkert commented Jul 2, 2025

This pull request addresses a minor UX issue where the selection screen wouldn't automatically focus on the currently selected tone, as the list always displayed from the top.

Background

As Lauren Kristie pointed out:

"When I pick an alarm sound, it auto scrolls to the top of the list. So if I’m looking for one I like for that alarm, I have to scroll back down to it."

This required users to manually scroll to find their currently selected tone if it was not visible at the top of the list.

Changes

To fix this, the TonePickerSheet has been updated:

  • The List is now wrapped in a ScrollViewReader.
  • An .onAppear modifier has been added to the List to programmatically scroll to the currently selected tone when the view loads.
  • The scroll anchor is set to .center to ensure the selected item is clearly visible.

This creates a smoother and more intuitive user experience, directly addressing the feedback. 🎵

@bjorkert bjorkert requested a review from marionbarker July 2, 2025 12:44
Copy link
Collaborator

@marionbarker marionbarker left a comment

Choose a reason for hiding this comment

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

Code review

Changes look appropriate.

Test

The displayed alarms start at the top of the list when building without this PR.

The displayed alarms start with the currently selected alarm in the middle of the screen when building with this PR.

  • The alarms continue to be displayed in alphabetical order for selection.

  • Confirm that choosing a new alarm sound modifies the alarm sound as expected and that the new alarm sound is in the middle of the screen as expected.

@marionbarker marionbarker merged commit fca6664 into dev Jul 2, 2025
@marionbarker marionbarker deleted the auto-scroll-to-selected-tone branch July 2, 2025 15:26
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.

3 participants