DSO search results currently use the longest alias as their name. This change alters that, DSO search results will use the name most similar to the search query name.
I.e., if a user searches for IC 443, instead of showing LBN 844 as the DSO name, IC 443 will be used. This impacts the dropdown autocomplete on the framing tool and the name of the target when moving from framing tool or sky atlas to sequence.
Names are selected under the following criteria:
If no name was involved in the search, default to previous behavior. Longest alias wins
Else, if an item has an alias that starts with the same value as the search token it is used. If multiple match, longest is used
Else, the alias closest to the search string by levenshtein distance is used. If multiple aliases tie, longest wins.
How were the changes tested?
Manual testing of UI. Unit testing of behavior in DatabaseIntaction class.
Did all Unit Tests pass?
No.
Test Duration Traits Error Message
CustomHorizon_AboveHorizon_CheckTrue Failed 149 ms Expected sut.Check(default) to be true, but found False.
StandardHorizon_AboveHorizon_CheckTrue Failed 108 ms Expected sut.Check(default) to be true, but found False.
These tests fail on clean build without my changes. Did not attempt to correct.
Are there relevant Issues in the tracker that this PR will fix?
Didn’t look, probably not.
Screenshots
Search for LBN 844 (Jellyfish nebula) from Sky Atlas
Search for IC 443 (also Jellyfish nebula) from sky atlas. Notice same results, but searched name is taken by sequencer
Search for IC 44 (substring of IC 443) in Framing Wizard:
Search for LBN 84 (substring of LBN 844) in Framing Wizard:
Search for “Veil” to Sequencer2:
Notes
This approach was taken over the approach discussed on discord. The design on discord would have users configure a hierarchy of catalogs to use for naming. This approach requires no configuration and is seamless to the user, it just does what they expect.
First time contributing to this project and it’s been a long time since I did any type of UI work or C#. Open to all criticisms.
What is the purpose of this Pull Request?
DSO search results currently use the longest alias as their name. This change alters that, DSO search results will use the name most similar to the search query name.
I.e., if a user searches for IC 443, instead of showing LBN 844 as the DSO name, IC 443 will be used. This impacts the dropdown autocomplete on the framing tool and the name of the target when moving from framing tool or sky atlas to sequence.
Names are selected under the following criteria:
If no name was involved in the search, default to previous behavior. Longest alias wins
Else, if an item has an alias that starts with the same value as the search token it is used. If multiple match, longest is used
Else, the alias closest to the search string by levenshtein distance is used. If multiple aliases tie, longest wins.
How were the changes tested?
Manual testing of UI. Unit testing of behavior in DatabaseIntaction class.
Did all Unit Tests pass?
No.
Test Duration Traits Error Message CustomHorizon_AboveHorizon_CheckTrue Failed 149 ms Expected sut.Check(default) to be true, but found False. StandardHorizon_AboveHorizon_CheckTrue Failed 108 ms Expected sut.Check(default) to be true, but found False.
These tests fail on clean build without my changes. Did not attempt to correct.
Are there relevant Issues in the tracker that this PR will fix?
Didn’t look, probably not.
Screenshots
Search for LBN 844 (Jellyfish nebula) from Sky Atlas
Search for IC 443 (also Jellyfish nebula) from sky atlas. Notice same results, but searched name is taken by sequencer
Search for IC 44 (substring of IC 443) in Framing Wizard:
Search for LBN 84 (substring of LBN 844) in Framing Wizard:
Search for “Veil” to Sequencer2:
Notes
This approach was taken over the approach discussed on discord. The design on discord would have users configure a hierarchy of catalogs to use for naming. This approach requires no configuration and is seamless to the user, it just does what they expect.
First time contributing to this project and it’s been a long time since I did any type of UI work or C#. Open to all criticisms.