-
Notifications
You must be signed in to change notification settings - Fork 534
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: add basic-auth UI Form #1718
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1718 +/- ##
===========================================
- Coverage 72.08% 52.25% -19.83%
===========================================
Files 130 38 -92
Lines 5649 2660 -2989
Branches 648 0 -648
===========================================
- Hits 4072 1390 -2682
+ Misses 1333 1082 -251
+ Partials 244 188 -56
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
web/cypress/integration/plugin/create-delete-in-drawer-plugin.spec.js
Outdated
Show resolved
Hide resolved
web/cypress/integration/pluginTemplate/create-edit-delete-plugin-template.spec.js
Outdated
Show resolved
Hide resolved
please update the codes styles. |
web/cypress/integration/plugin/create-delete-in-drawer-plugin.spec.js
Outdated
Show resolved
Hide resolved
Good to see i18n |
Is there a preview page? |
Currently, each pr does not have a preview address, it needs to be pulled locally to preview. |
may be provide a video also a good choice, which can explain the changes on the UE more clearly |
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
Noted here that the empty list item reflects null
instead of `` should be eliminated.
Thanks for the note, will keep this in mind when dealing with plugins that have list item. |
"pageTwoActived": ".ant-pagination-item-2.ant-pagination-item-active", | ||
"selectDropdown": ".ant-select-dropdown", | ||
"codeMirrorMode": "[data-cy='code-mirror-mode']", | ||
"selectJSON":".ant-select-dropdown [label=JSON]" |
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.
"selectJSON":".ant-select-dropdown [label=JSON]" | |
"selectJSON": ".ant-select-dropdown [label=JSON]" |
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, will be adjusted in another PR.
|
||
export const PLUGIN_UI_LIST = ['basic-auth',]; | ||
|
||
export const PluginForm: React.FC<Props> = ({ name, renderForm, form }) => { |
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 started learning .tsx
today so I still don't know much. But maybe const line should have ordered arguments ?
export const PluginForm: React.FC<Props> = ({ name, renderForm, form }) => { | |
export const PluginForm: React.FC<Props> = ({ form, name, renderForm }) => { |
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.
We are passing in objects, the order of the arguments does not affect the function's functionality IMO, any reference about this rule?
|
||
import BasicAuth from './basic-auth' | ||
|
||
type Props = { |
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.
Does this order work for .tsx
?
type Props = { | |
type Props = { | |
form: FormInstance, | |
name: string, | |
renderForm: boolean | |
} |
]} | ||
/> | ||
<CodeMirror | ||
{Boolean(codeMirrorMode === codeMirrorModeList.UIForm) && <PluginForm name={name} form={UIForm} renderForm={!(pluginType === 'auth' && schemaType !== 'consumer')} />} |
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.
Should this be form, name, renderForm
?
{Boolean(codeMirrorMode === codeMirrorModeList.UIForm) && <PluginForm name={name} form={UIForm} renderForm={!(pluginType === 'auth' && schemaType !== 'consumer')} />} | |
{Boolean(codeMirrorMode === codeMirrorModeList.UIForm) && <PluginForm form={UIForm} name={name} renderForm={!(pluginType === 'auth' && schemaType !== 'consumer')} />} |
const { data: yamlData, error } = yaml2json(ref.current.editor.getValue(), true); | ||
if (error) { | ||
notification.error({ | ||
message: 'Invalid Yaml data', |
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.
message: 'Invalid Yaml data', | |
message: 'Invalid YAML data', |
@jbampton Hi, I just noticed your suggestions :) Could you please file a new PR? due to this change will trigger CI many times 🤣 |
Please answer these questions before submitting a pull request, or your PR will get closed.
Why submit this pull request?
What changes will this PR take into?
add basic-auth UI Form.
Checklist: