-
Notifications
You must be signed in to change notification settings - Fork 29
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(Beans): Port Bean Configuration UI #166
Conversation
abd8ee2
to
0396276
Compare
packages/ui/package.json
Outdated
@@ -88,6 +88,7 @@ | |||
"eslint-plugin-react-refresh": "^0.4.3", | |||
"jest": "^29.4.2", | |||
"jest-environment-jsdom": "^29.4.2", | |||
"lodash": "^4.17.21", |
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.
Adding lodash
as a devDependency
is intended rather than a regular dependency
?
I think it would be better just to bring what we need from lodash
, in this case cloneDeep
.
"lodash.cloneDeep"
and also the types which should be "@types/lodash.cloneDeep"
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.
It seems there's no separate package for lodash.cloneDeep
? this is 404 not found
https://registry.yarnpkg.com/lodash.cloneDeep
The reason being in dev dep is it's used only in tests.
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.
Maybe the version is different but we have it in kaoto-ui 😃
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.
ahhhh it's clonedeep
with lower d
🤣
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.
OK done
<Title headingLevel="h1">Beans Configuration</Title> | ||
<MetadataEditor | ||
name="Beans" | ||
schema={schemaMap.beans.schema} |
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.
@lordrip schemaMap.beans
here is sometimes undefined
, usually if I reload the browser once or twice then it loads as expected, is there a something wrong on how schema store is used?
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.
mmm, I think this might be related to the initial problem, probably fetching the schemas is not a blocking operation so the beans UI gets rendered before having the schema
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.
OK so leave it as-is, hoping that's better for prod build, or we'll revisit separately
Also fixed a bug that if there's no |
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.
LGTM
Just a side note, I implemented these changes from uniforms-patternfly
and it's available in this version: https://github.com/KaotoIO/uniforms-patternfly/releases/tag/%40kaoto-next%2Funiforms-patternfly%400.4.0
Fixes: #8
It often hits the following error and fails to render. It seems the schema is not initialized at that time, possibly a race condition