Aircloak / aircloak

This repository contains the Aircloak Air frontend as well as the code for our Cloak query and anonymization platform
2 stars 0 forks source link

Sort columns alphabetically on load #3508

Open sebastian opened 5 years ago

sebastian commented 5 years ago

Benefit:

Desired outcome:

obrok commented 5 years ago

Easier to find columns

If you mean that they are easier to find in the air interface, then sorting in cloak is definitely not the way to achieve this. If presentation requires sorting by certain criteria, then it should be sorted in the presentation layer.

cristianberneanu commented 5 years ago

This has dubious value in my eyes: no one asked for it and it is not an objective improvement (some people will prefer that we keep the column order from the data store).

if a uid-column exists, then sort it at the top

What about keys?

If presentation requires sorting by certain criteria, then it should be sorted in the presentation layer.

The problem with this approach is that we have multiple presentation layers that can easily get out of sync: we have a presentation layer in the Air UI and one in the cloak, for the show columns output.

sebastian commented 5 years ago

What about keys?

Keys should ideally be marked and sorted at the top too... It would be great to have some visual marker for uid-columns and some for keys.

The problem with this approach is that we have multiple presentation layers that can easily get out of sync: we have a presentation layer in the Air UI and one in the cloak, for the show columns output.

☝️

sebastian commented 5 years ago

This has dubious value in my eyes: no one asked for it and it is not an objective improvement (some people will prefer that we keep the column order from the data store).

Maybe it's mostly a personal problem of mine. I have had many cases where I just can't find a column. Particularly the UID column when it is hiding in a list of (literally!) hundred other columns.

cristianberneanu commented 5 years ago

I have had many cases where I just can't find a column. Particularly the UID column when it is hiding in a list of (literally!) hundred other columns.

There are 3 separate, orthogonal things here:

sebastian commented 4 years ago

We could sort by this tuple (is user id, is key, column name) where true sorts above false and column name is sorted lexicographically in ascending order. This would make it easier to work with columns, and know where to look for them.

sebastian commented 4 years ago

We have a problem whereby we have no control over the columns returned by the psql interface for Postgres specific queries.