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

Reduce Flat Data Grid row height to display more data rows #138

Closed
RandomFractals opened this issue Sep 2, 2022 · 3 comments
Closed

Reduce Flat Data Grid row height to display more data rows #138

RandomFractals opened this issue Sep 2, 2022 · 3 comments
Labels
enhancement Feature enhancement

Comments

@RandomFractals
Copy link
Owner

Currently those table rows have line-height set to 1.5 (see https://github.com/githubocto/flat-ui/blob/main/src/index.css#L13) and hardcoded .cell height is set to 40px with inline styles for each data cell div.

This results in not even 10 rows of actual data rows we can display in our limited 560px table view in a notebook cell output.

Flat data grid header summary row with bar charts is really nice to get a quick dataset overview.

Reducing regular row height to 24px or so could make that data table renderer even more useful for quick data scans.

@RandomFractals RandomFractals added the enhancement Feature enhancement label Sep 2, 2022
@RandomFractals
Copy link
Owner Author

RandomFractals commented Sep 2, 2022

Adding the following CSS rules fixes this issue for a pinned column and data row line-height:

/* flat grid styles */
.github-octo-flat-ui {
  line-height: 0.8 !important;
}

.cell {
  height: 24px !important;
}

However, I couldn't find how to get rid of the extra space between table rows after those changes. I suspect that is caused by some flex/box sizing or :before/:after rules or something else hardcoded in the actual flat ui grid component when rows are generated.

image

In general that grid could use more custom grid, row, cell classes exposed in CSS to enable devs integrating that data grid component overwrite grid row/cell styles it in their apps easily.

RandomFractals added a commit to RandomFractals/flat-ui that referenced this issue Oct 2, 2023
to reduce overall grid row height in our data table renderers flat grid view. see: RandomFractals/vscode-data-table#138
RandomFractals added a commit to RandomFractals/flat-ui that referenced this issue Oct 2, 2023
@RandomFractals
Copy link
Owner Author

Dense flat UI grid display with more rows after line item height and grid row height changes applied to flat UI grid in our fork:

https://github.com/RandomFractals/flat-ui

dense-flat-ui-grid-rows

RandomFractals added a commit to RandomFractals/flat-ui that referenced this issue Oct 2, 2023
RandomFractals added a commit that referenced this issue Oct 2, 2023
and bump this ext. version to 1.14.0
@RandomFractals
Copy link
Owner Author

New denser flat UI grid renderer display with 15 rows of data and header summary row:

image

@RandomFractals RandomFractals changed the title Reduce Flat Data Grid row height Reduce Flat Data Grid row height to display more data rows Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature enhancement
Projects
None yet
Development

No branches or pull requests

1 participant