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

Table looks empty at first when querying for a single number #2128

Closed
arikfr opened this issue Dec 6, 2017 · 13 comments
Closed

Table looks empty at first when querying for a single number #2128

arikfr opened this issue Dec 6, 2017 · 13 comments
Milestone

Comments

@arikfr
Copy link
Member

arikfr commented Dec 6, 2017

image

At first I thought there is a bug and I got an empty result, but then I noticed the column on the right...

Any ideas on how to address this?

@kravets-levko @kocsmy

@arikfr arikfr added this to the v4 milestone Dec 6, 2017
@arikfr
Copy link
Member Author

arikfr commented Dec 6, 2017

(to reproduce on your own just run a query like SELECT 1)

@kravets-levko
Copy link
Collaborator

  1. make table auto-width instead of 100%-width.
  2. show results count above the table.

@arikfr
Copy link
Member Author

arikfr commented Dec 6, 2017

Can you elaborate on #1?

@kravets-levko
Copy link
Collaborator

I don't thins it's a great idea actually, but one of possible options. Currently table has width: 100%; we can make it width: auto so it will take a smallest possible width, so in example in this issue, it will have width about 100-150px, so user will see that there are some data.

@arikfr
Copy link
Member Author

arikfr commented Dec 6, 2017

I'm not sure it's that bad. This:

image

Becomes this:
image

The only change this will require is to align the pagination to the left too.

As an alternative is it possible to set the table to 100%, but the columns to auto and take the smallest needed space?

@arikfr
Copy link
Member Author

arikfr commented Dec 6, 2017

Here's another example for the issue:
image

Here you can see all the data, but it's hard to connect the count with the action. So you need to either move the count column or realign it. But out of the box, the data is not readable.

@kravets-levko
Copy link
Collaborator

In general - yes, it's possible, but with "hack": we need to add a column at the end and set it's width to auto; and set width for other columns to something very small - like 0.0001%. But I'm not sure about the case with a lot of columns - that extra column may behave strangely.

@arikfr
Copy link
Member Author

arikfr commented Dec 6, 2017

Yeah, this feels like too much of a hack.

So who's in favor of width: auto for the whole table? :-) (you can vote on this comment)

@kravets-levko
Copy link
Collaborator

I will wait a bit - maybe @kocsmy will have other (better :-) ) ideas

@kocsmy
Copy link
Collaborator

kocsmy commented Dec 6, 2017

If we have only 1 column to show, that should be aligned to the left by default (and I guess the user can still customise and move it to the right if she like).

@kocsmy
Copy link
Collaborator

kocsmy commented Dec 6, 2017

For 2 columns, one very much on the left and the other one on the right: I'd keep it as it is for now. We still have hover to highlight the row, and the user can align the right column content to the left so it gets closer.

Or a slight improvement would be to maximise the column width in its content, but that'll lead to the same hack that @kravets-levko just mentioned.

An ultimate solution would be a more comprehensive spreadsheet table where you can resize the columns.

@kocsmy
Copy link
Collaborator

kocsmy commented Dec 6, 2017

If you'd rather go width: auto, this is how it looks like if we properly align:
screenshot 2017-12-06 12 55 37
screenshot 2017-12-06 12 56 21

@kravets-levko
Copy link
Collaborator

I like how it looks with width: auto

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

No branches or pull requests

3 participants