Skip to content

Commit

Permalink
Fix types and generate snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrunyon committed Jul 3, 2024
1 parent d119a4d commit 9775feb
Show file tree
Hide file tree
Showing 53 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/iris-grid/src/IrisGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@ class IrisGrid extends Component<IrisGridProps, IrisGridState> {
return rowIndex != null ? modelRows.get(rowIndex) : null;
}

getTheme(): Partial<IrisGridThemeType> {
getTheme(): IrisGridThemeType {
const { model, theme } = this.props;

return this.getCachedTheme(
Expand Down
2 changes: 0 additions & 2 deletions packages/iris-grid/src/IrisGridIcons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import {
IconDefinition,
} from '@deephaven/icons';

export const ICON_SIZE = 16;

export type IconName =
| 'sortUp'
| 'sortDown'
Expand Down
2 changes: 1 addition & 1 deletion packages/iris-grid/src/IrisGridRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export class IrisGridRenderer extends GridRenderer {
mouseX: Coordinate | null;
mouseY: Coordinate | null;
metrics: GridMetrics | undefined;
theme: GridThemeType;
theme: IrisGridThemeType;
}): {
left: Coordinate | null;
top: Coordinate | null;
Expand Down
9 changes: 4 additions & 5 deletions packages/iris-grid/src/IrisGridTextCellRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ import {
DEFAULT_FONT_WIDTH,
getOrThrow,
GridMetrics,
GridThemeType,
GridUtils,
TextCellRenderer,
VisibleIndex,
} from '@deephaven/grid';
import { TableUtils } from '@deephaven/jsapi-utils';
import { IrisGridRenderState } from './IrisGridRenderer';
import { ICON_SIZE } from './IrisGridIcons';
import IrisGridCellRendererUtils from './IrisGridCellRendererUtils';
import type { IrisGridThemeType } from './IrisGridTheme';

class IrisGridTextCellRenderer extends TextCellRenderer {
drawCellContent(
Expand Down Expand Up @@ -85,7 +84,7 @@ class IrisGridTextCellRenderer extends TextCellRenderer {
mouseX: Coordinate | null,
mouseY: Coordinate | null,
metrics: GridMetrics | undefined,
theme: GridThemeType
theme: IrisGridThemeType
): {
left: Coordinate | null;
top: Coordinate | null;
Expand All @@ -107,9 +106,9 @@ class IrisGridTextCellRenderer extends TextCellRenderer {
}

const { width: gridWidth, verticalBarWidth } = metrics;
const { cellHorizontalPadding } = theme;
const { cellHorizontalPadding, iconSize } = theme;

const width = ICON_SIZE + 2 * cellHorizontalPadding;
const width = iconSize + 2 * cellHorizontalPadding;
const height = rowHeight;
// Right edge of column or of visible grid, whichever is smaller
const right = Math.min(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class IrisGridCellOverflowMouseHandler extends GridMouseHandler {
const { model } = props;

const { canvasContext: context } = grid;
const theme = grid.getTheme();
const theme = this.irisGrid.getTheme();
const rendererState = {
context,
mouseX: x,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/context-menu.spec.ts-snapshots/sort-by-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/context-menu.spec.ts-snapshots/sort-by-1-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/context-menu.spec.ts-snapshots/sort-by-1-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/context-menu.spec.ts-snapshots/sort-by-2-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/context-menu.spec.ts-snapshots/sort-by-2-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/styleguide.spec.ts-snapshots/grids-iris-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/styleguide.spec.ts-snapshots/grids-iris-firefox-linux.png
Binary file modified tests/styleguide.spec.ts-snapshots/grids-iris-webkit-linux.png

0 comments on commit 9775feb

Please sign in to comment.