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

Add id key to plugins and add to connection info #1385

Open
joshuayoes opened this issue Dec 20, 2023 · 2 comments
Open

Add id key to plugins and add to connection info #1385

joshuayoes opened this issue Dec 20, 2023 · 2 comments
Labels
request 👍 I would like this to be a thing.

Comments

@joshuayoes
Copy link
Contributor

Currently in reactotron-core-client, we keep track of what plugins are loaded:
https://github.com/infinitered/reactotron/blob/master/lib/reactotron-core-client/src/reactotron-core-client.ts#L184

However, we do not have the names of the plugins that are loaded: just the features and callbacks.

When we call .connect(), we send information about the connection over to reactotron-app
https://github.com/infinitered/reactotron/blob/master/lib/reactotron-core-client/src/reactotron-core-client.ts#L291-L297

We should add id as a field to plugins with their name so that reactotron-app can be customized based on what plugins are configured in the client. This would unblock this issue #1345 (comment)

@joshuayoes joshuayoes added the request 👍 I would like this to be a thing. label Dec 20, 2023
@frankcalise
Copy link
Contributor

Curious, could we also rework things so we can infer this block of plugins from the ones that actually do connect?
https://github.com/infinitered/reactotron/blob/master/lib/reactotron-core-client/src/reactotron-core-client.ts#L126-L134

Kind of feels funny that we have to provide all of the possible ones up front (with this source coming from reactotron-core-client and not the plugin library itself) and then also provide the plugins we decide to use on the client side via the use calls.

@joshuayoes
Copy link
Contributor Author

We do infer the plugins. By default, core client has all the core plugins then adds on new client features from use() calls: https://github.com/infinitered/reactotron/blob/master/lib/reactotron-core-client/src/reactotron-core-client.ts#L116

You can see this in Ignite because we have reactotron-react-native do the same thing. We have the base type as a nice feature and then new plugins get added.

Screenshot 2023-12-21 at 3 24 58 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request 👍 I would like this to be a thing.
Projects
None yet
Development

No branches or pull requests

2 participants