Skip to content

Commit

Permalink
Address Don's suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrunyon committed Jul 22, 2024
1 parent b52373f commit a83f745
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 22 deletions.
2 changes: 1 addition & 1 deletion packages/code-studio/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { Suspense } from 'react';
import ReactDOM from 'react-dom';
import '@deephaven/components/scss/BaseStyleSheet.scss'; // Do NOT move any lower. This needs to be imported before any other styles
import { Provider } from 'react-redux';
import { LoadingOverlay, preloadTheme } from '@deephaven/components';
import { ApiBootstrap } from '@deephaven/jsapi-bootstrap';
import { store } from '@deephaven/redux';
import '@deephaven/components/scss/BaseStyleSheet.scss';
import logInit from './log/LogInit';

logInit();
Expand Down
2 changes: 1 addition & 1 deletion packages/embed-widget/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Suspense } from 'react';
import ReactDOM from 'react-dom';
import '@deephaven/components/scss/BaseStyleSheet.scss';
import '@deephaven/components/scss/BaseStyleSheet.scss'; // Do NOT move any lower. This needs to be imported before any other styles
import { LoadingOverlay, preloadTheme } from '@deephaven/components';
import { ApiBootstrap } from '@deephaven/jsapi-bootstrap';
import './index.scss';
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 @@ -573,7 +573,7 @@ export class IrisGridRenderer extends GridRenderer {

context.save();

context.font = theme.font;
context.font = theme.filterBarFont;
context.textAlign = 'left';

if (
Expand Down
22 changes: 6 additions & 16 deletions packages/iris-grid/src/IrisGridTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,8 @@ import IrisGridThemeRaw from './IrisGridTheme.module.scss';

const log = Log.module('IrisGridTheme');

interface IrisGridDensity {
cellHorizontalPadding: number;
headerHorizontalPadding: number;
minColumnWidth: number;
rowHeight: number;
font: string;
headerFont: string;
iconSize: number;
columnHeaderHeight: number;
}

export type IrisGridThemeType = GridThemeType & {
filterBarFont: string;
filterBarCollapsedHeight: number;
filterBarHeight: number;
reverseHeaderBarHeight: number;
Expand Down Expand Up @@ -59,8 +49,8 @@ export type IrisGridThemeType = GridThemeType & {
floatingGridRowColor: NullableGridColor;
iconSize: number;
density: {
compact: Partial<IrisGridDensity>;
spacious: Partial<IrisGridDensity>;
compact: Partial<Omit<IrisGridThemeType, 'density'>>;
spacious: Partial<Omit<IrisGridThemeType, 'density'>>;
};
};

Expand Down Expand Up @@ -94,6 +84,7 @@ export function createDefaultIrisGridTheme(): IrisGridThemeType {
white: IrisGridTheme.white,
black: IrisGridTheme.black,
font: IrisGridTheme.font,
filterBarFont: IrisGridTheme.font,
headerBackgroundColor: IrisGridTheme['header-bg'],
headerColor: IrisGridTheme['header-color'],
headerSeparatorColor: IrisGridTheme['header-separator-color'],
Expand Down Expand Up @@ -202,14 +193,13 @@ export function createDefaultIrisGridTheme(): IrisGridThemeType {

density: {
compact: {
cellHorizontalPadding: 2,
cellHorizontalPadding: 5, // Same as regular set in GridTheme
headerHorizontalPadding: 10,
minColumnWidth: 10,
rowHeight: 16,
font: '11px Fira Sans, sans-serif',
headerFont: '600 11px Fira Sans, sans-serif',
iconSize: 14,
columnHeaderHeight: 24,
columnHeaderHeight: 26,
},
spacious: {
cellHorizontalPadding: 7,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ exports[`createDefaultIrisGridTheme should derive the default Iris grid theme 1`
"dateColor": "IrisGridTheme['date-color']",
"density": {
"compact": {
"cellHorizontalPadding": 2,
"columnHeaderHeight": 24,
"cellHorizontalPadding": 5,
"columnHeaderHeight": 26,
"font": "11px Fira Sans, sans-serif",
"headerFont": "600 11px Fira Sans, sans-serif",
"headerHorizontalPadding": 10,
"iconSize": 14,
"minColumnWidth": 10,
Expand All @@ -46,6 +45,7 @@ exports[`createDefaultIrisGridTheme should derive the default Iris grid theme 1`
"filterBarExpandedActiveBackgroundColor": "IrisGridTheme['filter-bar-expanded-active-bg']",
"filterBarExpandedActiveCellBackgroundColor": "IrisGridTheme['filter-bar-expanded-active-cell-bg']",
"filterBarExpandedBackgroundColor": "IrisGridTheme['filter-bar-expanded-bg']",
"filterBarFont": "IrisGridTheme['font']",
"filterBarHeight": 30,
"filterBarHorizontalPadding": 4,
"filterBarSeparatorColor": "IrisGridTheme['filter-bar-separator-color']",
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.

0 comments on commit a83f745

Please sign in to comment.