Closed Bug 796009 Opened 12 years ago Closed 11 years ago

[markup panel] Pressing the left arrow key should close parent if on an already-closed node in markup panel

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 22

People

(Reporter: harth, Assigned: jryans)

References

Details

Attachments

(1 file, 1 obsolete file)

If you currently have a node selected in the markup panel that isn't expanded, pressing the left arrow key (close or un-expand node) will do nothing.

We should close the parent node if that's the case.
Or we could just navigate to the parent. That way we can kill 2 bugs in one, and we can still close a deeply nested tree by hammering on LEFT.
Summary: Pressing the left arrow key should close parent if on an already-closed node in markup panel → [markup panel] Pressing the left arrow key should close parent if on an already-closed node in markup panel
Assignee: nobody → jryans
Status: NEW → ASSIGNED
I've given additional functionality to both the left and right arrows:

* Left Arrow on a collapsed node will move its the parent node
* Right Arrow on an expanded node will move to the first child (if any)
Comment on attachment 719810 [details] [diff] [review]
Improve left and right navigation

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

It looks to me that this patch doesn't do what the title asks i.e. it doesn't "close parent", it navigates to the parent. Not that I'm complaining - I think that navigate to parent is what windows has done for a while and what osx has been doing more recently. Harth, are you happy with this modification?
Attachment #719810 - Flags: review?(jwalker) → review+
(In reply to Joe Walker [:jwalker] from comment #4)
> 
> - I think that navigate to parent is what windows has done for a while and
> what osx has been doing more recently.

Isn't "navigate to parent and collapse" the more pertinent behavior? I thought that was the default action (at least on OS X). In the interest of keeping keyboard navigation in trees consistent across all our tools (profiler, variables view), maybe it'd be a good idea to implement it here as well.
(In reply to Victor Porof [:vp] from comment #5)
> (In reply to Joe Walker [:jwalker] from comment #4)
> > 
> > - I think that navigate to parent is what windows has done for a while and
> > what osx has been doing more recently.
> 
> Isn't "navigate to parent and collapse" the more pertinent behavior? I
> thought that was the default action (at least on OS X).

The OS X 10.8.2 Finder does navigate when it can't collapse, and collapse when it can, which is what this patch does.
Mail.app has a combined navigate+collapse action as you suggest.
iTunes (as you might expect) does something utterly bizarre and incomprehensible.
At this point I stopped looking because we obviously can't trust Apple to lead here.

Windows is (mostly) consistent in having separate navigate and collapse actions.

> In the interest of
> keeping keyboard navigation in trees consistent across all our tools
> (profiler, variables view), maybe it'd be a good idea to implement it here
> as well.

FWIW, the profiler on a Mac has separate navigate and collapse actions. I can't test variables view easily, but perhaps the XUL tree control is doing something different for different OSs? (But then you're on a Mac?)
(In reply to Joe Walker [:jwalker] from comment #4)
> It looks to me that this patch doesn't do what the title asks i.e. it
> doesn't "close parent", it navigates to the parent. Not that I'm complaining
> - I think that navigate to parent is what windows has done for a while and
> what osx has been doing more recently. Harth, are you happy with this
> modification?

Yeah, I was attempting do what you alluded to in comment 2, namely to combine the request of this bug and bug 796015 (to improve navigating to parent).

(In reply to Victor Porof [:vp] from comment #5)
> (In reply to Joe Walker [:jwalker] from comment #4)
> > 
> > - I think that navigate to parent is what windows has done for a while and
> > what osx has been doing more recently.
> 
> Isn't "navigate to parent and collapse" the more pertinent behavior? I
> thought that was the default action (at least on OS X). In the interest of
> keeping keyboard navigation in trees consistent across all our tools
> (profiler, variables view), maybe it'd be a good idea to implement it here
> as well.

On OS X 10.8.2, it looks like the other tools disagree with each other:

* Profiler (same as markup with my patch)
  * When moving forward with right arrow, expand and navigate are separate steps
  * When moving back with left arrow, collapse and navigate are separate steps
* Variables View
  * When moving forward with right arrow, expand and navigate are separate steps
  * When moving back with left arrow, collapse and navigate happen simultaneously

I personally prefer them as separate steps myself, but I agree that whatever we go with, we should get all our tree views consistent.
Attached patch Patch v2Splinter Review
Updated patch to match commit message format. Sorry for missing this, nothing else has changed.
Attachment #719810 - Attachment is obsolete: true
Attachment #720513 - Flags: review?(jwalker)
(In reply to J. Ryan Stinnett [:jryans] from comment #7)
> On OS X 10.8.2, it looks like the other tools disagree with each other:
> 
> * Profiler (same as markup with my patch)
>   * When moving forward with right arrow, expand and navigate are separate
> steps
>   * When moving back with left arrow, collapse and navigate are separate
> steps
> * Variables View
>   * When moving forward with right arrow, expand and navigate are separate
> steps
>   * When moving back with left arrow, collapse and navigate happen
> simultaneously
> 
> I personally prefer them as separate steps myself, but I agree that whatever
> we go with, we should get all our tree views consistent.

Thanks for this analysis:

I raised bug 847349 - Variables View should have left arrow do collapse and navigate in separate steps.
Attachment #720513 - Flags: review?(jwalker) → review+
Heather, are you happy with this? It's going on my list of things to get landed.
Flags: needinfo?(fayearthur)
Whiteboard: [land-in-fxteam]
https://tbpl.mozilla.org/?tree=Fx-Team&rev=7eb5914cbb5d
https://hg.mozilla.org/integration/fx-team/rev/09e85bef5d8d
Flags: needinfo?(fayearthur)
Whiteboard: [land-in-fxteam] → [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/09e85bef5d8d
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 22
Thanks for the patch Ryan
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: