Closed Bug 1558198 Opened 2 years ago Closed 2 years ago

Add history navigation buttons in Editor toolbar

Categories

(DevTools :: Console, task, P1)

task

Tracking

(firefox70 fixed)

RESOLVED FIXED
Firefox 70
Tracking Status
firefox70 --- fixed

People

(Reporter: nchevobbe, Assigned: armando.ferreira)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [console-editor-mvp] )

Attachments

(1 file)

They should look similar to what we are using in the reverse search input.

Whiteboard: [console-editor-mvp]

Armando, would you be interested by this bug?

To see what needs to be done, you first need to toggle the Editor Mode with Ctrl + B (Cmd + B if you're on OSX) while focused in the console.
That will put the input to the left of the console, which is what we call the Editor Mode (or FX Code if we want to get fancy :) ).
The toolbar is defined in devtools/client/webconsole/components/Input/EditorToolbar.js .

You can spot a top toolbar with one button which says "Run".
What we want is to have up/down buttons that will navigate through the inputs history.
What's cool is that we already have similar button in the reverse search (press F9 or Ctrl+R to see it)

They're rendered with React here: devtools/client/webconsole/components/Input/ReverseSearchInput.js#170-206 , and we could re-use the same structure and CSS classes :)
What need to be changed is the onClick handler. We want to call something similar to devtools/client/webconsole/components/Input/JSTerm.js#1246-1263, which will require some changes in our code, but we can see this together when you successfully have the next/previous buttons displayed on screen :)

Let me know if that feels too complex and prefer to work on another bug.

Flags: needinfo?(armando.ferreira)

Hi Nicolas, thanks for considering me for this bug! And sure I can start working on it; I will let you know if I have questions related to bug :)

Flags: needinfo?(armando.ferreira)

Hi Nicolas, Can you assign this bug to me? :)

Flags: needinfo?(nchevobbe)

Adding History navigation to Editor toolbar

Assignee: nobody → armando.ferreira
Status: NEW → ASSIGNED
Priority: P2 → P1

Marco did :) Thanks!

Flags: needinfo?(nchevobbe)
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e1d75c4c7558
Add history navigation buttons in Editor toolbar. r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
You need to log in before you can comment on or make changes to this bug.