Comments (5)
That test passes with 1.6.0-alpha05 but fails in alpha06. The alpha06 build was the first to contain that change in the description so it does seem more likely that that is the issue: https://android.googlesource.com/platform/frameworks/support/+log/9ce75ea1baa2af10dda8f787f69c40c6654bcac1..91bb8c1f81dcb031bda00fcd8e55f1e890b56f06/compose/ui
from radiography.
It looks like you can access the composer via the androidx.compose.runtime.currentComposer
global val when in composition. A workaround would be to call currentComposer.collectParameterInformation()
in the setContent
block prior to adding any composables. I'm not quite sure what the holistic fix for this is but a few options come to mind:
- Document that this call must be made and add it to all tests
- Create a custom rule that calls this automatically
I wonder if this global val could also replace the reflection done in ComposeViews.tryGetLayoutInfos
to get the composer. Though I'm not sure the level of refactoring that would need to be done to do that as that would require a composable scope.
from radiography.
Discussed a bit offline. Radiography doesn't directly insert itself into the composition, so it's not easy to get the "current" composer in the general case. However, for this specific use case, inside a test, Radiography could probably provide a helper that would set things up correctly.
from radiography.
How could we make this work beyond tests? Can we grab the component from the compose view?
Also, @zach-klippenstein could this use case maybe be considered by the Compose team :) ? Is it really unreasonable to need access to an API that allows us to describe a compose hierarchy and export that somewhere?
from radiography.
Hi @zach-klippenstein, thanks for this great library!
I am also running into this issue of missing names with ui-tooling:^1.6.0
.
Is there any update or known workaround?
from radiography.
Related Issues (20)
- Run Compose Sample UI tests with min, max supported Compose versions in CI HOT 1
- Explore exposing InspectorInfo in the rendering/filtering API. HOT 1
- Consider supporting Compose for Desktop HOT 1
- Update compose to alpha08 (and kotlin 1.4.20)
- Migrate to CompositionInfo
- Version 2.0.0 is crashing HOT 7
- Fix threading ambiguity in ScanScopes.findRoots()
- Update maven publish plugin to work with kotlin 1.4.30
- Misleading subtitle (!?): Text-ray goggles for your Android views. HOT 2
- Two radiography core UI tests seem to be broken on API 30 HOT 3
- Consider showing InspectorInfo in the default output of compose nodes
- Snapshot testing HOT 1
- Filtering isn't working in the sample app
- Consider exposing bounds of ComposeView HOT 1
- Compose 1.4 breaks AndroidView parsing HOT 4
- Text values not written out in newer Compose (1.5.1) HOT 5
- Support publish no-op libraries HOT 1
- Scanning stops at subcomposition boundaries HOT 3
- Suitable to include in non-fatal tracking? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from radiography.