-
Notifications
You must be signed in to change notification settings - Fork 460
Remove the global output buffer; compile on render_in #1432
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
Conversation
@camertron If you're able to elaborate on this, I'd be interested in knowing a bit more! |
@Spone sure, happy to elaborate. I was able to get around the form helper issues by creating what I've been calling "view_component lite" inside the primer/rails_forms repo, which is where our new forms framework lives (for now). VC lite is really just a barebones VC implementation that doesn't inherit from |
@camertron Understand the desire to remove nasty hacks etc, but just wondering if there is or will be any 'official' solution to the forms problem now? Was relying on the global output buffer to fix my form rendering woes! Could the solution in |
Not for everyone looking primer/rails_form has been archived. The work has been merged with primer/view_components. You can find the latest code at primer/view_components#1238 |
Woops @stevegeek, I totally missed your comment in August, sorry about that!
A semi-recent change to action view has removed the need to reassign
Maybe? We could certainly extract the Honestly the long-term fix is probably to stop inheriting from |
@camertron thanks for the reply! Ok understood. I will wait and see how it all evolves and look at ActsAsComponent. For now thanks for taking the time to elaborate on the situation! |
@stevegeek things move fast in the VC world! @BlakeWilliams has this PR up for review right now which is another take on fixing our buffer issues. It's very likely going to get merged this week I'd say. |
@camertron amazing news! |
…1432) * Remove the global output buffer; compile on render_in * Use rails main * Fix linting issues * Fix bad merge Co-authored-by: Joel Hawksley <[email protected]>
…1432) * Remove the global output buffer; compile on render_in * Use rails main * Fix linting issues * Fix bad merge Co-authored-by: Joel Hawksley <[email protected]>
What are you trying to accomplish?
A few months ago, I added an experimental feature called the global output buffer. We were attempting to build a forms framework at GitHub, and since it's a known issue that form helpers don't work very well with components, I was trying to work up a solution that would unblock the forms work. Unfortunately the final global output buffer solution monkeypatches actionview to an unsettling degree. It also turned out we didn't need it for the forms work after all. Finally, it appears it doesn't work with edge rails anymore. So let's get rid of it!
Because the global output buffer degraded performance a bit, I also worked up a patch to counteract it. Unfortunately the patch has led to a number of subtle bugs in development environments, so let's remove it too.