Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update DataTable and FormComponents #100

Merged
merged 58 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
36ef724
update DataTable and FormComponents
jgespinosa10 Jul 30, 2024
3f35c76
replace ReactDom
jgespinosa10 Jul 30, 2024
e7fcc0e
fix format and validate
jgespinosa10 Jul 31, 2024
79bb0b0
upload betta version
jgespinosa10 Aug 9, 2024
699d09b
add missing memo
Aug 14, 2024
570af70
fixes
Aug 14, 2024
339efe6
fix: Trigger touch on upload
Aug 16, 2024
969ff8f
fix: Search bar for no-url tables
mfanselmo Aug 20, 2024
672498d
add memoizing to Datatable
jgespinosa10 Aug 20, 2024
0e42f3c
test: add flushsync to fix uploader flaky tests
mfanselmo Aug 21, 2024
53af836
optimize uploader
jgespinosa10 Aug 28, 2024
2b0d0db
version
jgespinosa10 Aug 28, 2024
8f3dfc7
upload version
jgespinosa10 Aug 29, 2024
e72a28a
feat: remove pureFunc from datatable
mfanselmo Aug 29, 2024
81ae5bc
fix: Use window.serverApi instead of window.api
mfanselmo Aug 29, 2024
3ca955a
useTableEntities hook
jgespinosa10 Sep 2, 2024
5c15aa5
check if change exists
jgespinosa10 Sep 3, 2024
e540ecc
fix double typing
jgespinosa10 Sep 3, 2024
7bbc56d
updating cypress react react-dom
jgespinosa10 Sep 3, 2024
6c5d28d
fix children memo
jgespinosa10 Sep 3, 2024
d27390d
feat: Include initial values on ove
mfanselmo Sep 4, 2024
1299a13
erase props from schemas
jgespinosa10 Sep 5, 2024
11cd746
take out props from viewColumn
jgespinosa10 Sep 5, 2024
2475cb4
missing currentParams in render
jgespinosa10 Sep 6, 2024
cbf0bf2
add dependencies to queryParams Datatable
jgespinosa10 Sep 11, 2024
1506474
Add params to cellRenderer
jgespinosa10 Sep 12, 2024
9a46f3a
erase pureNoFunc
jgespinosa10 Sep 12, 2024
ab0e0ae
fix(ove): New way of passing props to datatable schema
mfanselmo Sep 12, 2024
1ec4f6b
fix: useDeepEqualMemo in currentParams
jgespinosa10 Sep 12, 2024
7a67afd
fix with query dependencies
jgespinosa10 Sep 12, 2024
0c2871f
withTableParams refactor & new useTableParams
jgespinosa10 Sep 23, 2024
7d1bcad
add React to useTableParams
jgespinosa10 Sep 24, 2024
c20919b
fix editable table
jgespinosa10 Sep 24, 2024
80dde94
check use effect
jgespinosa10 Sep 24, 2024
8835970
rerender problems
jgespinosa10 Sep 26, 2024
515e567
feat: add loading to entities dependency array
mfanselmo Oct 10, 2024
fbc139a
take out props
jgespinosa10 Oct 8, 2024
5cdb022
formComponent fix
jgespinosa10 Oct 10, 2024
d6b1056
feat: consider mobx proxy use case
mfanselmo Oct 10, 2024
bf9a7f1
add memo to formComponents
jgespinosa10 Oct 11, 2024
0cc8988
fix: Pass urlConnected after withTableParams
mfanselmo Oct 11, 2024
277b849
feat: Keep filter status on close
mfanselmo Oct 11, 2024
006a36a
bump version
mfanselmo Oct 14, 2024
08918ae
Merge remote-tracking branch 'origin' into updateDataTable&FormComponent
mfanselmo Oct 14, 2024
faa02f8
rename jsx to js
mfanselmo Oct 14, 2024
aae2177
bump
mfanselmo Oct 14, 2024
4accbb4
fix: Fix handling of searchTerm in datatable
mfanselmo Oct 15, 2024
3e7f404
dispatch actions do not depend on current Params
jgespinosa10 Oct 15, 2024
695440e
fix: Table handlers fix
mfanselmo Oct 15, 2024
b010700
feat: Pass formName for filters
mfanselmo Oct 15, 2024
150c5b2
bump
mfanselmo Oct 15, 2024
bcc6e45
useStableReference hook
jgespinosa10 Oct 16, 2024
889724f
uploader
jgespinosa10 Oct 17, 2024
30a9882
chore: Export useStableReference hook
mfanselmo Oct 21, 2024
15fd371
feat: remove no-redux option on redux fields
mfanselmo Oct 28, 2024
4436754
fix: Datatable tableconfig react to schema change
mfanselmo Nov 8, 2024
087c3df
Merge branch 'master' into updateDataTable&FormComponent
mfanselmo Nov 15, 2024
588fa1c
feat: Publish final versions
mfanselmo Nov 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- 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)
- update DataTable and FormComponents [`36ef724`](https://github.com/TeselaGen/tg-oss/commit/36ef72405d115a3829da3fe0a0a6fb8e02f0c5bb)
- updating yarn lock [`ff41df0`](https://github.com/TeselaGen/tg-oss/commit/ff41df0b49b8051fcba084f7eaa44cf23284926d)
- updating deps, moving to lodash-es, moving all packages to type: module [`bc7312c`](https://github.com/TeselaGen/tg-oss/commit/bc7312ccbe27c2d9a11cf2563ba978199428b50a)
- fix: upgrade react-dom [`5af38fa`](https://github.com/TeselaGen/tg-oss/commit/5af38fa54bbbb6c251b6a05734db3f42a242152e)
10 changes: 6 additions & 4 deletions example-demos/oveViteDemo/src/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "./shimGlobal";
import React from "react";
import ReactDOM from "react-dom";
import { createRoot } from "react-dom/client";
import { Provider } from "react-redux";
import { Loading } from "@teselagen/ui";

Expand All @@ -10,14 +10,16 @@ import App from "./App";

import * as serviceWorker from "./serviceWorker";

ReactDOM.render(
const domNode = document.getElementById("root");
const root = createRoot(domNode);

root.render(
<React.StrictMode>
<Provider store={store}>
<Loading />
<App />
</Provider>
</React.StrictMode>,
document.getElementById("root")
</React.StrictMode>
);

// If you want your app to work offline and load faster, you can change
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import React from "react";
import ReactDOM from "react-dom";
import { createRoot } from "react-dom/client";
import { Provider } from "react-redux";
import store from "./store";
import "./index.css";
import App from "./App";

ReactDOM.render(
const domNode = document.getElementById("root");
const root = createRoot(domNode);

root.render(
<React.StrictMode>
<Provider store={store}>
<App />
</Provider>
</React.StrictMode>,
document.getElementById("root")
</React.StrictMode>
);
2 changes: 0 additions & 2 deletions helperUtils/renderDemo.js

This file was deleted.

3 changes: 3 additions & 0 deletions helperUtils/renderDemo.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { createRoot } from "react-dom/client";
const root = createRoot(document.querySelector("#demo"));
export default Demo => root.render(<Demo />);
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@
"popper.js": "^1.16.1",
"prop-types": "^15.6.2",
"qs": "^6.9.6",
"react": "^18.2.0",
"react": "^18.3.1",
"react-color": "^2.19.3",
"react-dom": "^18.2.0",
"react-dom": "^18.3.1",
"react-draggable": "4.4.5",
"react-dropzone": "^11.4.2",
"react-markdown": "8.0.7",
"react-measure": "^2.5.2",
"react-redux": "^8.0.5",
"react-rnd": "^10.2.4",
"react-router-dom": "^4.3.1",
"react-router-dom": "4",
"react-sizeme": "^2.6.12",
"react-transition-group": "^2.4.0",
"recompose": "npm:[email protected]",
Expand Down Expand Up @@ -122,7 +122,7 @@
"chai-things": "0.2.0",
"chance": "^1.1.11",
"concurrently": "^8.2.2",
"cypress": "13.10.0",
"cypress": "^13.14.1",
"cypress-vite": "^1.4.0",
"esbuild": "^0.21.3",
"eslint": "~8.53.0",
Expand Down
16 changes: 10 additions & 6 deletions packages/ove/demo/src/EditorDemo/AddEditFeatureOverrideExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ export class AddOrEditFeatureDialog extends React.Component {
sequenceData = { sequence: "" },
handleSubmit,
locations,
upsertFeature
upsertFeature,
start,
end,
forward,
type
} = this.props;
const sequenceLength = sequenceData.sequence.length;
return (
Expand Down Expand Up @@ -158,12 +162,12 @@ export class AddOrEditFeatureDialog extends React.Component {
// format={value => (value ? "true" : "false")}
name="forward"
label="Strand:"
defaultValue={true}
defaultValue={forward ?? true}
/>
<ReactSelectField
inlineLabel
tooltipError
defaultValue="misc_feature"
defaultValue={type ?? "misc_feature"}
options={getFeatureTypes().map(type => {
return {
label: (
Expand Down Expand Up @@ -198,7 +202,7 @@ export class AddOrEditFeatureDialog extends React.Component {
<NumericInputField
inlineLabel
tooltipError
defaultValue={1}
defaultValue={start ?? 1}
min={1}
max={sequenceLength || 1}
name="start"
Expand All @@ -207,7 +211,7 @@ export class AddOrEditFeatureDialog extends React.Component {
<NumericInputField
inlineLabel
tooltipError
defaultValue={1}
defaultValue={end ?? 1}
min={1}
max={sequenceLength || 1}
name="end"
Expand Down Expand Up @@ -372,5 +376,5 @@ export default compose(
return errors;
}
}),
tgFormValues("start", "end", "locations")
tgFormValues("start", "end", "locations", "forward", "type")
)(AddOrEditFeatureDialog);
70 changes: 28 additions & 42 deletions packages/ove/demo/src/utils/renderToggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,34 +68,25 @@ export default function renderToggle({
}
}
if (isButton) {
toggleOrButton = (
<Button
{...{
...sharedProps,
onClick: onClick || hook
}}
/>
);
toggleOrButton = <Button {...sharedProps} onClick={onClick || hook} />;
} else if (isSelect) {
const { style, label, ...rest } = sharedProps;
toggleOrButton = (
<div key={type + "iwuhwp"} style={sharedProps.style}>
{label && <span>{label} &nbsp;</span>}
<EnhancedSelect
{...{
options,
...rest,
didMount: () => {
hook && hook((that.state || {})[type], true);
},
value: (that.state || {})[type],
disabled: disabled,
onChange: newType => {
hook && hook(newType.target.value);
that.setState({
[type]: newType.target.value
});
}
options={options}
{...rest}
didMount={() => {
hook && hook((that.state || {})[type], true);
}}
value={(that.state || {})[type]}
disabled={disabled}
onChange={newType => {
hook && hook(newType.target.value);
that.setState({
[type]: newType.target.value
});
}}
/>
</div>
Expand All @@ -109,15 +100,13 @@ export default function renderToggle({
};
toggleOrButton = (
<EnhancedSwitch
{...{
...sharedProps,
didMount: () => {
hook && hook(!!(that.state || {})[type]);
},
checked: (that.state || {})[type],
disabled: disabled,
onChange: switchOnChange
{...sharedProps}
didMount={() => {
hook && hook(!!(that.state || {})[type]);
}}
checked={(that.state || {})[type]}
disabled={disabled}
onChange={switchOnChange}
/>
);
}
Expand All @@ -127,23 +116,20 @@ export default function renderToggle({
style={{ display: "flex", alignItems: "center", margin: "5px 5px" }}
className="toggle-button-holder"
>
<ShowInfo {...{ description, info, type }}></ShowInfo>
<ShowInfo description={description} info={info} type={type} />
{toggleOrButton}
{switchOnChange && hotkey && (
<React.Fragment>
<HandleHotkeys
onKeyDown={switchOnChange}
combo={hotkey}
></HandleHotkeys>
<>
<HandleHotkeys onKeyDown={switchOnChange} combo={hotkey} />
<div
style={{
marginLeft: 5,
transform: "scale(0.8)"
}}
>
<KeyCombo minimal combo={hotkey}></KeyCombo>
<KeyCombo minimal combo={hotkey} />
</div>
</React.Fragment>
</>
)}
</div>
);
Expand All @@ -166,7 +152,7 @@ function HandleHotkeys({ combo, onKeyDown }) {
function ShowInfo({ description, info, type }) {
const [isOpen, setOpen] = useState(false);
return (
<React.Fragment>
<>
<Dialog
onClose={() => {
setOpen(false);
Expand All @@ -190,12 +176,12 @@ function ShowInfo({ description, info, type }) {
}}
minimal
icon="info-sign"
></Button>
/>
</div>
) : (
<div style={{ minWidth: 30, width: 30, height: 30 }}></div>
<div style={{ minWidth: 30, width: 30, height: 30 }} />
)}
</React.Fragment>
</>
);
}

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.5.32",
"version": "0.7.1",
"main": "./src/index.js",
"type": "module",
"exports": {
Expand Down
Loading
Loading