Skip to content

Conversation

matt-oakes
Copy link
Contributor

This PR follows on from a previous discussion: #1653

This change splits out the main logic from the Redux Devtools App into a new core package but keeps the socket connection management in @redux-devtools/app. The aim is to allow for easier reuse of the rest of the app in other envioronments with their own transport methods, such as React Native or Electron.

The goal of this PR is that nothing will change for users of the @redux-devtools/app package. It re-exports all of the exports from @redux-devtools/app-core so everything that was previously available still is.

The majority of the PR is just moving files and changes to imports. Some changes needed to be made to allow for some actions, reducers, and middleware to be kept in @redux-devtools/app rather than moved to @redux-devtools/app-core. These are anything which relates to the management of the socket connection.

There is also a new prop on the App component which allows adding additional settings panels. This is used to add the "Connection" settings component, but not include it in the core package as it's specifically socket related. This poperty is optional to avoid any breaking changes.

Copy link

changeset-bot bot commented Apr 15, 2024

🦋 Changeset detected

Latest commit: da2f235

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@redux-devtools/app-core Major
@redux-devtools/app Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@matt-oakes
Copy link
Contributor Author

I have made the changes needed for the linting and tests to pass correctly. I've also added a changeset file which will set the new app-core package to 1.0.0 and do a minor upgrade on the app package as it's not a breaking change.

You should have push access, so feel free to make changes or comments as required.

@matt-oakes
Copy link
Contributor Author

Whoops! I fixed the small formatting issue. Sorry, my editor had a different way to automatically format that and I forgot to run the check formatting locally.

@matt-oakes
Copy link
Contributor Author

To test this out I have created an Expo Dev Plugin which makes use of this new app-core package (temporarily published to NPM as @mattoakes/redux-devtools-app-core).

It's working great and the amount of code needed to get the full devtools app UI with a custom connection middleware is now greatly reduced.

This change splits out the main logic from the Redux Devtools App into a new
core package but keeps the socket connection management in @redux-devtools/app.
The aim is to allow for easier reuse of the rest of the app in other envioronments
with their own transport methods, such as React Native or Electron.
@matt-oakes
Copy link
Contributor Author

@markerikson I have rebased this now so it's mergable again. It would be good to get this reviewed and merged so I can switch my Expo devtools plugin away from using a fork of this package and use the official one.

Copy link
Member

@Methuselah96 Methuselah96 left a comment

Choose a reason for hiding this comment

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

Thanks, let's give this a try!

@Methuselah96 Methuselah96 merged commit 96ac1f2 into reduxjs:main Jun 12, 2024
@Methuselah96 Methuselah96 mentioned this pull request Jun 12, 2024
@matt-oakes
Copy link
Contributor Author

Thank you! Please let me know if there are any issues or anything you need to discuss.

@Methuselah96
Copy link
Member

@matt-oakes The @redux-devtools/app-core package should be live now, let me know if you run into any issues.

@arstropica
Copy link

Thank you! Please let me know if there are any issues or anything you need to discuss.

Themes.tsx could previously be imported at @redux-devtools/app/lib/esm/components/Settings/Themes but access now appears to be limited internally. Is there another method of accessing the component?

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