-
Notifications
You must be signed in to change notification settings - Fork 162
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
James/second tree dropdown #1795
Conversation
The previous code used `.filter` in a rather strange way! There should be no changes here, although the new code does ensure the displayed options don't include any duplicates and accounts for situations where the `secondTreeOptions` key is not defined.
Don't display the sidebar UI if we're just going to display an empty dropdown! See <https://bedfordlab.slack.com/archives/C0K3GS3J8/p1719424903252149> for context
ddd4017
to
e626f99
Compare
@@ -1,5 +1,8 @@ | |||
# Changelog | |||
|
|||
* We no longer show the "second tree" sidebar dropdown when there are no available options. The possible options are defined by [the charon/getAvailable API](https://docs.nextstrain.org/projects/auspice/en/stable/server/api.html) response and as such vary depending on the server in use. ([#1795](https://github.com/nextstrain/auspice/pull/1795)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for noting the possible options can vary depending on the server! Prompted me to review how auspice does it internally with findAvailableSecondTreeOptions and how nextstrain.org uses convertManifestJsonToAvailableDatasetList.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this whole area needs to be rethought at some stage -- the current hierarchical dropdown for changing datasets, the available second trees, how it relates to snapshots etc. There's some design work around but nothing concrete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous code used
.filter
in a rather strange way!
git blame just out of bootcamp Jover from ~5 years ago 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh! I assumed it was me! Progress from each of us 😃
Note that if the main tree doesn't have any 2nd tree options but you load a second tree by manipulating the URL then you don't get the dropdown option to remove the 2nd tree. I think this is fine (just manipulate the URL to remove it!), but we can add some UI elements here if needed. |
Don't display the sidebar UI if we're just going to display an empty
dropdown!
See https://bedfordlab.slack.com/archives/C0K3GS3J8/p1719424903252149
for context