Skip to content

Create internal Modifier.testTag #619

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

Merged
merged 3 commits into from
Jan 5, 2025

Conversation

EpicDima
Copy link
Contributor

@EpicDima EpicDima commented Jan 4, 2025

I've made it internal at the moment, since NodeSnapshots is still inside :mosaic-runtime, and therefore Modifier.testTag simply cannot be used outside of this module without some kind of extension of the Mosaic interface, which I'm not sure about right now.
This can be done through the extension function, which will check the Mosaic type for MosaicComposition and then search for the desired node...

The Compose UI uses SemanticsModifier and a number of other things that are used not only for TestTag, but also many other things. The most interesting thing for us there besides TestTag is Text, so in order not to drag a bunch of code, which is not at all necessary right now, plus integration is not easy, I decided to do it in a simple way.


  • CHANGELOG.md's "Unreleased" section has been updated, if applicable.

@JakeWharton
Copy link
Owner

Haven't looked at the PR yet, but we'll eventually need some kind of Espresso like testing API so we'll need this for node selection. I have no plans to expose any kind of node directly, though. I don't believe we need a public semantic tree either.

@JakeWharton JakeWharton enabled auto-merge (squash) January 5, 2025 04:34
@JakeWharton JakeWharton merged commit 3db278c into JakeWharton:trunk Jan 5, 2025
12 checks passed
@EpicDima EpicDima deleted the epicdima/test_tag_2 branch January 5, 2025 14:38
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.

2 participants