Fix #2798 - Show Uneditable measure name in addition to Display Name#3438
Fix #2798 - Show Uneditable measure name in addition to Display Name#3438jmarrec wants to merge 2 commits intoNatLabRockies:developfrom
Conversation
… original name in Edit pane.
|
@DavidGoldwasser Let me know if that solves your issue, and whether you'd like to request a different terminology for 'Original Name' if need be. |
|
There are actually three names here: Measure machine name - name from measure.xml There are also description and modeler description fields in the OSW. I think that the center pane should show information from the OSW. The right pane should show information from the measure.xml. Is that what your change is doing? |
|
@macumber I don't think the "Name" field in the "Edit" tab can come from the measure.xml, seems like it has to be from OSW steps so that multiple instances of the same measure can have unique name. the non editable "Original Name" could come from the measure.xml |
|
If I follow correctly I think I got it right:
Basically measure.xml is used only when dragging from library to create a workflow step. It was already the case really, except it was using the display_name tag from measure.xml to initialize the 'name' tag in workflow step (and display_name in workflow step didn't exist). This appears to work I think. I'm not sure if I'm clarifying here or adding confusion (I'm on my phone sorry...) I can take a gif of it in action tonorrow or you can build my branch and see yourself (no Idd change, should rebuild fast) |
|
Yeah I think it is confusing. I lobbied for a more literal display on this tab but got shot down., I would prefer to have the following: |
|
As far as I know, nothing in the app (except for creating measures) will alter the measure.rb file. The measure.rb file is the source for measure name, display name, class name, description, and modeler description when check for updates runs |
|
Ok. So whenever you clicked on a measure step, the edit pane gets brought up. Currently information is all coming from the workflow.osw,. With your proposed scenario, do you:
I find your proposed scenario to be sensible, I'm just wondering if this extra work is worth it in comparison of the (IMHO) little gain in functionality, and I'm afraid of the added complexity if you need to re-read measure.xml every time (potential path issues, extra operations to be done). |
|
I feel that the term "Original Measure Name" is confusing things even more. If this edit pane is restricted to items in the OSW only then there is no "Original Measure Name" in the OSW, the closest thing would be "Measure Dir Name". IMHO "Measure Dir Name" is useful, is not user editable, and is what WorkflowJSON actually uses to locate the measure. For now, let's constrain the UI to only show content in the OSW and keep the keys aligned with what is in the OSW: "Name" - editable step name |
|
The terminology could be changed to Name and display Name to match the workflow OSW tag if that's the problem. So, bottom line, I added "display_name" to OSW, should I just undo all of that work and just use the measure_dir_name then? |
|
Yes please, no changes should be made to the OSW. Let's restart and just add "Measure Dir Name", the "Original Name" is a red herring and we don't want to pursue it. |
There was a problem hiding this comment.
Need to constrain ourselves to existing keys in the OSW schema:
https://github.com/NREL/OpenStudio-workflow-gem/blob/develop/spec/schema/osw.json#L324
in OSW name is the editable name of the MeasureStep, measure_dir_name is the uneditable name of the measure directory.
Fix #2798 - Show Uneditable measure name in addition to Display Name
Upon dragging a new measure:
namegoes to "Original Name" and cannot be modifieddisplay_namewill serve as default for the (Editable) 'Name' in the Edit Pane (if same display name is found, then add an integer counter to display name). Whatever is set there will be shown in the Measure List in the main pane, and will be saved in workflow.osw as well.