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

box won't render unless tracing is enable? #19

Open
rwygand opened this issue Jul 20, 2012 · 4 comments
Open

box won't render unless tracing is enable? #19

rwygand opened this issue Jul 20, 2012 · 4 comments

Comments

@rwygand
Copy link

rwygand commented Jul 20, 2012

I'd like the query review box to render if query reviewer is enabled in the configuration yml, even if the cookie isn't enabled and no tracing occurs. As it is right now, the query review view and all associated javascript does't get loaded so there's no clickable interface to enable tracing anywhere on the page, unless I manually include query_review_output in a view somewhere.

But if I do this, once I enable the cookie by clicking the link in the view, I get the query reviewer view injected into my html twice.

Am I missing some configuration to avoid this? If not, I think the solution is to always add_query_output_to_view in controller_extensions (that is, remove the return unless Thread.current["query_reviewer_enabled"]) and, instead, in perform_action_with_query_review, change the Thread.current[...] = to return unless.

I can submit a pull request if you'd like.

@jdelStrother
Copy link

I think this was broken by 1dea755, which exits early from add_query_output_to_view unless cookies["query_review_enabled"] is set.

@nesquena
Copy link
Owner

Happy to accept a pull request for this behavior

@jdelStrother
Copy link

I think my pull request would involve just deleting the return unless Thread.current["query_reviewer_enabled"] line... but then, I can't quite follow exactly why that's there in the first place. @mikegee ?

@mikegee
Copy link

mikegee commented Dec 9, 2012

My changes allowed query_reviewer to run in production and be invisible to all but an admin user. Feel free to break my use case, though. I got what I needed out of it and don't use query_reviewer anymore.

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

No branches or pull requests

4 participants