Comments (8)
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.
from valence.
How are you planning to do this?
from valence.
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.
from valence.
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.
from valence.
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.
from valence.
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...)
from valence.
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?
from valence.
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
from valence.
Related Issues (20)
- as-authored rule editing
- Powershell path is missing on Windows 10 Home Edition HOT 4
- "Delete Domain Cookies" not working in Firefox Dev Edition / Aurora HOT 1
- Valence needs a test harness
- Manual testing plan for Valence
- Unit tests for Valence console support
- Unit tests for Valence DOM inspector support
- Unit tests for Valence reflow notification
- Unit tests for Valence style sheet list support
- Valence unit tests should run automatically on push HOT 6
- Link to jpm install instructions in README.md
- Update iOS webkit debug proxies for Mac, and Linux HOT 1
- Nexus 6P With 48.0 not Connecting to FireFox on Windows 48.0 HOT 4
- Integrated OpenSSL version is sooooo old *brrrr* HOT 2
- Allow changing the default chrome debugger port
- Migrate to WebExtensions? HOT 8
- Dark compact theme is force applied when valence is enabled HOT 1
- Connection error w10 ios10.3.3
- Wiki changes HOT 1
- CODE_OF_CONDUCT.md file missing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from valence.