Skip to content

Commit c0084cf

Browse files
authored
feat: DH-16956: Move fontbootstrap from app-utils to components so it can be consumed in DHE (#2545)
To fix DH-16956 and also resolve weird Pop OS linux font issues, we should switch enterprise to use the fontsource fonts. Since app-utils is not used in enterprise and can't be imported there, moving fontbootstrap to components under theme seemed like the best solution. Will need a change in DHE to adopt font-bootstrap once published, and a heads up to enterprise QA that there may be minor e2e test differences similar to what we had in core in #1944
1 parent 28d6377 commit c0084cf

10 files changed

Lines changed: 15 additions & 12 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/app-utils/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@
4646
"@deephaven/redux": "file:../redux",
4747
"@deephaven/storage": "file:../storage",
4848
"@deephaven/utils": "file:../utils",
49-
"@fontsource/fira-mono": "5.0.13",
50-
"@fontsource/fira-sans": "5.0.20",
5149
"@paciolan/remote-component": "2.13.0",
5250
"@paciolan/remote-module-loader": "^3.0.2",
5351
"classnames": "^2.5.1",

packages/app-utils/src/components/AppBootstrap.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ import '@deephaven/components/scss/BaseStyleSheet.scss';
55
import { ClientBootstrap } from '@deephaven/jsapi-bootstrap';
66
import { useBroadcastLoginListener } from '@deephaven/jsapi-components';
77
import { type Plugin } from '@deephaven/plugin';
8-
import { ContextActions, ContextMenuRoot } from '@deephaven/components';
9-
import FontBootstrap from './FontBootstrap';
8+
import {
9+
ContextActions,
10+
ContextMenuRoot,
11+
FontBootstrap,
12+
FontsLoaded,
13+
} from '@deephaven/components';
1014
import PluginsBootstrap from './PluginsBootstrap';
1115
import AuthBootstrap from './AuthBootstrap';
1216
import ConnectionBootstrap from './ConnectionBootstrap';
1317
import { getConnectOptions, createExportLogsContextAction } from '../utils';
14-
import FontsLoaded from './FontsLoaded';
1518
import UserBootstrap from './UserBootstrap';
1619
import ServerConfigBootstrap from './ServerConfigBootstrap';
1720
import ThemeBootstrap from './ThemeBootstrap';

packages/app-utils/src/components/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ export * from './AppDashboards';
33
export * from './AuthBootstrap';
44
export * from './ConnectionBootstrap';
55
export * from './ConnectionContext';
6-
export * from './FontBootstrap';
7-
export * from './FontsLoaded';
86
export * from './PluginsBootstrap';
97
export * from './ThemeBootstrap';
108
export * from './useConnection';

packages/code-studio/src/styleguide/StyleGuideRoot.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useEffect } from 'react';
22
import { Provider } from 'react-redux';
3-
import { FontBootstrap } from '@deephaven/app-utils';
3+
import { FontBootstrap } from '@deephaven/components';
44
import '@deephaven/components/scss/BaseStyleSheet.scss';
55
import { MonacoUtils } from '@deephaven/console';
66
import { store } from '@deephaven/redux';

packages/components/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
"@deephaven/log": "file:../log",
3030
"@deephaven/react-hooks": "file:../react-hooks",
3131
"@deephaven/utils": "file:../utils",
32+
"@fontsource/fira-mono": "5.0.13",
33+
"@fontsource/fira-sans": "5.0.20",
3234
"@fortawesome/fontawesome-svg-core": "^6.2.1",
3335
"@fortawesome/react-fontawesome": "^0.2.0",
3436
"@hello-pangea/dnd": "^18.0.1",

packages/components/scss/BaseStyleSheet.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ input[type='number']::-webkit-inner-spin-button {
913913
}
914914
}
915915

916-
/** Preload some fonts for grid metric calculations, loaded in App.jsx */
916+
/** Preload some fonts for grid metric calculations, loaded by FontBootstrap */
917917
/* stylelint-disable */
918918
.fira-sans-regular {
919919
font-family: 'Fira Sans';
File renamed without changes.

packages/app-utils/src/components/FontsLoaded.tsx renamed to packages/components/src/theme/FontsLoaded.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useContext } from 'react';
2-
import { LoadingOverlay } from '@deephaven/components';
2+
import LoadingOverlay from '../LoadingOverlay';
33
import { FontsLoadedContext } from './FontBootstrap';
44

55
export type FontsLoadedProps = {

packages/components/src/theme/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ export * from './Logo';
99
export * from './colorUtils';
1010
export * from './useExternalTheme';
1111
export * from './useSpectrumThemeProvider';
12+
export * from './FontsLoaded';
13+
export * from './FontBootstrap';

0 commit comments

Comments
 (0)