Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Hide pretty-printing & blackboxing buttons (or make them work) #92

Closed
jlongster opened this issue Oct 29, 2014 · 8 comments
Closed

Hide pretty-printing & blackboxing buttons (or make them work) #92

jlongster opened this issue Oct 29, 2014 · 8 comments
Labels

Comments

@jlongster
Copy link
Contributor

The pretty-printing & blackboxing doesn't work right now and we probably won't get it working, and we talked about hiding the buttons. Not sure how hard this will be. It will require a patch to Firefox that needs to be uplifted to Aurora so I'll look into it now so we have a chance of getting it landed.

(I'll open a bug in bugzilla instead once this gets more serious)

@bgrins
Copy link
Member

bgrins commented Oct 29, 2014

How are you planning to do this?

@jlongster
Copy link
Contributor Author

There was a suggestion that the UI could disable the buttons if a blackbox/pretty-print request returned with a "not implemented" message, but that may be more trouble than it's worth. I think I actually will be able to get blackboxing working. For pretty-printing, as long we show an error somewhere I think that's ok. Now sure how to tell the UI to show an error from the backend though.

Worst case pretty-printing just won't do anything, I guess.

@bgrins
Copy link
Member

bgrins commented Oct 29, 2014

Can you send custom traits that the frontend could look for and hide the buttons there based on those values? I think that is what they are intended for (as in, to avoid having to wait for an error to happen on a request before realizing it won't work).

Alternatively you could dig into the DOM of the current toolbox from the extension and hide the buttons.

@bgrins
Copy link
Member

bgrins commented Oct 29, 2014

Usually we add traits that assert something new is on the server and nonexistence means you are talking to an older server (like editOuterHTML), but I don't see why you couldn't add a negated trait (like noPrettyPrinting).

Realistically, waiting for the debugger panel to open then digging into the DOM and looking for these buttons by ID and setting the hidden attribute is kind of gross, but I think it'd work fine.

@jlongster
Copy link
Contributor Author

Yeah, I'll look into adding a trait. That would definitely be the easiest. I think I can get blackboxing working. Will do this today.

@jlongster
Copy link
Contributor Author

I attached a patch to this bug to add the traits: https://bugzilla.mozilla.org/show_bug.cgi?id=1093349

Not sure who's the best reviewer, I'll talk with Panos tomorrow and see if he can (maybe Victor would better...)

@callahad
Copy link

callahad commented Feb 4, 2015

Bug 1093349 is resolved fixed, and the buttons are successfully hidden, but the "Auto Prettify Minified Sources" and "Automatically Black Box Minified Sources" options are still present but non-functional in the Debugger's settings menu. Should we hide those as well?

screen shot 2015-02-03 at 21 53 31

@past
Copy link
Contributor

past commented Feb 4, 2015

That's a good point @callahad. I think it's a pretty easy fix, one just needs to look at the changes @jlongster made in https://hg.mozilla.org/integration/fx-team/rev/85786620f4af

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants