Skip to content

[Tech] External React Dev Tools application #3765

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 1 commit into from
May 23, 2024
Merged

Conversation

CommandMC
Copy link
Collaborator

Adopting #3302

Now that the Zustand PR is merged, this is the only thing missing to truly start battling the re-render issues :^)


Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@CommandMC CommandMC requested review from a team, arielj, flavioislima, Etaash-mathamsetty, Nocccer and imLinguin and removed request for a team May 18, 2024 20:42
@CommandMC CommandMC self-assigned this May 18, 2024
@CommandMC CommandMC added the pr:ready-for-review Feature-complete, ready for the grind! :P label May 18, 2024
Copy link
Collaborator

@arielj arielj left a comment

Choose a reason for hiding this comment

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

I tried this and it works fine, the only thing I noticed is that when I close Heroic the react dev tools window stays open and I have to also close it

it would be nice if it auto-closes when closing heroic

@@ -24,7 +24,20 @@ const electronViteConfig: UserConfigExport = {
}
}

export default defineConfig({
// FIXME: Potentially publish this as a dedicated plugin, if other projects
// run into the same issue
Copy link
Collaborator

Choose a reason for hiding this comment

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

what does this mean? what is the issue this is fixing? would be nice to have that context so we know what to look for

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The issue this PR resolves is not Heroic-specific, it's something every Electron app will run into when trying to use the React dev tools. Because of that, every project will have to do something like this (adding a plugin to their bundler that adds the <script> tag). Thus, it might make sense to publish just this small Vite plugin separately (instead of defining it in this config file), so everyone else can just install it instead of essentially copy-pasting this code

@CommandMC
Copy link
Collaborator Author

it would be nice if it auto-closes when closing heroic

I doubt we can implement features like that into the React dev tools (at least not without modifying the package ourselves)

@arielj arielj merged commit 1429f64 into main May 23, 2024
9 checks passed
@arielj arielj deleted the tech/react-dev-tools branch May 23, 2024 00:53
@Heroic-Games-Launcher Heroic-Games-Launcher locked and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr:ready-for-review Feature-complete, ready for the grind! :P
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants