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

UAST column order on Query Results #256

Closed
ricardobaeta opened this issue Aug 14, 2019 · 9 comments
Closed

UAST column order on Query Results #256

ricardobaeta opened this issue Aug 14, 2019 · 9 comments

Comments

@ricardobaeta
Copy link
Contributor

ricardobaeta commented Aug 14, 2019

Context

The uast column, with the buttons to disclose the UAST Modal on the query results table is now ordered as the last column on the right. And it's really on the right because of the blob_content text length. I believe this is not the best experience because of two main reasons:

  1. People have to really horizontal scroll several times - 42629px - before they see the uast column and its buttons. And this only happens if they know there are buttons to see the uast. Moreover, this kind of horizontal scroll is not a common pattern.

  2. If people don't know that there are uast buttons, neither is shown clearly without interaction nor is expected that they will start to scroll horizontally with the idea that the uast column will somehow appear. We have to keep in mind that the most important product's benefits should be shown as clearly as possible, to increase an easy perception of the product's value.

This experience undoubtedly affects people's first-usage and the product's onboarding itself, and even for people who know the existence of these buttons column, the usability we're providing fails deeply when confronted with Fitts Law. This law states that "...the time/effort required to move to a target/button is a function of the ratio between the distance to the target and the width of the target".

Solution

Current behaviour:

The uast column - being the last one - is invisible at first sight and requires an endless interaction/scroll.

image

Proposed behaviour:

The uast column is visible - being one of the first ones - without interaction/scroll.

image

Relevant notice: These considerations are based on this specific query results table.

SELECT f.repository_id, f.file_path,
       LANGUAGE(f.file_path, f.blob_content) AS lang, f.blob_content,
       UAST(f.blob_content, LANGUAGE(f.file_path, f.blob_content)) AS uast
FROM   refs AS r
       NATURAL JOIN commit_files
       NATURAL JOIN files AS f
WHERE  r.ref_name = 'HEAD'
       AND f.file_path REGEXP('.*main.go')
@dpordomingo
Copy link
Contributor

dpordomingo commented Aug 14, 2019

Columns are sorted by its order of appearance in the query used to get the data. Should we alter the way the data is displayed, overriding user request?

Alternative:
Could we fit the displayed columns in the window avoiding the horizontal scroll?
It could be done shrinking wider columns (like blob_content) using max-width or similar, and ellipsing it's content.

@carlosms
Copy link
Contributor

In this case the easiest thing to do is just to make sure that any queries that we use as examples put blob_content as the last column.

@ricardobaeta was that query copied from our documentation? I could only find this example, and it does not contain blob_content https://docs.sourced.tech/community-edition/usage/examples#queries-with-uasts

@carlosms
Copy link
Contributor

Alternative:
Could we fit the displayed columns in the window avoiding the horizontal scroll?
It could be done shrinking wider columns (like blob_content) using max-width or similar, and ellipsing it's content.

I think this is risky, we'll improve the experience for some results, but it may be worse in other cases.
Also the more we deviate from upstream, the more debt we accumulate to be paid when we need to merge newer code later.

My preference would be to wait for a stronger need to make changes like this.

@ricardobaeta
Copy link
Contributor Author

ricardobaeta commented Aug 15, 2019

Columns are sorted by its order of appearance in the query used to get the data. Should we alter the way the data is displayed, overriding user request?

@dpordomingo Altering the way the data is displayed, it's the first step of the solution.

In this case the easiest thing to do is just to make sure that any queries that we use as examples put blob_content as the last column.

@carlosms This seems quite clever. By all means, let's proceed (on you to properly prioritize)

@ricardobaeta was that query copied from our documentation? I could only find this example, and it does not contain blob_content https://docs.sourced.tech/community-edition/usage/examples#queries-with-uasts

@carlosms This query was taken from one of the samples queries of https://gitbase-playground-staging.srcd.run

Thank you all for the outstanding considerations ✨

@carlosms
Copy link
Contributor

Ok, let's close then.

Users can choose the column order with the SQL query.
We don't have any example in our doc where UAST gets hidden to the right.

@dpordomingo
Copy link
Contributor

Alternative:
Could we fit the displayed columns in the window avoiding the horizontal scroll?
It could be done shrinking wider columns [...]

I think this is risky, we'll improve the experience for some results, but it may be worse in other cases.
Also the more we deviate from upstream, the more debt we accumulate to be paid when we need to merge newer code later.

My preference would be to wait for a stronger need to make changes like this.

from #256 (comment), by @carlosms

Shrinking SQLLab output columns is an example of a feature that should not be done in our code, but in upstream. ;)

@ricardobaeta
Copy link
Contributor Author

ricardobaeta commented Aug 17, 2019

This was a reasoned trade-off. My only wish is to add a label upstream to this - although closed - to be easily findable if we are to, later on, send a couple of known usability enhancements for probable closer collaboration with Superset.

Suggestion to make: @dpordomingo's one

Alternative:
Could we fit the displayed columns in the window avoiding the horizontal scroll?
It could be done shrinking wider columns (like blob_content) using max-width or similar, and
ellipsing it's content.

@dpordomingo
Copy link
Contributor

I also think that this kind of issues should be tagged or moved somewhere else to avoid loosing this requests and nice proposals.

@carlosms
Copy link
Contributor

👍 opened a new ticket #262

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

No branches or pull requests

3 participants