Skip to content

Completion of Mobility section separation in the Callouts section of Settings#201

Open
MBtheOtaku wants to merge 8 commits into
soundscape-community:mainfrom
MBtheOtaku:callout-separation-clean
Open

Completion of Mobility section separation in the Callouts section of Settings#201
MBtheOtaku wants to merge 8 commits into
soundscape-community:mainfrom
MBtheOtaku:callout-separation-clean

Conversation

@MBtheOtaku

Copy link
Copy Markdown
Contributor

Changes should be good hopefully. On my local testing the sections look correct in Settings storyboard

{59226D60-7533-4D0C-9E2C-7AF4C133AB63}

@steinbro steinbro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! There are still a few things to iron out before we can merge this; see my comments below.

Comment on lines +75 to +84
// Section Descriptions
private static let sectionDescriptions: [Section: String] = [
.general: "General settings for the app.",
.audio: "Control how audio interacts with other media.",
.callouts: "Manage the callouts that help navigate.",
.streetPreview: "Settings for including unnamed roads.",
.troubleshooting: "Options for troubleshooting the app.",
.about: "Information about the app."
// .telemetry: "Manage data collection and privacy."
]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These need to be defined as localizable strings rather than hard-coded, so that they will appear in the user's preferred language.

guard let sectionType = Section(rawValue: section) else { return nil }

if expandedSections.contains(section) {
return SettingsViewController.sectionDescriptions[sectionType]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would delete the referenced sectionDescriptions table and make the calls to GDALocalizedString here, like the next few lines do.

Comment on lines +244 to +254
@objc private func handleHeaderTap(_ gesture: UITapGestureRecognizer) {
guard let header = gesture.view as? UITableViewHeaderFooterView else { return }
let section = header.tag

if expandedSections.contains(section) {
expandedSections.remove(section)
} else {
expandedSections.insert(section)
}
tableView.reloadSections(IndexSet(integer: section), with: .automatic)
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not conceptually opposed to making the settings sections collapsible, but we need to take care that the interaction still makes sense for screen reader users. My inclination would be to leave it as a flat list at least for the purposes of this PR. Alternatively, @RDMurray could test to confirm the panel still behaves as expected with VoiceOver.

@JJGatchalian

Copy link
Copy Markdown
Contributor

I think you should remove the periods at the end of the callout descriptions in the localized strings. Soundscape will automatically put a comma after the hint so the period may clutter the punctuation. This will make it much easier for Voiceover users to read. The format template should be "Callout Type, Description, state". For example, the Safety callout with the period will look like this: "Safety, Potential hazards like steps and construction areas., on". If we remove the period it looks like this: "Safety, Potential hazards like steps and construction areas, on". Just follow the format of the existing callout descriptions, and you'll be fine.

@JJGatchalian

Copy link
Copy Markdown
Contributor

Thanks for the updates, but I wonder why your new commits didn't pass all the checks. It says 0/1 checks OK.

@RDMurray

Copy link
Copy Markdown
Contributor

The tests are still in progress.

@JJGatchalian

Copy link
Copy Markdown
Contributor

I've already translated all the callouts, hints, and footer descriptions into Spanish so I should be ready with Weblate after this gets merged. But if there's anything wrong with the text that you think should be changed, let's do so before merging. I'm curious, are these footer descriptions for sighted users to understand what the features do, and if so, does that mean that I won't be able to read them with Voiceover? Thanks.

@MBtheOtaku

Copy link
Copy Markdown
Contributor Author

They’re primarily just there as extra guidance for sighted users, but I believe VoiceOver will still announce them.

@JJGatchalian

Copy link
Copy Markdown
Contributor

Thanks, so if Voiceover can read the footers, does that mean that we have to turn on the Voiceover hints?

@MBtheOtaku

Copy link
Copy Markdown
Contributor Author

I don't believe so. Hopefully VoiceOver will naturally read them as you look into section's footer. I think you would only need to add an accessibility hint if you want that text to be announced as a hint on a particular control rather than as its own element.

@RDMurray

Copy link
Copy Markdown
Contributor

Sorry I took a while to get round to looking at this. I don't see the footers appearing on device. Is it possible they only show on the storyboard canvas? I'll attach a screenshot.

IMG_4753 IMG_4754

Given that they don't show, and don't actually add anything I think they should be removed.

It seems that the storyboard still has things relating to older versions of the app which are overridden in the ViewController such as the audio section.

Lets keep this
PR to just splitting the mobility category - I really want to migrate as much as possible to swiftUI in the future anyway which will be much simpler and more maintainable.

@JJGatchalian

Copy link
Copy Markdown
Contributor

Given that M hasn't separated the footers from this pull request yet, is there a way to get it separated out, like open another pull request with the exact same code minus the footers so that it could be merged? Then I could get to work on the Spanish.

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