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

fix: Remove deadzone when hovering example table cells #5363

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion app/src/components/table/CellWithControlsWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import { css } from "@emotion/react";

const cellWithControlsWrapCSS = css`
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
height: 100%;
min-height: 75px;
padding: var(--ac-global-dimension-static-size-200);
.controls {
transition: opacity 0.2s ease-in-out;
opacity: 0;
Expand All @@ -22,7 +27,7 @@ const cellWithControlsWrapCSS = css`

const cellControlsCSS = css`
position: absolute;
top: -23px;
top: -4px;
right: 0px;
display: flex;
flex-direction: row;
Expand Down
4 changes: 4 additions & 0 deletions app/src/pages/playground/PlaygroundDatasetExamplesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ function LargeTextWrap({ children }: { children: ReactNode }) {
css={css`
max-height: 300px;
overflow-y: auto;
padding: var(--ac-global-dimension-static-size-100)
var(--ac-global-dimension-static-size-200);
`}
>
{children}
Expand Down Expand Up @@ -411,6 +413,8 @@ function TableBody<T>({ table }: { table: Table<T> }) {
<td
key={cell.id}
style={{
padding: 0,
height: 1,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The cell still grows to fit, we just need some height declared so that height: 100% in the children works

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you put a comment to that effect?

width: `calc(var(--col-${cell.column.id}-size) * 1px)`,
}}
>
Expand Down
Loading