Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow renaming of nodes #19

Open
Turtyo opened this issue Nov 20, 2024 · 6 comments
Open

Allow renaming of nodes #19

Turtyo opened this issue Nov 20, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@Turtyo
Copy link

Turtyo commented Nov 20, 2024

Is your feature request related to a problem? Please describe.
I'm trying to make a setup where I play different audio to different connected devices. I started using coppwr just a bit ago (so the functionality might exist but I don't know it). I had 2 videos playing sound opened on firefox, so I had two nodes, both labeled as "Firefox", and just looking at the graph, I couldn't tell one from the other.

Describe the solution you'd like
With a right click, or maybe a little pen icon, allow the renaming of a node in the GUI.

Describe alternatives you've considered
Since I noticed in the details that there was media.name, maybe a little checkbox to rename the node to the name of the media it is playing instead ? But that would only apply to audio sources, so I think the manual renaming is better at first, because it can be applied to everything.

Additional context
Screenshot to show what I'm doing:
image

Very cool project btw ! I took a quick look at the code earlier, I wouldn't mind implementing this if I'm told where to look at (I'm guessing the code for both adding an edit icon on a node, as well as where each node is named would be where to start)

@Turtyo Turtyo added the enhancement New feature or request label Nov 20, 2024
@dimtpap
Copy link
Owner

dimtpap commented Nov 20, 2024

Another more general solution could be to let users specify their preferred order of properties to show in that place for each object type

@dimtpap
Copy link
Owner

dimtpap commented Nov 20, 2024

You can add the property you want to get the value from here

ObjectType::Node => ["node.nick", "node.description", "node.name"],

if you want to adjust it to your needs for now

@Turtyo
Copy link
Author

Turtyo commented Nov 20, 2024

Ah yes, that would work also. Advantage is that it would auto-update the name if the media being played changes, but on the other side, someone might want to rename their node with a symbolic name that has nothing to do with the data of the media.

Taking my example again, I thought about renaming my speakers to the position I plan on putting them in a room (so that's not information that's available inside coppwr).

I feel like having both would be for the best (one auto-updates, and the other lets you choose the name directly)

@Turtyo
Copy link
Author

Turtyo commented Nov 20, 2024

image
I did the little change you talked about above.

Also, just a little confusion; when I was talking about renaming, I was talking about changing the "Firefox" at the top left; this also works, but I would prefer renaming the entire node title, as it seems more intuitive

@dimtpap
Copy link
Owner

dimtpap commented Nov 22, 2024

I'll be rewriting the graph code since it's a bit limited for a lot of stuff as it is now. After that it'll be able to handle user-set Global "nicknames".

@Turtyo
Copy link
Author

Turtyo commented Dec 10, 2024

Nice 👍 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants