Skip to content

[TEMPORARY] Feature/#513 create dialog import collection #546

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

Merged
merged 7 commits into from
Apr 1, 2025

Conversation

brauliodiez
Copy link
Member

No description provided.

JSON.parse(newValue);
setJsonError(null);
} catch (error) {
setJsonError('El JSON no es válido');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OOops, in english the message?

<div className={classes.jsonTextarea}>
<label>
JSON Schema:
<textarea
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make the text area to fill the dialog available space

};
onSave(mapEditTableVmToTableVm(newTable));
} catch (error) {
setJsonError('El JSON no es válido');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English text


try {
JSON.parse(newValue);
setJsonError(null);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One additional case, the JSON maybe valid, but if the user passes an array (e.g. an array with two documents), we should as well treat this as an Error and display a message "Current version only accepts a single document object"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move this code to business so we can add unit tests

</div>
<div className={classes.jsonTextarea}>
<label>
JSON Schema:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's name it: JSON Document

And add on top: Copy here a a document (you can copy it from a collection using a tool like Mongo Compass)

isCollapsed?: boolean;
isArray?: boolean;
isNN?: boolean;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move FieldType and FieldVm to the file

edit-table.model.ts

By using this we simplify this file and segregate

@brauliodiez brauliodiez merged commit fbc54a5 into vnext Apr 1, 2025
2 checks passed
@brauliodiez brauliodiez deleted the feature/#513-create-dialog-import-collection branch April 1, 2025 19:38
@brauliodiez brauliodiez restored the feature/#513-create-dialog-import-collection branch April 1, 2025 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants