Enable codemirror's code folding in editor mode
Categories
(DevTools :: Console, enhancement, P3)
Tracking
(firefox81 fixed)
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: Harald, Assigned: rich)
References
(Blocks 1 open bug)
Details
User Story
When editing longer code, I want to fold unimportant parts, so that I can focus the limited space on the code I am actually editing.
Attachments
(1 file)
Assignee | ||
Comment 1•4 years ago
|
||
To whom it may concern, If someone else picks this up before me I would LOVE to pair with you on it. I've been thinking a lot about this feature and would really enjoy helping or picking up the feature. I may try and take a stab at it soon, if I can wrap my current bug. TBD!
Comment 2•4 years ago
|
||
Hello Richard,
I'd gladly mentor you for this bug! Let me know if I should assign you the bug.
This is where we disable the code folding in the console: devtools/client/webconsole/components/Input/JSTerm.js#252
So here we should do like for lineNumbers
, on the next line: set it to the value of the editor mode prop.
Then we need to update the option when the user switch from inline to editor mode. Again, we already do that for lineNumbers
, so we can adapt it to enableCodeFolding
.
With those 2 changes, we could then write a test to make sure the folding is enabled in editor mode, and isn't in inline mode, as well as making sure that when the user switches from editor to inline, with some collapsed code, the code isn't collapsed anymore.
Let me know what you think!
Assignee | ||
Comment 3•4 years ago
|
||
Thanks Nicolas – I'd love to work with you to get this conquered. Let me spend this weekend hopefully finishing the other bug I'm working on at the moment, and then I'd like to pick this bug up to get started on next week. Work for you? Excited for this one!
Assignee | ||
Comment 4•4 years ago
|
||
Hey Nicolas – I'm back in action and I'd love to move forward with this bug if you're still open to mentoring me! If that works, please assign me the bug and I'll start digging into the source and see what's what. Thanks!
Comment 5•4 years ago
|
||
It's your Richard :) Let me know if you have any question!
Assignee | ||
Comment 6•4 years ago
|
||
Adding code folding to console when in editor mode.
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5a2cf7ed7079 Enable codemirror's code folding in editor mode r=nchevobbe
Comment 8•4 years ago
|
||
bugherder |
Description
•