Skip to content

Commit

Permalink
reverting react-table column resize change, fixing test, removing ubu…
Browse files Browse the repository at this point in the history
…ntu-mono font style to get a smaller bundle size - #46
  • Loading branch information
tnrich committed Nov 8, 2023
1 parent 1133914 commit 53070cd
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 35 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
"@blueprintjs/core": "3.52.0",
"@blueprintjs/datetime": "3.23.19",
"@blueprintjs/select": "3.18.11",
"@fontsource/ubuntu-mono": "^4.5.11",
"@hello-pangea/dnd": "16.2.0",
"@risingstack/react-easy-state": "^6.3.0",
"@teselagen/react-table": "6.10.13",
"@teselagen/react-table": "6.10.16",
"@use-gesture/react": "^10.2.23",
"axios": "^0.21.1",
"browser-or-node": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ove/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@teselagen/ove",
"version": "0.3.51",
"version": "0.3.52",
"main": "./src/index.js",
"exports": {
".": {
Expand Down
24 changes: 12 additions & 12 deletions packages/ove/src/DigestTool/Ladder.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable react/jsx-no-bind */
import React, { useState } from "react";
import { showConfirmationDialog, TgSelect } from "@teselagen/ui";
import html2canvas from "html2canvas";

import "./Ladder.css";
import { Button, Tooltip } from "@blueprintjs/core";
Expand Down Expand Up @@ -123,18 +122,19 @@ export default function Ladder({
icon="duplicate"
minimal
style={{ position: "absolute", top: 5, right: 5, color: "white" }}
onClick={() => {
onClick={async () => {
try {
html2canvas(
document.querySelector(".ve-digest-container")
).then(canvas => {
canvas.toBlob(blob =>
navigator.clipboard.write([
new window.ClipboardItem({ "image/png": blob })
])
);
window.toastr.success("Image copied to clipboard!");
});
const canvas = await import("html2canvas");
canvas
.default(document.querySelector(".ve-digest-container"))
.then(canvas => {
canvas.toBlob(blob =>
navigator.clipboard.write([
new window.ClipboardItem({ "image/png": blob })
])
);
window.toastr.success("Image copied to clipboard!");
});
} catch (e) {
window.toastr.error(
"Error copying the image, try just taking a screenshot instead ;)"
Expand Down
1 change: 0 additions & 1 deletion packages/ove/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@fontsource/ubuntu-mono";
import { FocusStyleManager } from "@blueprintjs/core";
import { showContextMenu } from "@teselagen/ui";
import "./createVectorEditor";
Expand Down
4 changes: 2 additions & 2 deletions packages/ove/src/style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.ve-monospace-font {
font-family: "Ubuntu Mono", "Lucida Console", Monaco, monospace;
font-size: 12px;
font-family: Monaco, monospace;
font-size: 11px;
}
.rowViewTextContainer text {
user-select: none;
Expand Down
4 changes: 3 additions & 1 deletion packages/ui/cypress/e2e/UploadCsvWizard.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,9 @@ a,,desc,,false,dna,misc_feature
cy.get(`[data-index="0"] [data-test="tgCell_sequence"]`).click({
force: true
});
cy.focused().type(`robbin{enter}`);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(200);
cy.focused().type(`robbin{enter}`, { delay: 100 });
cy.get(`.bp3-button:contains(Edit Data)`).click();
cy.contains(`File Updated`);

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@teselagen/ui",
"version": "0.3.40",
"version": "0.3.41",
"main": "./src/index.js",
"exports": {
".": {
Expand Down
5 changes: 0 additions & 5 deletions packages/ui/src/FormComponents/Uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,12 @@ import {
Tooltip
} from "@blueprintjs/core";
import Dropzone from "react-dropzone";
// import { first } from "lodash";
import classnames from "classnames";
import { nanoid } from "nanoid";

import papaparse, { unparse } from "papaparse";

import downloadjs from "downloadjs";

import { configure, makeObservable, observable } from "mobx";
import { observer } from "mobx-react";

import UploadCsvWizardDialog, {
SimpleInsertDataDialog
} from "../UploadCsvWizard";
Expand Down
4 changes: 3 additions & 1 deletion vite.react.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ export default ({ name }: { name: string; dir: string }) =>
__dirname,
"node_modules/@blueprintjs/datetime"
),
// "@teselagen/react-table": `/Users/tnrich/Sites/react-table`,

// "@teselagen/react-table/react-table.css": `/Users/tnrich/Sites/react-table/react-table.css`,
// "@teselagen/react-table": `/Users/tnrich/Sites/react-table/src`,
"react-dom": path.join(__dirname, "node_modules/react-dom"),
"react-redux": path.join(__dirname, "node_modules/react-redux"),
"redux-form": path.join(__dirname, "node_modules/redux-form"),
Expand Down
13 changes: 4 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1995,11 +1995,6 @@
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.50.0.tgz#9e93b850f0f3fa35f5fa59adfd03adae8488e484"
integrity sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==

"@fontsource/ubuntu-mono@^4.5.11":
version "4.5.11"
resolved "https://registry.npmjs.org/@fontsource/ubuntu-mono/-/ubuntu-mono-4.5.11.tgz"
integrity sha512-IqqJKgp9Xc8tFeCIHPQuFbiKZC8tBU2hdIllwX2pryYfkl8/w4DuScFq9fPMfy1Mp4raFVcJALvOMOfRXkLp/w==

"@gmod/gff@^1.2.1":
version "1.3.0"
resolved "https://registry.npmjs.org/@gmod/gff/-/gff-1.3.0.tgz"
Expand Down Expand Up @@ -3128,10 +3123,10 @@
dependencies:
prop-types "15"

"@teselagen/[email protected].13":
version "6.10.13"
resolved "https://registry.yarnpkg.com/@teselagen/react-table/-/react-table-6.10.13.tgz#a93c73f78d4b36502679032456a1a3bef3c769b9"
integrity sha512-xPJ2w2igonhvlFWuuEXzY3HZ5tP4kcK9FFkHyOCl2WSwneUprUWujtxUW4kMxq/lBBiSWlNIM0cosQq1/q5Xiw==
"@teselagen/[email protected].16":
version "6.10.16"
resolved "https://registry.yarnpkg.com/@teselagen/react-table/-/react-table-6.10.16.tgz#fbc4ba79d4964368ec07e911c1e5fe171c9b0758"
integrity sha512-oyS/F/rDtE9dgXvfuoMHh7ag/ZksxkexmnUTYrm6tthXRU/wVn6S6MrfSztjiYB0TaGi9aFCZB4f/onNTaRVcQ==
dependencies:
"@teselagen/react-list" "0.8.18"
classnames "^2.2.5"
Expand Down

0 comments on commit 53070cd

Please sign in to comment.