Skip to content

Commit 2f7928a

Browse files
authored
revert: "refactor: Clean up golden-layout css (#1322)" (#1334)
This reverts commit d1838d7. Was getting build errors when consuming in Enterprise: ``` > Task :web-client-ui:ideClient FAILED ✓ 1043 modules transformed. Could not resolve '../scss/GoldenLayout.module.css' from node_modules/@deephaven/golden-layout/dist/GoldenLayoutThemeExport.js error during build: Error: Could not resolve '../scss/GoldenLayout.module.css' from node_modules/@deephaven/golden-layout/dist/GoldenLayoutThemeExport.js at error (file:///Users/bender/dev/illumon/iris/web/client-ui/node_modules/rollup/dist/es/shared/rollup.js:1858:30) at ModuleLoader.handleResolveId (file:///Users/bender/dev/illumon/iris/web/client-ui/node_modules/rollup/dist/es/shared/rollup.js:22156:24) at file:///Users/bender/dev/illumon/iris/web/client-ui/node_modules/rollup/dist/es/shared/rollup.js:22119:26 ERROR: "build-js" exited with 1. ``` In the `dist/GoldenLayoutThemeExport.js`, the import ends up being: ``` import GoldenLayout from "../scss/GoldenLayout.module.css"; // parseInt for unitless values, stripping "px" ``` But in the scss folder it’s `GoldenLayout.module.scss`, not `.css` The babel preset converts the scss imports to css: ``` [ 'transform-rename-import', { // The babel-plugin-add-import-extension adds the .js to .scss imports, just convert them back to .css original: '^(.+?)\\.s?css.js$', replacement: '$1.css', }, ], ``` Will need to resolve this issue before re-merging this refactor.
1 parent 4c3fe24 commit 2f7928a

23 files changed

Lines changed: 483 additions & 320 deletions

package-lock.json

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

packages/dashboard/src/PanelPlaceholder.scss

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@
44
display: flex;
55
flex-direction: column;
66
justify-content: center;
7+
padding: $spacer-3;
78
min-height: 100%;
89
max-height: 100%;
910
text-align: center;
1011
overflow: hidden;
11-
12-
// add padding on an inner wrapper so it is included in max height of parent
13-
div {
14-
padding: $spacer-3;
15-
}
1612
}

packages/dashboard/src/PanelPlaceholder.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const PanelPlaceholder = React.forwardRef(
1111
const component = LayoutUtils.getComponentNameFromPanel({ props });
1212
return (
1313
<div ref={ref} className="panel-placeholder">
14-
<div>Component &quot;{component}&quot; is not registered.</div>
14+
Component &quot;{component}&quot; is not registered.
1515
</div>
1616
);
1717
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@import '@deephaven/components/scss/custom.scss';
2+
@import './GoldenLayout.scss';
3+
4+
// Exported variables for use in GoldenLayoutThemeExport.js
5+
/* stylelint-disable property-no-unknown */
6+
:export {
7+
tab-height: $tab-height;
8+
drag-border-width: $drag-border-width;
9+
}

0 commit comments

Comments
 (0)