-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add new input cookie_domain, fix styles for Custom component #15
Conversation
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.
Missing changelog
public/locales/cs/translation.json
Outdated
"Redirect URIs": "URIs k přesměrování", | ||
"Create client": "Vytvořit klienta", | ||
"Unknown item": "Neznámá položka" | ||
"Unknown item": "Neznámá položka", | ||
"Required": "Povinné" |
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.
@Aringoaway Should be Required field: Povinný údaj
<Button | ||
color="primary" | ||
type="submit" | ||
title={isDirty ? t("ClientDetailContainer|Save changes") : t("ClientDetailContainer|No changes were made")} |
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.
@Aringoaway Out of curiosity, why do you need isDirty
here?
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 need it, that to see if there have been any changes in the inputs. If no changes have been made, the Save button will be disabled
@@ -187,9 +195,10 @@ const ClientCreateContainer = (props) => { | |||
</FormGroup> | |||
{metaData["properties"] && Object.entries(metaData["properties"]).map(([key, value]) => { | |||
switch(key) { | |||
case 'redirect_uris': return(<URiInput key={key} name={key} control={control} errors={errors} append={append} remove={remove} fields={fields} labelName={t("ClientCreateContainer|Redirect URIs")}/>) | |||
case 'client_name': return(<TextInput key={key} name={key} register={register} labelName={t('ClientCreateContainer|Client name')}/>) | |||
case 'redirect_uris': return(<URiInput key={key} name={key} control={control} errors={errors} append={append} remove={remove} fields={fields} title={t("ClientCreateContainer|Required")} labelName={t("ClientCreateContainer|Redirect URIs")}/>) |
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.
@Aringoaway Why you need to add a title
prop here? Cant it be managed within name
prop?
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.
@Aringoaway Looks good, only minor inputs from me
@@ -187,9 +195,10 @@ const ClientCreateContainer = (props) => { | |||
</FormGroup> | |||
{metaData["properties"] && Object.entries(metaData["properties"]).map(([key, value]) => { | |||
switch(key) { | |||
case 'redirect_uris': return(<URiInput key={key} name={key} control={control} errors={errors} append={append} remove={remove} fields={fields} labelName={t("ClientCreateContainer|Redirect URIs")}/>) | |||
case 'client_name': return(<TextInput key={key} name={key} register={register} labelName={t('ClientCreateContainer|Client name')}/>) | |||
case 'redirect_uris': return(<URiInput key={key} name={key} control={control} errors={errors} append={append} remove={remove} fields={fields} labelName={t("ClientCreateContainer|Redirect URIs") + "*"}/>) |
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.
@Aringoaway You can have labelName
this way
labelName={`${t("ClientCreateContainer|Redirect URIs")}*`}
); | ||
const isInvalid = (name) => { | ||
if (name === "preferred_client_id" && (errors[name] != undefined)) { |
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.
@Aringoaway Can be this condition simplified?
const isInvalid = (name) => {
if (((name === "preferred_client_id") || (name === "cookie_domain")) && (errors[name] != undefined)) {
return true;
}
return false;
}
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.
@Aringoaway Only minor one I found just now, otherwise cool. Btw. update your branch from changes in main, I see that yours is out of date and there might be some conflicts
max-height: 15vh; | ||
min-height: 15vh !important; | ||
max-height: 200px; | ||
min-height: 200px !important; |
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.
@Aringoaway Cant be max-height
and min-height
replaced just with height
?
@@ -9,8 +9,7 @@ | |||
|
|||
//CredentialCustomDataContainer |
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.
@Aringoaway Btw. I believe that SCSS styling for CustomDataContainer should be in separate customdata.scss file, since credentials.scss should consist only styles for credentials components, whereas CustomDataContainer is a container, which can be used also outside of credentials.
I know that it is some residual from the past, which was forgotten here, but I still think we should do it right. I hope you dont mind to refactor also this bit within this PR :) Thank you
Changes Client
cookie_domain
cookie_domain
inputcookie_domain
in ClientDetailContainerclient_name
andredirect_uris
have not been edited, save button will be disabledclietndetail.mp4
Changes Credentials Custom component
credential-custom-component.mp4