Closed Bug 1127238 Opened 9 years ago Closed 9 years ago

Remove the hard-coded list of highlighters

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 38

People

(Reporter: zer0, Assigned: zer0)

References

Details

Attachments

(1 file, 3 obsolete files)

Currently we have the custom highlighters' list hard-coded in two different places (highlighter.js and root.js); we should make highlighters be able to register themselves, so that those two list won't be necessary anymore, make easier to maintain for us, and make possible for developers implement their own highlighters.
Assignee: nobody → zer0
Attached patch highlighter-list.patch (obsolete) — Splinter Review
Attachment #8556983 - Flags: review?(pbrosset)
Comment on attachment 8556983 [details] [diff] [review]
highlighter-list.patch

Review of attachment 8556983 [details] [diff] [review]:
-----------------------------------------------------------------

Cool! These changes look good to me.
As discussed in person today, I only have a few nits and I know you have a patch to correct those.
I have tested the patch locally both on the same desktop version and remotely connected to an older backend, everything worked as expected.
So, r=me with the discussed nit changes.
Let's push to try to see if everything's fine.
Attachment #8556983 - Flags: review?(pbrosset) → review+
Attached patch highlighter-list2.patch (obsolete) — Splinter Review
Attachment #8557068 - Flags: review+
Attachment #8556983 - Attachment is obsolete: true
Alright, great work Matteo, try is all green, patch is R+. You can either push the patch to fx-team if you can or add the checkin-needed keyword to the bug.
Status: NEW → ASSIGNED
CCing bgrins and miker: I think you should know about this change. With this patch, it'll be easier for addons to register new highlighters as the list of supported highlighters isn't hard-coded anymore. Highlighter classes register themselves instead.
I'll check with Joe about my permission to push on the repo! In the meantime, checkin-needed. :)
Keywords: checkin-needed
Hi, this patch didn't apply cleanly:

adding 1127238 to series file
renamed 1127238 -> highlighter-list3.patch
applying highlighter-list3.patch
patching file toolkit/devtools/gcli/commands/highlight.js
Hunk #1 FAILED at 1
1 out of 1 hunks FAILED -- saving rejects to file toolkit/devtools/gcli/commands/highlight.js.rej

could you take a look, thanks!
Flags: needinfo?(zer0)
Keywords: checkin-needed
Comment on attachment 8557095 [details] [diff] [review]
highlighter-list3.patch

Review of attachment 8557095 [details] [diff] [review]:
-----------------------------------------------------------------

I like this approach... awesome work!
Attachment #8557095 - Flags: review+ → feedback+
Attachment #8557095 - Attachment is obsolete: true
Flags: needinfo?(zer0)
Attachment #8558474 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/2dc360586545
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 38
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: