Skip to content

Commit

Permalink
Merge pull request #349 from MOV-AI/dev
Browse files Browse the repository at this point in the history
Release 1.2.8
  • Loading branch information
diasnad authored Sep 13, 2024
2 parents c29f5bb + b702ba7 commit 9aa645b
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 36 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v1.2.8

- [FP-2935](https://movai.atlassian.net/browse/FP-2935): Default flow parameters not showing when clicking the edit button
- [FP-2946](https://movai.atlassian.net/browse/FP-2946): Deleting the "Label" filter from lib-ide BaseStore results in a 500 response in certain conditions


# v1.2.7

- [FP-2787](https://movai.atlassian.net/browse/FP-2787): IDE - Topics - Can't open multiple Topics tabs
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mov-ai/mov-fe-lib-ide",
"version": "1.2.7-1",
"version": "1.2.8-0",
"main": "./dist/index.js",
"publishConfig": {
"registry": "https://npm.pkg.github.com/mov-ai"
Expand Down
6 changes: 3 additions & 3 deletions src/editors/Node/model/Node.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
Command,
EnvVar,
ContainerConf,
ParameterWithType,
Parameter,
Port
} from "../../../models/subModels";
import schema from "./schema";
Expand Down Expand Up @@ -35,7 +35,7 @@ class Node extends Model {
this.launch = true;
this.remappable = true;
this.packageDep = "";
this.parameters = new Manager("parameters", ParameterWithType, this.events);
this.parameters = new Manager("parameters", Parameter, this.events);
this.envVars = new Manager("envVars", EnvVar, this.events);
this.commands = new Manager("commands", Command, this.events);
this.containerConf = new Manager(
Expand Down Expand Up @@ -551,7 +551,7 @@ class Node extends Model {
launch,
remappable,
packageDep,
parameters: Manager.serializeOfDB(parameters, ParameterWithType),
parameters: Manager.serializeOfDB(parameters, Parameter),
envVars: Manager.serializeOfDB(envVars, EnvVar),
commands: Manager.serializeOfDB(commands, Command),
containerConf: Manager.serializeOfDB(containerConf, ContainerConf),
Expand Down
2 changes: 1 addition & 1 deletion src/editors/_shared/hooks/useDataTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const useDataTypes = () => {
* @returns {ReactElement} Data Type Editor Component
*/
const getEditComponent = dataType => {
return dataTypeManager.getType(dataType)?.getEditComponent();
return dataTypeManager.getType(dataType ?? "any")?.getEditComponent();
};

/**
Expand Down
8 changes: 8 additions & 0 deletions src/models/subModels/Parameter/Parameter.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ class Parameter extends Model {
return undefined;
}

/**
* Returns the type property
* @returns {string}
*/
getType() {
return this.type;
}

/**
* Sets the new value of the property
* @param {string} value : The new value
Expand Down
25 changes: 0 additions & 25 deletions src/models/subModels/Parameter/ParameterWithType.js

This file was deleted.

3 changes: 1 addition & 2 deletions src/models/subModels/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Command from "./Command/Command";
import EnvVar from "./EnvVar/EnvVar";
import ContainerConf from "./ContainerConf/ContainerConf";
import Parameter from "./Parameter/Parameter";
import ParameterWithType from "./Parameter/ParameterWithType";
import Port from "./Port/Port";

export { Command, EnvVar, ContainerConf, Parameter, ParameterWithType, Port };
export { Command, EnvVar, ContainerConf, Parameter, Port };
17 changes: 14 additions & 3 deletions src/store/BaseStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class BaseStore extends StorePluginManager {
this._scope = model.SCOPE;
this._name = name || "Store";
this._title = title || "Generic Store";
this.pattern = pattern || { Scope: this.scope, Name: "*", Label: "*" };
this.pattern = pattern || { Scope: this.scope, Name: "*"}
this.observer = observer;
this.docManager = docManager;
this.protectedDocs = [];
Expand Down Expand Up @@ -171,9 +171,20 @@ class BaseStore extends StorePluginManager {
}

_onSetDoc(doc) {
if (!this.getDoc(doc.name)) {
this.newDoc(doc.name);
const docInst = this.getDoc(doc.name);
if (!docInst) {
const newDoc = this.newDoc(doc.name);
newDoc
.enableObservables(false)
.setIsNew(false)
.setIsLoaded(false)
.setDirty(false)
.enableObservables(true);
}

// if the doc is existing and not dirty, we should update
// it but that is non-trivial. We should open a new issue
// for it
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/store/DBSubscriber/DBSubscriber.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ class DBSubscriber extends StoreAbstractPlugin {
onUpdate(data) {
clearTimeout(this[symbols.timer]);

let docName = Object.keys(data["key"][this.scope])[0];
this[symbols.timer] = setTimeout(
() => this.updateDocument(data.patterns[0].Name),
() => this.updateDocument(docName),
DEBOUNCE_TIME
);
}
Expand Down

0 comments on commit 9aa645b

Please sign in to comment.