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

Improve adding assemblies internally, and use the assembly displayName in more places in the UI #3180

Merged
merged 4 commits into from
Sep 14, 2022

Conversation

garrettjstevens
Copy link
Collaborator

This has a few different changes related to assemblies:

  • In the session view assemblyNames, this now includes the session assemblies' names as well. This has the effect of being able to choose session assemblies from the assembly selector in e.g. the LGV setup screen.
  • Uses the assembly's displayName instead of name in more user-facing places.
  • Improves waitForAssembly on the assembly manager. Before, if you added an assembly and then immediately called waitForAssembly, it wouldn't work because the reaction that adds the new assembly hadn't fired yet. Now, if it can't find the assembly it waits for a second and tries again to give the reaction time to run.
  • (minor) returns the assembly config when it's added via the session action

@garrettjstevens garrettjstevens self-assigned this Sep 12, 2022
@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Sep 12, 2022
@cmdcolin
Copy link
Collaborator

can you add context about this PR e.g. what made these come up? they are probably good changes but having background is helpful :)

@garrettjstevens
Copy link
Collaborator Author

Some assemblies in Apollo are currently handled as session assemblies, so I want users to be able to select them in e.g. an LGV. Also, those assemblies have a name that's a unique identifier and not very nice to look at, so they have a displayName as well that I'd like to see used when possible. As for the waitForAssembly, I was doing something like this:

session.addAssembly(assemblyConfig)
const assembly = await assemblyManager.waitForAssembly(assemblyConfig.name)
// do stuff with assembly

That didn't work before, but with these changes it does.

@cmdcolin
Copy link
Collaborator

cmdcolin commented Sep 12, 2022

I guess that sounds ok. It is a little bit hard to decide the difference between name and displayName, because to me name is still user-readable in the form of something like hg19 where I would say displayName is "Homo sapiences (hg19)" to make it abundantly clear. In some cases where name is less familiar, then displayName is used (long assembly selectors), but I still thought name is a useful short form of it. It is called a "name" and not an "id", even though it's treated as a unique id

If this is changed to displayname, it is probably ok, but it will look more verbose most likely in some cases.

And there are many places that do I think suppose assembly "name" is displayable...example is the title in the view container

@cmdcolin
Copy link
Collaborator

cmdcolin commented Sep 14, 2022

I would consider that assembly name may be useful to display in places in our UI still. the behavior could be maybe kind of like username and your real name being displayed on a website...

@garrettjstevens
Copy link
Collaborator Author

This PR falls back to the name when there is no displayName, so for many cases it won't change anything. But if a user configures a displayName, it seems like that's what they would expect to see in most cases.

My concern is that "name" is the explicitIdentifier in the assembly config schema, which means it is the only field available to use as a unique ID, and I'd like users to be able to use it as a unique ID if they need it.

@cmdcolin
Copy link
Collaborator

alrighty, we'll go ahead with merge them

@cmdcolin cmdcolin merged commit 33c0970 into main Sep 14, 2022
@cmdcolin cmdcolin deleted the assembly_session_and_displayName branch September 14, 2022 20:47
@cmdcolin cmdcolin added enhancement New feature or request and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Sep 14, 2022
@cmdcolin cmdcolin changed the title Allow selecting session assemblies, improve session adding Allow selecting session assemblies, improve session adding, and use the assembly displayName Sep 14, 2022
@cmdcolin cmdcolin changed the title Allow selecting session assemblies, improve session adding, and use the assembly displayName Allow selecting session assemblies, improve session adding, and use the assembly displayName in more places in the UI Sep 14, 2022
@cmdcolin cmdcolin changed the title Allow selecting session assemblies, improve session adding, and use the assembly displayName in more places in the UI Improve adding assemblies internally, and use the assembly displayName in more places in the UI Sep 15, 2022
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

Successfully merging this pull request may close these issues.

2 participants