-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Data views: Add density preference to Table layout #66312
Comments
Agreed with supporting this. It's useful for offering extenders flexibility while also recognizing user preferences. It's also somewhat analogous to grid item size for the grid view. |
For the record, I've grouped together issues related to "theming" in the dataviews component issue, so they are visible #55083 |
Thanks @jameskoster !
I'll think about other potential cases. |
It would be good to mockup the tables with different density values too, the ones in the OP were quickly hacked together :) |
@jameskoster I made the mockups for the
I think that works well, just the icons are placeholders for now. Do you think that's worth exploring further?
I made a similar mockup to what Veronica (not sure what's her username here on GH) proposed, but I thought it would be better to have just 3 levels not 4 (for
Was thinking about the simple radio button option but I realised we might not want to use that on the panel, as the component for the items per page and order works as a radio selection..? I made this option then, but understand that might be a bit of a stretch! What do you think? |
I love this! It's simple and gives us the flexibility that we need. As I mentioned elsewhere I think we should be able to come up with three predefined settings for the general table component (adjusting padding, badge variant if needed, and perhaps choosing a different variant of the body copy size from the predefined typescale). That would be hard to solve using the actual
Considering using |
I think density is something that could be supported by any layout if they want to and in order to do that maybe a first step is to use predefined options (like Default, Compact and Comfortable) and not specific icons for every one. Would it be okay to start without icons for now? |
@ntsekouras Thanks for your feedback! I'm not convinced anymore that we should use text labels, for the reason I mentioned earlier:
But as @jameskoster said, we can start with a slider approach first; in this case, the
Are you happy with a three-grade slider or leaning more towards a continuous line? @jameskoster @ntsekouras |
I'm okay with the slider but also checking the code right now to see how we can abstract it better for any layout. It seems we show different density options depending on the viewport width. Is this something we want to preserve? Because it might not make sense in all layouts and we might want to be consistent and always show 3 options. |
Now that I'm exploring it a bit more, I don't think we can avoid the labels as the |
Something that I'm exploring in parallel is how the I marked what in my opinion should be the initial views for each example with a green dot. |
I created a PR for this here and we can discuss and update the design.
By implementing this I realised the validity of @rogermattic's point about the That also means, that if we agree on such presets, a slider could also be used. |
@ntsekouras I just saw the screencast on the PR. t looks great! I really love the clarity of this approach—the labels make everything so clear. My only concern is whether longer labels might cause issues with fitting, especially once localized.
Thank you! Sorry if I wasn’t very clear in explaining that point :) I was thinking about the alternatives to |
I was reading through the convo, and if the options label default and medium, the default name doesn't clarify what it is. Like Google's options (screenshot above), there is a need to click other options to find what default means. :) |
Depending on the type / amount of data being viewed, and accessibility preferences, it could be nice to offer users a density option in data views Table layout. In addition to the default spacing, we might offer higher and lower density options.
Increased density
Relaxed density
These options would likely live in the view options. What do you think?
The text was updated successfully, but these errors were encountered: