The default bug view has changed. See this FAQ.

Move the inline-output comment to the next line (not at the end of the current line)

RESOLVED FIXED in Firefox 13

Status

()

Firefox
Developer Tools: Scratchpad
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: paul, Assigned: Spyros Livathinos)

Tracking

Trunk
Firefox 13
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [good first bug][mentor=msucan][lang=js])

Attachments

(1 attachment, 1 obsolete attachment)

Comment hidden (empty)

Updated

5 years ago
Hardware: x86 → All
Whiteboard: [good first bug][mentor=msucan][lang=js]
One unexpected (for me) advantage of the current behavior is that I can sort of simulate autocomplete by typing "object.property" then Cmd-L, then Backspace, then ".property2", then Cmd-L, then Backspace, etc.
(Reporter)

Comment 2

5 years ago
(In reply to Panos Astithas [:past] from comment #1)
> One unexpected (for me) advantage of the current behavior is that I can sort
> of simulate autocomplete by typing "object.property" then Cmd-L, then
> Backspace, then ".property2", then Cmd-L, then Backspace, etc.

The "code -> ctrl-l -> backspace" thing can still work if, in the selection, the "\n" is included.
(In reply to Paul Rouget [:paul] from comment #2)
> (In reply to Panos Astithas [:past] from comment #1)
> > One unexpected (for me) advantage of the current behavior is that I can sort
> > of simulate autocomplete by typing "object.property" then Cmd-L, then
> > Backspace, then ".property2", then Cmd-L, then Backspace, etc.
> 
> The "code -> ctrl-l -> backspace" thing can still work if, in the selection,
> the "\n" is included.

Yes, that would be nice.
(Assignee)

Comment 4

5 years ago
Created attachment 598803 [details] [diff] [review]
Proposed fix.

Added a newline character in front of the comment block that is generated
by the writeAsComment function of the Scratchpad editor.

The preceding newline character is being selected aswell when a user presses cmd+L, so the method that past described above still works.
Attachment #598803 - Flags: feedback?(mihai.sucan)
Spyros: thank you for taking this bug and submitting a patch!
Assignee: nobody → livathinos.spyros
Status: NEW → ASSIGNED
Comment on attachment 598803 [details] [diff] [review]
Proposed fix.

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

Great patch!

Now this patch doesn't need a new test, but Scratchpad has tests that are now broken by the change in writeAsComment(). Please run the Scratchpad tests and fix the failing tests in browser/devtools/scratchpad/test/. I see:

Browser Chrome Test Summary
	Passed: 221
	Failed: 21

Looking forward for the updated patch!
Attachment #598803 - Flags: feedback?(mihai.sucan) → feedback+
(Assignee)

Comment 7

5 years ago
Created attachment 599117 [details] [diff] [review]
Proposed fix with fixed tests.

Thanks for the feedback! Fixed the two tests that were complaining due to the changes in writeAsComment() - Tests passed now: 242/242
Attachment #598803 - Attachment is obsolete: true
Attachment #599117 - Flags: review?(mihai.sucan)
Comment on attachment 599117 [details] [diff] [review]
Proposed fix with fixed tests.

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

This is as good as it can get. Thanks Spyros for your contributions! Much appreciated. Keep up the good work coming! ;)
Attachment #599117 - Flags: review?(mihai.sucan) → review+

Updated

5 years ago
Whiteboard: [good first bug][mentor=msucan][lang=js] → [good first bug][mentor=msucan][lang=js][land-in-fx-team]
https://hg.mozilla.org/integration/fx-team/rev/738d8ec39166
Whiteboard: [good first bug][mentor=msucan][lang=js][land-in-fx-team] → [good first bug][mentor=msucan][lang=js][fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/738d8ec39166
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [good first bug][mentor=msucan][lang=js][fixed-in-fx-team] → [good first bug][mentor=msucan][lang=js]
Target Milestone: --- → Firefox 13
You need to log in before you can comment on or make changes to this bug.