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

Migrated ActionSystem to Compose Traversal API & UiDataProvider API #532

Merged
1 commit merged into from
Aug 20, 2024

Conversation

ghost
Copy link

@ghost ghost commented Aug 9, 2024

The api now looks like this:

val state = rememberTextFieldState("")
TextField(
    state = state,
    modifier = Modifier
        .width(200.dp)
        .provideData {
            set(ActionSystemTestAction.COMPONENT_DATA_KEY, "TextField")
            lazy(ActionSystemTestAction.COMPONENT_DATA_KEY) { 
                Math.random().toString()
            }
        },
    placeholder = { Text("Write something...") },
)

Let me know if the api can be improved somehow. ComponentDataProviderBridge is no longer public as it requires instance of JewelComposePanel and Swing level nesting. If there is reasonable use-case for this, we can make it public again.

@ghost ghost requested review from rock3r and Walingar August 9, 2024 11:05
@ghost ghost self-assigned this Aug 9, 2024
Copy link
Collaborator

@rock3r rock3r left a comment

Choose a reason for hiding this comment

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

Kuba, can we move the interfaces/modifier definition to the UI package and have a dummy no-op implementation in the standalone package? Otherwise we're creating a bridge-only API.

(I am aware this was only in the bridge to begin with, but it was never really used/supported before, and we're here to change that)

@ghost ghost force-pushed the action-system-upgrade branch 2 times, most recently from 0bd0dda to 6de2103 Compare August 13, 2024 13:12
@ghost ghost force-pushed the action-system-upgrade branch from 6de2103 to 9fe6108 Compare August 14, 2024 08:11
Copy link
Collaborator

@rock3r rock3r left a comment

Choose a reason for hiding this comment

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

If you can confirm the APIs can now be used from standalone code too (they will be no-op, that's fine) this is good to go for me

@ghost ghost merged commit 9e136d9 into main Aug 20, 2024
3 checks passed
@ghost ghost deleted the action-system-upgrade branch August 20, 2024 11:06
This pull request was closed.
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.

3 participants