WorldWideTelescope / wwt-web-client

The WorldWide Telescope web client lets you explore the universe in your browser.
https://worldwidetelescope.org/webclient/
MIT License
104 stars 35 forks source link

First background imagery list item is confusing "undefined" entry #361

Open Carifio24 opened 11 months ago

Carifio24 commented 11 months ago

Something that was noticed while looking at some images in the web client yesterday is that the first imagery option, regardless of view mode, is always "undefined". The image below shows this in sky mode, but it's the case in other modes as well. Selecting this option has no effect (aside from an error in the console complaining that the get_name function for this option can't be found). DropdownUndefined

From what I can see it's the string '-' added here that's the cause of this. Not adding that element and changing the index here to 0 gets rid of the undefined entry and has the user start at the top. But since this is explicitly added into the imagery collection, I assume there's a reason for it.

pkgw commented 11 months ago

(Recapping a verbal discussion for posterity.) It's been a while since I've dealt with this code, but the basic motivation is to handle a case where the user sets a background imageset that is not in the builtin list for whichever "Look At" mode we happen to be in. Instead of a "-" it could potentially show "(none of the below)" or something like that.

The more correct UX would probably be to add such imagesets to the list as they're discovered. And maybe that wouldn't even be that hard to implement? But it's not something I've looked into.

If I'm remembering correctly, I think that such an approach would potentially also be limited because IIRC the relevant code relies on WWT's name-based imageset identification, which basically relies on sheer luck to be able to uniquely identify imagesets.

I'll leave this issue open as a reminder.