You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
FYI, but as far as I know, the rulesets are stored in the extension itself in a compacted/modified form (see #9958 (comment)). So, they are not available to edit within the extension itself the way that you see them on GitHub or the Atlas.
On the other hand this could be part of good alternative to the soon to be deprecated HTTPSEverywhereUserRules/ subdirectory (issue #10822 and elsewhere).
This issue seems technically resolved by #12863, which does introduce an XML ruleset editor in the extension. I guess though that @koops76 wants more robust XML highlighting, which is reasonable.
There must be some compromise solution between nothing and something as full-featured as CodeMirror. In #12863 (comment) I asked @Hainish for some guidelines but so far he hasn't responded to that request:
We should have some kind of XML highlighting. I know we talked about this before in In-extension ruleset XML editor #11794. CodeMirror is probably too heavyweight but there appear to be many options for small JS/browser-based syntax highlighters. I can try to find something if you can give me some requirements, e.g. must be 10kB or less in size etc.
Building and using an unsigned extension, and using a Firefox build that allows for unsigned extensions, is annoying and requires extra steps.
It encourages using non-stable versions of Firefox and the extension for testing.
It would be nice to have highlighting available for contributors who are developing rulesets who don't want to go through these extra steps. We might get more and higher quality rulesets that way.
Firefox and Chrome have developer tools in their browsers even though most users don't use them. They could save a few bytes by leaving them out, but they don't, I guess for reasons some of which also apply here.
It encourages using non-stable versions of Firefox and the extension for testing.
The unbranded extensions are not non-stable. They do allow unsigned versions of extensions to be installed, and that's a security risk, but non-stable is something different. Regardless, your point is taken. I think it's fine to add some syntax hilighting as long as it only adds ~50k.
Activity
jeremyn commentedon Aug 10, 2017
FYI, but as far as I know, the rulesets are stored in the extension itself in a compacted/modified form (see #9958 (comment)). So, they are not available to edit within the extension itself the way that you see them on GitHub or the Atlas.
On the other hand this could be part of good alternative to the soon to be deprecated
HTTPSEverywhereUserRules/subdirectory (issue #10822 and elsewhere).gloomy-ghost commentedon Nov 6, 2017
Does #12863 fulfill this?
jeremyn commentedon Nov 6, 2017
This issue seems technically resolved by #12863, which does introduce an XML ruleset editor in the extension. I guess though that @koops76 wants more robust XML highlighting, which is reasonable.
There must be some compromise solution between nothing and something as full-featured as CodeMirror. In #12863 (comment) I asked @Hainish for some guidelines but so far he hasn't responded to that request:
gloomy-ghost commentedon Nov 6, 2017
50KB sounds ok to me, given that we used to ship megabytes of tests in the ruleset file for years without anyone complaining
Hainish commentedon Nov 7, 2017
Is there any reason why this has to be shipped with the release version, and not simply passed as a build flag like
--include-debug-xml-highliting?jeremyn commentedon Nov 7, 2017
Building and using an unsigned extension, and using a Firefox build that allows for unsigned extensions, is annoying and requires extra steps.
It encourages using non-stable versions of Firefox and the extension for testing.
It would be nice to have highlighting available for contributors who are developing rulesets who don't want to go through these extra steps. We might get more and higher quality rulesets that way.
Firefox and Chrome have developer tools in their browsers even though most users don't use them. They could save a few bytes by leaving them out, but they don't, I guess for reasons some of which also apply here.
jeremyn commentedon Nov 7, 2017
Also as far as I know it's not possible, or at least unsupported, to build the extension on Windows.
It might also be difficult to build the extension on a system the user doesn't fully control, such as a work/school/library/shared computer.
Hainish commentedon Nov 9, 2017
The unbranded extensions are not non-stable. They do allow unsigned versions of extensions to be installed, and that's a security risk, but non-stable is something different. Regardless, your point is taken. I think it's fine to add some syntax hilighting as long as it only adds ~50k.
jeremyn commentedon Nov 10, 2017
https://github.com/google/code-prettify looks like a good choice. StackOverflow uses it. The minimized, gzipped download at https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js is about 8KB, though of course we should include the code in the project and not use a CDN.
Hainish commentedon Nov 10, 2017
@jeremyn is it available for
texareaelements as well? Some libraries only support rendered HTML rather than inputs.jeremyn commentedon Nov 10, 2017
Oops, you're right, code-prettify seems to just be for rendered text.
jeremyn commentedon Nov 11, 2017
PR #13560 adds CodeMirror support to the ruleset debugger.
Use CodeMirror in ruleset debugger (#11794) (#13560)
jeremyn commentedon Dec 5, 2017
I'm closing this issue since CodeMirror has been added to the ruleset debugger.