-
Notifications
You must be signed in to change notification settings - Fork 13
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
YDA-5059: add hierarchical keyword selector #380
base: development
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,237 @@ | |||
import React from 'react' | |||
import axios from 'axios' | |||
import { TreeSelect, ConfigProvider, theme } from 'antd' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find TreeSelect from antd is really nice for the keyword selector, but I am a little bit concerned about how much bigger it makes the final js file (goes from about 800kb to 1.2 mb). This also makes the metadata form load a little slower. Not sure if there is some tree shaking I can do.
for (const index in jsonA) { | ||
const tree = jsonA[index] | ||
const newTree = {} | ||
newTree.value = tree.text + ':' + tree.extra.uri |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I use ":" as a divider between the name of the keyword and the uri, is this acceptable?
@@ -504,6 +535,7 @@ class YodaForm extends React.Component { | |||
showErrorList={"top"} | |||
widgets={widgets} | |||
templates={templates} | |||
omitExtraData={true} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will adding this setting cause issues for certain schemas?
Of the UI tests, I have run this against the ui_meta tests (including the new one I added) and it passes those.
Main changes:
This was tested on a Yoda before the update to irods 4.3.3 etc.