Closed Bug 1013544 Opened 10 years ago Closed 10 years ago

Highlight selected node in graph in web audio editor

Categories

(DevTools Graveyard :: Web Audio Editor, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 32

People

(Reporter: jsantell, Assigned: jsantell)

References

Details

Attachments

(2 files, 1 obsolete file)

Attached image example
      No description provided.
Assignee: nobody → jsantell
Attachment #8427237 - Flags: review?(vporof)
Blocks: 1006912
Comment on attachment 8427237 [details] [diff] [review]
1013544-highlight-active-node-wae.patch

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

There's some rejects I had to fix before playing with the patch, but this looks good.

Also, tangentially, is there a bug filed to remove the (connX.audionodeYZ) text from the sidebar? This is a protocol implementation detail that users shouldn't know about. Maybe remove that bar altogether, because now we know which node is selected.

::: browser/devtools/webaudioeditor/test/browser_wa_graph-selected.js
@@ +45,5 @@
> +    "Non-selected nodes do not have class 'selected'.");
> +  ok(findGraphNode(panelWin, gainId).classList.contains("selected"),
> +    "Newly selected node now has class 'selected'.");
> +
> +  yield teardown(panel);

Does this test make sure that clicking outside a node deselects everything? Is that tested?

::: browser/devtools/webaudioeditor/webaudioeditor-view.js
@@ +111,4 @@
>     */
>    focusNode: function (actorID) {
>      // Remove class "selected" from all nodes
>      Array.prototype.forEach.call($$(".nodes > g"), $node => $node.classList.remove("selected"));

Sidenote, but I think Array.forEach(...) also works and is more compact.

@@ -112,5 @@
> -
> -  /**
> -   * Unfocuses the corresponding graph node, called from WebAudioParamView
> -   */
> -  blurNode: function (actorID) {

I liked this, but I guess there's no need for it now?
Attachment #8427237 - Flags: review?(vporof) → review+
(In reply to Victor Porof [:vporof][:vp] from comment #3)
> Comment on attachment 8427237 [details] [diff] [review]
> 
> Does this test make sure that clicking outside a node deselects everything?
> Is that tested?
> 

Actually, this doesn't seem to be implemented yet. Do you think it'd be a good idea to have it?
`blurNode` is no longer needed -- will probably have to be readded for any kind of global 'deselecting', which I'm still not sure how that should work -- debated having that select the overall 'context' view, but still unclear how/what should be shown, so holding off on this for now. Also, need to take into consideration navigation in the graph, sliding/dragging around shouldn't necessarily deselect the node. Created bug 1016036 to figure that out later how that should work.

Created bug 1016037 for removing actor ID display, and possible other unique identifying solutions
Changed to use static method Array.forEach
Attachment #8427237 - Attachment is obsolete: true
Attachment #8428841 - Flags: review+
https://hg.mozilla.org/integration/fx-team/rev/ab59c1131562
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
No longer blocks: 1006912
https://hg.mozilla.org/mozilla-central/rev/ab59c1131562
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 32
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: