Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ryan-stackwave/tg-oss
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-stackwave committed Mar 8, 2024
2 parents 9db1ec2 + 55e4186 commit 0666bb9
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 24 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- CLN-54033: support RNA sequence [`#1`](https://github.com/TeselaGen/tg-oss/pull/1)
- Export validateSequenceArray [`#2`](https://github.com/TeselaGen/tg-oss/pull/2)
- genbank ss-DNA should not be overwirte to DNA [`#1`](https://github.com/TeselaGen/tg-oss/pull/1)
- Added menu item to allow user to export DNA as FASTA when looking at a protein sequence to resolve https://github.com/TeselaGen/tg-oss/issues/61 [`#61`](https://github.com/TeselaGen/tg-oss/issues/61)
- Added fix for clipboard commands when there are multiple editors on a page to resolve https://github.com/TeselaGen/tg-oss/issues/24 [`#24`](https://github.com/TeselaGen/tg-oss/issues/24)
- closes #35 [`#35`](https://github.com/TeselaGen/tg-oss/issues/35)
- making upload accept handle async values [`5c8dfd8`](https://github.com/TeselaGen/tg-oss/commit/5c8dfd8a91defd00773329d9dbfc2e15beb01bbb)
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
"packages/*"
],
"volta": {
"node": "16.20.2"
"node": "16.20.2",
"yarn": "1.22.21"
}
}
8 changes: 6 additions & 2 deletions packages/ove/demo/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,13 @@ const Demo = () => {
minimal
icon="menu"
></Button>
<VersionSwitcher packageName="ove" />
<VersionSwitcher
packageName="ove"
testBadge={`[![@teselagen/ove](https://img.shields.io/endpoint?url=https://cloud.cypress.io/badge/simple/mp89gp/master&style=flat&logo=cypress)](https://cloud.cypress.io/projects/mp89gp/runs)`}
/>
<a
href="https://github.com/TeselaGen/ove-electron#installation-instructions"
style={{ marginTop: 5, marginLeft: 10 }}
style={{ marginTop: 13, marginLeft: 10 }}
>
This is a developer demo. Get the App?
</a>{" "}
Expand All @@ -142,6 +145,7 @@ const Demo = () => {
key="theme"
>
<Button
style={{ marginTop: 3, marginRight: 3 }}
data-test="tg-toggle-dark-mode"
icon={isDarkMode ? "flash" : "moon"}
intent={isDarkMode ? "warning" : undefined}
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.4.3",
"version": "0.4.4",
"main": "./src/index.js",
"exports": {
".": {
Expand Down
7 changes: 2 additions & 5 deletions packages/ove/src/commands/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,9 @@ const fileCommandDefs = {
handler: props =>
props.exportSequenceToFile(isProtein(props) ? "genpept" : "genbank")
},
exportSequenceAsFasta: {
name: "Download FASTA File",
handler: props => props.exportSequenceToFile("fasta")
},
exportDNASequenceAsFasta: {
name: "Download DNA FASTA File",
name: props =>
`Download ${props.sequenceData.isProtein ? "DNA " : ""}FASTA File`,
isHidden: props => !props.sequenceData.sequence,
handler: props =>
props.exportSequenceToFile("fasta", {
Expand Down
14 changes: 8 additions & 6 deletions packages/shared-demo/src/VersionSwitcher.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { HTMLSelect } from "@blueprintjs/core";
import React, { useEffect, useRef, useState } from "react";
import ReactMarkdown from "react-markdown";

export default function VersionSwitcher({ packageName = "ove" }) {
export default function VersionSwitcher({ packageName = "ove", testBadge }) {
const [options, setOptions] = useState([]);
const pjson = useRef({});
//runs on component load
Expand All @@ -16,6 +17,7 @@ export default function VersionSwitcher({ packageName = "ove" }) {
"https://api.github.com/repos/teselagen/tg-oss/git/trees/gh-pages"
)
).json();
console.log(`res:`, res);
const packageNode = res.tree.find(e => {
return e.path.toLowerCase() === packageName;
});
Expand Down Expand Up @@ -54,23 +56,23 @@ export default function VersionSwitcher({ packageName = "ove" }) {

return options.length ? (
<div style={{ display: "flex", alignItems: "center" }}>
<div style={{ paddingTop: 3 }}>
<div style={{ paddingTop: 13, display: "flex", marginRight: 20 }}>
<iframe
src="https://ghbtns.com/github-btn.html?user=teselagen&repo=tg-oss&type=star&count=true"
frameBorder="0"
scrolling="0"
width="150"
width="100"
height="20"
title="GitHub"
></iframe>
{testBadge && <ReactMarkdown children={testBadge} />}
</div>
<div>Version:</div>{" "}
<HTMLSelect
minimal
onChange={function onChange(e) {
window.location.href = `https://teselagen.github.io/tg-oss/${packageName}/version/${e.currentTarget.value}/#/Editor`;
}}
value={pjson.version}
value={pjson.current.version}
options={options}
></HTMLSelect>
<a
Expand All @@ -84,6 +86,6 @@ export default function VersionSwitcher({ packageName = "ove" }) {
</div>
) : (
//fallback to just showing the version
<div style={{ marginTop: 5 }}>Version: {pjson.version}</div>
<div style={{ marginTop: 13 }}>{pjson.current.version}</div>
);
}
13 changes: 8 additions & 5 deletions packages/ui/demo/src/DemoHeader.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from "react";
import { Icon, Tooltip, Button, Classes } from "@blueprintjs/core";
import { Tooltip, Button, Classes } from "@blueprintjs/core";
import classNames from "classnames";
import "./style.css";
// eslint-disable-next-line @nx/enforce-module-boundaries
Expand Down Expand Up @@ -42,18 +42,21 @@ class DemoHeader extends Component {
alignItems: "center"
}}
>
<VersionSwitcher packageName="ui" />
<VersionSwitcher
packageName="ui"
testBadge={`[![@teselagen/ui](https://img.shields.io/endpoint?url=https://cloud.cypress.io/badge/simple/gwixeq/master&style=flat&logo=cypress)](https://cloud.cypress.io/projects/gwixeq/runs)`}
/>

<a
style={{ fontSize: 16, color: "white" }}
style={{ fontSize: 16 }}
href="https://github.com/TeselaGen/tg-oss/tree/master/packages/ui"
>
TeselaGen React Components <Icon icon="link" />
@teselagen/ui
</a>
<Tooltip content={darkTheme ? "Light Theme" : "Dark Theme"} key="theme">
<Button
icon={darkTheme ? "flash" : "moon"}
className={classNames(Classes.MINIMAL, "tg-dark-theme-button")}
className={classNames(Classes.MINIMAL)}
onClick={() => this.toggleTheme()}
/>
</Tooltip>
Expand Down
5 changes: 3 additions & 2 deletions packages/ui/demo/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ h6 {
width: 100%;
text-align: center;
padding: 12px 0;
background: #003f66;
/* background: #003f66; */
}

.demo-header h1 {
Expand Down Expand Up @@ -98,7 +98,8 @@ h6 {
overflow: auto;
}

.bp3-dark .demo-area-container {
.bp3-dark .demo-area-container,
.bp3-dark .demo-header {
background: #2f343c;
}

Expand Down
6 changes: 4 additions & 2 deletions packages/ui/src/DataTable/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ body:not(.drag-active)
}

.ReactTable .rt-tr-group.selected {
background: lightblue !important;
background: #e4f3f8 !important;
}

.ReactTable .rt-tr-group.disabled {
Expand Down Expand Up @@ -523,7 +523,9 @@ body:not(.drag-active)
.bp3-dark .ReactTable .rt-tbody {
background: #30404d !important;
}

.ReactTable .rt-thead.-header {
box-shadow: none;
}
.bp3-dark .ReactTable .rt-thead.-header {
color: #f5f8fa !important;
}
Expand Down

0 comments on commit 0666bb9

Please sign in to comment.