Skip to content

Wire up settings URLs#11

Merged
TheRealAshik merged 1 commit into
developfrom
feat/open-settings-urls-11082377490145505425
May 16, 2026
Merged

Wire up settings URLs#11
TheRealAshik merged 1 commit into
developfrom
feat/open-settings-urls-11082377490145505425

Conversation

@TheRealAshik
Copy link
Copy Markdown
Owner

Wire up the Share Feedback, Get Help, Terms of Service, and Privacy Policy rows in Settings to open their respective URLs in the device browser using LocalUriHandler.


PR created automatically by Jules for task 11082377490145505425 started by @TheRealAshik

…ler` to open external URLs when users tap rows.\n- Implement open URL actions for Share Feedback, Get Help, Terms of Service, and Privacy Policy.
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot 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

This pull request implements functional links in the 'More Options' section of the Settings screen by utilizing LocalUriHandler to open external URLs for feedback, help, terms of service, and privacy policy. Feedback suggests centralizing the URI opening logic within a remembered helper function to provide robust error handling for cases where a browser might not be available. Additionally, it is recommended to move hardcoded URLs containing locale segments into string resources to better support internationalization.

LaunchedEffect(lifecycleState) {
if (lifecycleState == Lifecycle.State.RESUMED) viewModel.refresh()
}
val uriHandler = LocalUriHandler.current
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To improve robustness and reduce duplication, consider creating a remembered helper function to handle URI opening. This allows you to centralize error handling (e.g., catching exceptions if no browser is installed on the device) and makes the UI code cleaner.

Suggested change
val uriHandler = LocalUriHandler.current
val uriHandler = LocalUriHandler.current
val openUrl = remember(uriHandler) {
{ url: String ->
try {
uriHandler.openUri(url)
} catch (e: Exception) {
// TODO: Handle error gracefully (e.g., show a snackbar or log the error)
}
}
}

Comment on lines +125 to +128
SettingsRow(title = stringResource(Res.string.settings_share_feedback), onClick = { uriHandler.openUri("https://github.com/mobile/feedback") })
SettingsRow(title = stringResource(Res.string.settings_get_help), onClick = { uriHandler.openUri("https://support.github.com") })
SettingsRow(title = stringResource(Res.string.settings_terms_of_service), onClick = { uriHandler.openUri("https://docs.github.com/en/site-policy/github-terms/github-terms-of-service") })
SettingsRow(title = stringResource(Res.string.settings_privacy_policy), onClick = { uriHandler.openUri("https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement") })
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Use the openUrl helper function to handle URI opening with centralized error handling. Additionally, note that the documentation URLs for Terms of Service and Privacy Policy are hardcoded with the /en/ locale segment. To better support internationalization (i18n), consider moving these URLs to string resources (strings.xml) so that localized links can be provided for different languages.

Suggested change
SettingsRow(title = stringResource(Res.string.settings_share_feedback), onClick = { uriHandler.openUri("https://github.com/mobile/feedback") })
SettingsRow(title = stringResource(Res.string.settings_get_help), onClick = { uriHandler.openUri("https://support.github.com") })
SettingsRow(title = stringResource(Res.string.settings_terms_of_service), onClick = { uriHandler.openUri("https://docs.github.com/en/site-policy/github-terms/github-terms-of-service") })
SettingsRow(title = stringResource(Res.string.settings_privacy_policy), onClick = { uriHandler.openUri("https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement") })
SettingsRow(title = stringResource(Res.string.settings_share_feedback), onClick = { openUrl("https://github.com/mobile/feedback") })
SettingsRow(title = stringResource(Res.string.settings_get_help), onClick = { openUrl("https://support.github.com") })
SettingsRow(title = stringResource(Res.string.settings_terms_of_service), onClick = { openUrl("https://docs.github.com/en/site-policy/github-terms/github-terms-of-service") })
SettingsRow(title = stringResource(Res.string.settings_privacy_policy), onClick = { openUrl("https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement") })

@TheRealAshik TheRealAshik merged commit 183959a into develop May 16, 2026
3 of 4 checks passed
@TheRealAshik TheRealAshik deleted the feat/open-settings-urls-11082377490145505425 branch May 16, 2026 08:10
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.

1 participant