[Admin] Improve performance of admin email list #11952
Merged
+29
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of the problem
This page was getting unusable. The biggest culprit was generating a select field with EVERY user in the database!
And then, with a bunch of iframes on the page, browser extensions were going crazy trying to load into every iframe.
Describe your changes
Turboframe the iframes... yes, I know... crazy. See https://github.com/hackclub/hcb/blob/c8b67027858888deb0084ffb15a81ae4f7a30607/app/views/admin/email.html.erb for an explanation.
Turn the User select dropdown into a simple
user_idtext field. Yeah, it sucks now, but at least the page will load.