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

Coordinate systems widget not sorted #284

Open
aeisenbarth opened this issue Aug 8, 2024 · 5 comments · May be fixed by #285
Open

Coordinate systems widget not sorted #284

aeisenbarth opened this issue Aug 8, 2024 · 5 comments · May be fixed by #285

Comments

@aeisenbarth
Copy link
Contributor

Coordinate systems are displayed non-alphabetically. With a large number of coordinate systems, this makes it hard to find and select a specific one.
Screenshot

If things are unordered, it usually can be caused by the order of file loading (glob on Unix is unordered / inode order, but alphabetical on Windows).

Although elements display alphabetically, there is nothing in the source code that sorts them (they are ordered just by chance, probably order of insertion to the dictionary).

Suggestion

  • Sort elements before adding them to the elements widget
  • Sort coordinate systems before adding them to the widget
  • Always put "global" first (out of alphabetical order), since it is the default coordinate system and users may want to access it easily. Strict alphabetical order would put it somewhere in the middle, harder to find.
@aeisenbarth
Copy link
Contributor Author

SpatialData returns coordinate systems as a set, which has no order and probably also does not preserve insertion order.

@aeisenbarth
Copy link
Contributor Author

Tables should also be ordered. Like elements, they have no inherent order on disk.

However, table columns have an inherent order and should be preserved.

@aeisenbarth aeisenbarth linked a pull request Aug 8, 2024 that will close this issue
@melonora
Copy link
Collaborator

melonora commented Aug 9, 2024

hmm regarding the list widgets used, if you have the widget selected you only have to type the first letter and it will actually jump to the first value encountered starting with that letter, this could be documented (isn't at the moment I believe). Also one thing to note with global first is that this will change as it is not intuitive to have every element in a coordinate system called global as this implies that all the different images live in one coordinate system which is not the case.

@melonora
Copy link
Collaborator

melonora commented Aug 9, 2024

I do see your point with long coordinate system names though where the first parts of the names are really similar.

@LucaMarconato
Copy link
Member

Sounds good to me. We don't have indeed any specific order for the shapes and tables, so any can be set in the UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants