Skip to content

Commit

Permalink
Merge pull request #204 from Exabyte-io/chore/cleanups+use-css
Browse files Browse the repository at this point in the history
chore: cleanups + use css + setup pre-commit hook
  • Loading branch information
timurbazhirov committed Mar 27, 2024
2 parents 3d781a5 + 6dc14e7 commit f4d08c7
Show file tree
Hide file tree
Showing 19 changed files with 156 additions and 1,168 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -4,7 +4,7 @@
build/
node_modules/
.eslintcache
.husky/
.husky/_/
.nyc_output/
tests-legacy/node_modules/
tests-legacy/.screenshots/*
Expand Down
17 changes: 17 additions & 0 deletions .husky/pre-commit
@@ -0,0 +1,17 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

echo ">>>>>>>> Husky Pre-commit: Fixing lint"
echo ""
npm run lint:fix

echo ">>>>>>>> Husky Pre-commit: Transpiling sources"
echo ""
npm run transpile
npm run transpile-tests
git status

echo ">>>>>>>> Husky Pre-commit: Adding transpiled sources in dist"
echo ""
git add dist
echo ""
Expand Up @@ -27,6 +27,7 @@ class JupyterLiteTransformation extends React.Component {
const material = new Made.Material(config);
material.validate();
validMaterials.push(material);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
}
catch (e) {
validationErrors.push(`Failed to create material ${config.name}: ${JSON.stringify(e.details.error[0])}`);
Expand All @@ -35,6 +36,7 @@ class JupyterLiteTransformation extends React.Component {
}, []);
return { validatedMaterials, validationErrors };
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
this.handleSetMaterials = (data) => {
const configs = data.materials;
if (Array.isArray(configs)) {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js
@@ -1,7 +1,7 @@
import { jsx as _jsx } from "react/jsx-runtime";
// Load styling, bootstrap needs to be loaded first
import "@exabyte-io/wave.js/dist/stylesheets/main.css";
import "./stylesheets/main.scss";
import "./stylesheets/main.css";
// eslint-disable-next-line import/no-unresolved, import/no-extraneous-dependencies
import React from "react";
import ReactDOM from "react-dom";
Expand Down
62 changes: 54 additions & 8 deletions dist/stylesheets/main.css
@@ -1,13 +1,59 @@
/**
* SCSS Sources for the CSS content below
*/

/**
$header-height: 54px;
$footer-height: 54px;
$crystal-lattice-accordion-height-with-borders: 56px;
.three-renderer {
height: calc(100vh - $footer-height - $header-height); }
height: calc(100vh - $footer-height - $header-height);
}
#basis-xyz {
height: calc( 100vh - $footer-height - $header-height - $crystal-lattice-accordion-height-with-borders - $crystal-basis-accordion-header-with-button-group);
overflow-y: hidden; }
#basis-xyz .cm-editor {
$crystal-basis-accordion-header-with-button-group: 116px;
height: calc(
100vh - $footer-height - $header-height -
$crystal-lattice-accordion-height-with-borders - $crystal-basis-accordion-header-with-button-group
);
overflow-y: hidden;
.cm-editor {
// Assuming that `em` will pick up the font size of the MUI theme
font-size: 0.9em;
max-height: calc( 100vh - $footer-height - $header-height - $crystal-lattice-accordion-height-with-borders - $crystal-basis-accordion-header-with-button-group);
max-height: calc(
100vh - $footer-height - $header-height -
$crystal-lattice-accordion-height-with-borders - $crystal-basis-accordion-header-with-button-group
);
resize: vertical;
overflow-y: auto; }
#basis-xyz .cm-editor .cm-scroller {
min-height: calc( 100vh - $footer-height - $header-height - $crystal-lattice-accordion-height-with-borders - $crystal-basis-accordion-header-with-button-group); }
overflow-y: auto;
.cm-scroller {
min-height: calc(
100vh - $footer-height - $header-height -
$crystal-lattice-accordion-height-with-borders - $crystal-basis-accordion-header-with-button-group
);
}
}
}
**/

.three-renderer {
height: calc(100vh - 108px);
}

#basis-xyz {
height: calc(100vh - 280px);
overflow-y: hidden;
}

#basis-xyz .cm-editor {
font-size: 0.9em;
max-height: calc(100vh - 280px);
resize: vertical;
overflow-y: auto;
}

#basis-xyz .cm-editor .cm-scroller {
min-height: calc(100vh - 280px);
}
@@ -0,0 +1,12 @@
"use strict";

Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _material_designer_page = require("../widgets/material_designer_page");
function _default() {
this.When(/^I generate interpolated set with "([^"]*)" intermediate images$/, nImages => {
_material_designer_page.materialDesignerPage.designerWidget.generateInterpolatedSet(parseInt(nImages));
});
}

0 comments on commit f4d08c7

Please sign in to comment.