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

chore(ui): Call table footer - pagination sizing, call-out for Alt/Option command #3305

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

m-rgba
Copy link
Contributor

@m-rgba m-rgba commented Dec 23, 2024

Description

  • Updated sizing of pagination footer to be smaller / tighter.
  • Added call-out for Alt/Option+click command for the datatable.
  • De-duped the playground isMac command to use utils (same as here).

Screenshot

Before:
before-pagination
After:
after-pagination

@circle-job-mirror
Copy link

@m-rgba m-rgba marked this pull request as ready for review December 30, 2024 16:48
@m-rgba m-rgba requested review from a team as code owners December 30, 2024 16:48
@m-rgba
Copy link
Contributor Author

m-rgba commented Dec 30, 2024

Copy link
Member

@gtarpenning gtarpenning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small changes requested:

for small table sizes we probably want this text to be hidden (or something, maybe tooltip?) instead of wrapping.
Screenshot 2024-12-30 at 9 54 05 AM

When the table is being shown in a preview, like in the details drawer, we don't need to show this callout. It just adds complexity and does nothing (cells aren't clickable here).
Screenshot 2024-12-30 at 9 55 07 AM

@@ -392,7 +392,7 @@ export const DataTableView: FC<{
const displayRows = 10;
const hideFooter = USE_TABLE_FOR_ARRAYS && gridRows.length <= displayRows;
const headerHeight = 40;
const footerHeight = 52;
const footerHeight = 40;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the height of the footer bar in px after the smaller button change. It gets passed to help calculate the height of the datatable above it.

Comment on lines +706 to +737
display="flex"
alignItems="center"
marginLeft="auto"
marginRight={1}
sx={{fontSize: '14px', color: MOON_500}}>
<Box
component="span"
sx={{
fontSize: '12px',
border: `1px solid ${MOON_400}`,
fontWeight: '600',
padding: '0px 4px',
marginRight: '4px',
borderRadius: '4px',
}}>
{isMac ? 'Option' : 'Alt'}
</Box>
+
<Box
component="span"
sx={{
fontSize: '12px',
border: `1px solid ${MOON_400}`,
fontWeight: '600',
padding: '0px 4px',
marginLeft: '4px',
marginRight: '4px',
borderRadius: '4px',
}}>
Click
</Box>
on a cell to filter by the value
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this could be its own decomposed component. name suggestions: "CellSortCallout", "PaginationControlsSortCallout" etc

@m-rgba
Copy link
Contributor Author

m-rgba commented Dec 30, 2024

When the table is being shown in a preview, like in the details drawer, we don't need to show this callout. It just adds complexity and does nothing (cells aren't clickable here).

Yes, will update - should hide it away when the screen is too wide and on the child views. Will also make it its own component 👍

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

Successfully merging this pull request may close these issues.

2 participants