RaySession icon indicating copy to clipboard operation
RaySession copied to clipboard

Raysession and client instance description / help information fields ?

Open newlaurent62 opened this issue 5 years ago • 20 comments

Hello,

I would like to add a description to the raysession and for each client instance.

The description set with wiki? formatting would ideally support web link and could be accessible using an help icon.

Is there any way i can already do this kind of thing ?

BR, Laurent

newlaurent62 avatar May 08 '20 19:05 newlaurent62

Humm, I am not sure to understand what you are saying here. There are no such things in RaySession for the moment. Could you be more precise for my understanding ?

Houston4444 avatar May 09 '20 15:05 Houston4444

As the raysession instance is a document, i would like to add properties to that document like description, author, creation date ... I would like to add a description to the document but also put a description on each client declared in the document. The metadata should be available in the GUI.

from an XML point of view (even if we use ray_control to add information)

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE RAYSESSION>
<RAYSESSION name="MP3 Streaming from Jamulus" VERSION="...">
 <Author>my name</Author>
 <CreationDate>today</CreationDate>
 <Description>
This ray session  lets you stream audio from Jamulus .... 
You will need the following software ..., they can be installed on Ubuntu ... using ...
 </Description>
 <Clients>
  <Client name="obs" ...>
  <Description>
  You can test the output of this client using VLC with this url <a href="...">link</a>
  </Description>
  </Client>
  ...
  <Client .../>
 </Clients>
 <RemovedClients/>
 <Windows/>
</RAYSESSION>

Those metadata could also be stored in a seperate file to avoid raysession corruption in case of xml manual edition. May be there's other ways to achieve this ?

newlaurent62 avatar May 09 '20 16:05 newlaurent62

Ah ok thanks, this is much clearer ! I am not opposite to this idea of course, this is a good idea. The main problem I see is that this string MUST be translated... It takes a little bit of thinking.

If we can store it in raysession.xml, it is the good place for this.

Houston4444 avatar May 09 '20 17:05 Houston4444

Even if a translation mechanism can be of use, as far as i know a lot of application documents don"t have one. A document has to be created for each language. I mean, put all translation in one document will increase the size of this document for little benefits. The Implementation of this feature could be simpler without i18n.The i18n processing could be done when the wizard is installed.

newlaurent62 avatar May 09 '20 21:05 newlaurent62

I think to add a 'Notes' properties to session. Understand, something editable by user with a very simple text area. Do you think your session 'description' could be simply written in 'Notes', or do you think these should be two different things ? Same thing, do you think that client description could be editable by user ? (here I let the term 'Description'). For client, I'll try (if possible and fast enough) to get the description from .desktop file containing the executable by default.

Houston4444 avatar May 18 '20 21:05 Houston4444

That sounds good.

An editable note for each client and for the session. And a description get from the desktop file. What about i18n then?

newlaurent62 avatar May 19 '20 06:05 newlaurent62

I'm almost done. You were right for translations, the wizard will translate itself. And for description taken from desktop file, it will stay in the language the application was when it search it. I added ray_control set_notes NOTES and ray_control get_notes, all is saved in ray-notes file in the session path. So you can also write the text file yourself before to open the session. Because this message is transmit via OSC from daemon to GUI, notes are limited to 65000 characters, I think it should be enough.

For client, ray_control client $client_id set_description DESCRIPTION and ray_control $client_id get_description. Do you think a one line only client description could be enough ?

Houston4444 avatar May 21 '20 15:05 Houston4444

This has been pushed to master. I haven't done the session notes display on GUI but all is present in daemon for this.

For the moment, client description is made to allow a many lines string. It tries to get description from .desktop file. If you don't need a many lines description, I will change this to a single line.

Houston4444 avatar May 22 '20 11:05 Houston4444

Several note lines is fine.

If it's not in the gui, i can't use it. I mean, I need to know where in the XML file and how this is filled otherwise i could not fill the raysession document.

By now, i have a raysession document that is created without using ray_control. I need to understand how proxy works and what are the save levels. Look for each client application involved, find which policy they depend on and fill the ray-proxy.xml accordingly. Is there any documentation ?

newlaurent62 avatar May 22 '20 17:05 newlaurent62

I said, session notes are saved in 'ray-notes' in the session path.

No, there is no documentation, have you read all the tooltips of the ray-proxy dialog ? (Tooltips are displayed when your cursor stays on a widget).

Houston4444 avatar May 22 '20 18:05 Houston4444

Sorry i missed the information. I read to quickely ...

newlaurent62 avatar May 22 '20 19:05 newlaurent62

Ok that seems to work.

Thanks.

newlaurent62 avatar May 22 '20 19:05 newlaurent62

One line descrption is ok.

newlaurent62 avatar May 22 '20 20:05 newlaurent62

Thanks a lot. It's implemented in the wizard and works fine !

newlaurent62 avatar May 22 '20 20:05 newlaurent62

Hi, I changed client description to one line only. It also changes the API, I removed set_description and get_description options, description has to be set/get with set_properties/get_properties.

Houston4444 avatar May 24 '20 10:05 Houston4444

I forgot to mention to not change the gui of description.

Event if the description can feet in an xml attribute, it would be nice to have it display in a multiline text component. Juste remove '\n' before storing in XML.

On the master branch, i get a one line GUI that need to be scrolled to read the entire input ...

Ideally the description should be show up to as a context help message when staying long on a label.

newlaurent62 avatar May 24 '20 19:05 newlaurent62

No problem. I just revert the last commit, so it now works as just before.

Ideally the description should be show up to as a context help message when staying long on a label.

I had the same idea, so if we are two, it's probably a good one.

Houston4444 avatar May 25 '20 20:05 Houston4444

ok tested set_description works.

newlaurent62 avatar May 26 '20 08:05 newlaurent62

Hi, I am implementing the GUI side of theses things. For clients, it's great. For session, it finally appears that the most intuitive design would be the same: tooltip on session name label. 'Notes' are something else, something to edit in a popup window or in a dock widget. In all cases, if you write your description in 'Notes', chances to be viewed by user won't be large. So, I'll put you a 'set_description' and 'get_description' for ray_control, and this will be saved in raysession.xml.

Houston4444 avatar May 28 '20 13:05 Houston4444

ok

newlaurent62 avatar May 28 '20 23:05 newlaurent62