Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Ambients link now 404s, I don't think that term is current. #1094

Closed
4 tasks done
mathiastck opened this issue Mar 18, 2023 · 2 comments · Fixed by #1139
Closed
4 tasks done

[Bug]: Ambients link now 404s, I don't think that term is current. #1094

mathiastck opened this issue Mar 18, 2023 · 2 comments · Fixed by #1139
Assignees
Labels
bug Something isn't working

Comments

@mathiastck
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Is there a StackOverflow question about this issue?

  • I have searched StackOverflow

Is this an issue related to one of the samples?

  • Yes, this is a specific issue related to this samples repo.

Sample app

Jetchat

What happened?

This page:
https://github.com/android/compose-samples/tree/main/Jetchat

links to:
https://developer.android.com/reference/kotlin/androidx/compose/Ambient
which now 404s
Related text:
"
When the Emoji selector is shown, pressing back in the app closes it, intercepting any navigation events. This feature shows a way to integrate Compose and APIs from the Android Framework like OnBackPressedDispatcherOwner via Ambients. The implementation can be found in ConversationUiState.
"

Other links also 404:
https://github.com/android/compose-samples/blob/main/Jetchat/app/src/main/java/com/example/compose/jetchat/conversation/BackHandler.kt

I haven't seen this explicitly stated, but it appears Ambient has been removed/rename something else?

I found this:
https://lcdsmao.dev/jetpack-compose-what-is-the-difference-between-ambient-and-static-ambient/

describing what it was.

This seems related:
https://developer.android.com/jetpack/androidx/releases/compose-runtime

Renamed Ambients to match the Ambient -> CompositionLocal rename. Ambients used to be named AmbientFoo, now CompositionLocals are named LocalFoo. (I2d55d)

I found ambients in old sample code:
https://github.com/android/compose-samples/tree/main/Jetchat

Relevant logcat output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mathiastck mathiastck added bug Something isn't working triage me Issue that needs to be triaged labels Mar 18, 2023
@IanGClifton
Copy link
Contributor

Thanks for catching this! We need to update the Ambient link to the equivalent CompositionLocal link since that functionality was renamed for the 1.0 launch. It's probably worth us double-checking all the readme links since there have been a lot of updates since most of these samples were first written.

@IanGClifton IanGClifton removed the triage me Issue that needs to be triaged label Mar 28, 2023
@IanGClifton IanGClifton assigned astamato and unassigned riggaroo Mar 28, 2023
@stale
Copy link

stale bot commented May 27, 2023

This issue has been automatically marked as stale because it has not had any recent activity. Please comment here if it is still valid so that we can reprioritize it. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants