Skip to content

Conversation

@agaget
Copy link
Contributor

@agaget agaget commented Nov 28, 2025

Currently if no name is indicated in the bob file properties, only [Edit] is displayed, it can be confusing during edition.
image

Now thanks to the DisplayModel information, the complete path of the file is displayed instead following the example of the runtime instance.

  • Testing:
    Result
_9AA0CC66-BC4C-4968-8A08-C94154C4C930_

also tested by @lcaouen

Copy link
Collaborator

@georgweiss georgweiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this works as described, I am not quite sure about the use case. By default the Name property of a display is Display, and only if you set Name to an empty string will the tab title show file path.
Should we not consider to let the Name property default to the file path and let user decide if a change is needed?

@shroffk
Copy link
Member

shroffk commented Dec 1, 2025

So there are a few factors that contributing to the above

When screens are converted from .opi or .edl then the Display name is an empty string... this might be the issue @agaget is primarily trying to address here.

When you create a new display then the editor uses a template... the default being examples:/initial.bob in this template the Display name is "display"

When running old .opi screens when they don't have a name the runtime uses the complete file path as the tab name.

While the complete file path seems very informative it gets very messy very quickly... usually users will have many tabs open and if each tab is deploying the complete path which might be hundreds or chars the tab heading becomes very large.
At NSLS2 we had a script to actually go replace the display name with just the file name.

I would hope we can come up with a holistic and consistent solution here and I would vote for having just the file name... the complete path can be accessed via the display info ( yes it is 2 more clicks.. but it keeps the tabs more manageable )

@agaget
Copy link
Contributor Author

agaget commented Dec 2, 2025

Hi,
This correction was asked by a colleague so I'm not exactly sure what is the use case but as @shroffk said I think it comes from old *.opi files.
The modification was made also to be consistent with runtime where the full path is displayed.

I would agree with @shroffk , just the file name is probably enough, but in this case to be consistent I can change it also in the runtime instance.
Tell me

@georgweiss
Copy link
Collaborator

OK, so I lack the full picture as we do not migrate from .opi and .edl files.

Also agree that full path is not needed.

@shroffk
Copy link
Member

shroffk commented Dec 2, 2025

So,

I think we can make the following changes

  1. remove the "Display" value for the name in the examples:/initial.bob
  2. when the DisplayModel is instantiated then if the name is empty it should be set to just the file name... name="initial"

This should also help address the original issue that @agaget has encountered while having a similar behaviour across edit + runtime

@agaget
Copy link
Contributor Author

agaget commented Dec 3, 2025

Ok, so I have changed the code a little bit.

  • I have changed in the model the function getDisplayName() to return the filename and not the fullPath. That way Instance stay unchanged, and in the editor I just call getDisplayName()
  • I have changed ìnitial.bob` to put empty value by default

Do you think changing the model will interfer with other functionnality ?

(Just created the file yo.bob)
{7DFE50DD-9A29-4D5E-AE64-747BEC2A15FD}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants