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

feat: init schema & space create page #115

Merged
merged 2 commits into from
Feb 21, 2022

Conversation

hetao92
Copy link
Contributor

@hetao92 hetao92 commented Feb 18, 2022

No description provided.

const { code, data } = (await service.execNGQL({
gql: `DESCRIBE SPACE ${handleKeyword(space)}`,
})) as any;
return { code, data };
}

asyncGetSpacesList = async(_payload) => {
getSpacesList = async() => {
const res = await this.getSpaces();
if (res.data) {
const spaces: ISpace[] = [];
Copy link
Contributor

Choose a reason for hiding this comment

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

why not get spaces from globalStore?

Copy link
Contributor

Choose a reason for hiding this comment

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

and there is a useless const spaces?




const Schema = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

remove empty blocks

},
...numberRulesFn(intl),
]}>
<Input />
Copy link
Contributor

Choose a reason for hiding this comment

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

Input maybe need a placeholder

Copy link
Contributor

@huaxiabuluo huaxiabuluo left a comment

Choose a reason for hiding this comment

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

optional chaining

@@ -31,16 +31,24 @@ const itemRender = (route, _params, routes, _paths) => {
);
};

const Breadcrumb: React.FC<IProps> = (props: IProps) => {
const NebulaBreadcrumb: React.FC<IProps> = (props: IProps) => {
const { routes, ExtraNode } = props;
Copy link
Contributor

Choose a reason for hiding this comment

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

better to use extraNode ?

Comment on lines +68 to +70
const list = [...keyWords, ...operators, ...ban].filter(item => {
return item.indexOf(str) === 0;
});
Copy link
Contributor

Choose a reason for hiding this comment

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

const list = [...keyWords, ...operators, ...ban].filter(item => item.startsWith(str));

Comment on lines +112 to +116
blur = instance => {
if (this.props.onBlur) {
this.props.onBlur(instance.doc.getValue());
}
};
Copy link
Contributor

Choose a reason for hiding this comment

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

it's more elegant to use optional chaining instead of a && a.b && a.b()

blur = instance => this.props.onBlur?.(instance.doc.getValue());

mod: code review

mod: code review
Copy link
Contributor

@huaxiabuluo huaxiabuluo left a comment

Choose a reason for hiding this comment

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

LGTM

@hetao92 hetao92 merged commit 7e8bc9a into vesoft-inc:v3.3.0-dev Feb 21, 2022
@hetao92 hetao92 deleted the hetao-schema branch February 21, 2022 11:14
hetao92 added a commit to hetao92/nebula-studio that referenced this pull request Mar 31, 2022
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.

3 participants