Skip to content

Update node tree view help / implementation#6914

Merged
dyfer merged 1 commit intosupercollider:developfrom
dyfer:topic/update-NodeTreeView-help
Jun 5, 2025
Merged

Update node tree view help / implementation#6914
dyfer merged 1 commit intosupercollider:developfrom
dyfer:topic/update-NodeTreeView-help

Conversation

@dyfer
Copy link
Member

@dyfer dyfer commented May 31, 2025

Purpose and Motivation

After merging #6834 I found some discrepancies between the documentation and the implementation.

This PR depends on #6913, let's merge that one first. done!

Types of changes

  • Documentation
  • Breaking change (kind of)

To-do list

  • Code is tested
  • All tests are passing
  • Updated documentation
  • This PR is ready for review

@dyfer dyfer added comp: class library SC class library comp: help schelp documentation labels May 31, 2025
@dyfer dyfer marked this pull request as draft May 31, 2025 00:58
@dyfer dyfer changed the title Topic/update node tree view help Update node tree view help / implementation May 31, 2025
@dyfer dyfer force-pushed the topic/update-NodeTreeView-help branch from 77d5f98 to a33f748 Compare May 31, 2025 15:47
@dyfer dyfer marked this pull request as ready for review May 31, 2025 15:48
@dyfer
Copy link
Member Author

dyfer commented May 31, 2025

@prko @telephon @capital-G this is a minor cleanup after the recent s.plotTree rework.

@dyfer dyfer added this to 3.14.0 May 31, 2025
@prko prko mentioned this pull request Jun 1, 2025
3 tasks
@prko
Copy link
Contributor

prko commented Jun 1, 2025

Thank you for the update. Everything looks good, but I do have one question.

Is there no need to inform users about the 'plotTree' function?

The server documentation provides information about NodeTreeView, but there is no mention of plotTree in the NodeTreeView documentation. Would it be beneficial to include a reference to it to help users determine whether they are using it properly?

@dyfer
Copy link
Member Author

dyfer commented Jun 1, 2025

Is there no need to inform users about the 'plotTree' function?

Possibly yes. But this PR focuses on fixing the discrepancies between the documentation and implementation, not on improving the documentation in itself.

I think my main concern to consider is whether s.plotTree should return a Server, or a NodeTreeView.

  • Argument for returning a Server: this is what s.plotTree was returning previously. If we change it, we'd break code like s.plotTree.meter (though this is a minor issue IMO);
  • Argument for returning a NodeTreeView: s.meter and s.freqscope return a ServerMeter and a FreqScope, respectively, so returning a NodeTreeView would be more consistent with these functions.

Relatedly, I wonder whether s.plotTreeView (the method called internally by s.plotTree) should also return a NodeTreeView, or a Server (this is a change in the interface from 3.13 anyway, but that class is not typically used directly, I think)

@dyfer
Copy link
Member Author

dyfer commented Jun 2, 2025

I think my main concern to consider is whether s.plotTree should return a Server, or a NodeTreeView.

@telephon do you have an opinion on this?

@telephon
Copy link
Member

telephon commented Jun 2, 2025

In general, it should return the NodeTreeView. This is a breaking change, but probably not too severe?

@dyfer dyfer force-pushed the topic/update-NodeTreeView-help branch from a33f748 to 0c8ddc2 Compare June 2, 2025 22:14
@dyfer
Copy link
Member Author

dyfer commented Jun 2, 2025

@telephon thanks for the input! I updated the implementation to (again) return NodeTreeView. I updated the docs to match.

I also thought that it would be cleaner to update the instance variable Server .nodeTreeView in .plotTree instead of .plotTreeView, what do you think?

@capital-G capital-G moved this to Committed in 3.14.0 Jun 3, 2025
@dyfer dyfer merged commit 96d6e6c into supercollider:develop Jun 5, 2025
26 checks passed
@github-project-automation github-project-automation bot moved this from Committed to Done in 3.14.0 Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: class library SC class library comp: help schelp documentation

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants