fantonangeli commented on code in PR #2853:
URL:
https://github.com/apache/incubator-kie-tools/pull/2853#discussion_r1941313268
##########
packages/online-editor/src/accounts/kubernetes/ConnectToLocalKubernetesClusterWizard.tsx:
##########
@@ -401,67 +403,85 @@ export function
ConnectToLocalKubernetesClusterWizard(props: {
<Text component={TextVariants.p}>
{i18n.devDeployments.kubernetesConfigWizard.steps.second.introduction}
</Text>
- <Text component={TextVariants.small} style={{ color:
"var(--pf-global--palette--red-100)" }}>
+ <Text component={TextVariants.small} style={{ color:
"var(--pf-v5-global--palette--red-100)" }}>
{i18n.devDeployments.kubernetesConfigWizard.steps.second.disclaimer}
</Text>
<br />
<br />
- <Form className="pf-u-mt-md" onSubmit={(e) => e.preventDefault()}>
+ <Form className="pf-v5-u-mt-md" onSubmit={(e) =>
e.preventDefault()}>
<FormGroup
fieldId={"dev-deployments-config-namespace"}
label={i18n.devDeployments.kubernetesConfigWizard.fields.namespace}
- validated={isNamespaceValidated ? "success" : "error"}
- helperTextInvalid={i18n.devDeployments.common.requiredField}
+ // validated={isNamespaceValidated ? "success" : "error"}
+ // helperTextInvalid={i18n.devDeployments.common.requiredField}
isRequired={true}
>
<InputGroup>
- <TextInput
- autoFocus={true}
- autoComplete={"off"}
- type="text"
- id="namespace-field"
- name="namespace-field"
- aria-label="namespace field"
- value={props.connection.namespace}
-
placeholder={i18n.devDeployments.kubernetesConfigWizard.steps.second.namespacePlaceholder}
- onChange={onNamespaceInputChanged}
- />
+ <InputGroupItem isFill>
+ <TextInput
+ autoFocus={true}
+ autoComplete={"off"}
+ type="text"
+ id="namespace-field"
+ name="namespace-field"
+ aria-label="namespace field"
+ value={props.connection.namespace}
+
placeholder={i18n.devDeployments.kubernetesConfigWizard.steps.second.namespacePlaceholder}
+ onChange={onNamespaceInputChanged}
+ />
+ </InputGroupItem>
<InputGroupText>
- <Button isSmall variant="plain" aria-label="Clear
namespace button" onClick={onClearNamespace}>
+ <Button size="sm" variant="plain" aria-label="Clear
namespace button" onClick={onClearNamespace}>
<TimesIcon />
</Button>
</InputGroupText>
</InputGroup>
+ <HelperText>
+ {isNamespaceValidated === true ? (
+ <HelperTextItem
variant="error">{i18n.devDeployments.common.requiredField}</HelperTextItem>
+ ) : (
+ <HelperTextItem
icon={ValidatedOptions.success}></HelperTextItem>
+ )}
+ </HelperText>
</FormGroup>
<Text component={TextVariants.p}>
{i18n.devDeployments.kubernetesConfigWizard.steps.second.namespaceInputReason}
</Text>
<FormGroup
fieldId={"dev-deployments-config-host"}
label={i18n.devDeployments.kubernetesConfigWizard.fields.kubernetesApiServerUrl}
- validated={isHostValidated ? "success" : "error"}
- helperTextInvalid={i18n.devDeployments.common.requiredField}
+ // validated={isHostValidated ? "success" : "error"}
+ // helperTextInvalid={i18n.devDeployments.common.requiredField}
Review Comment:
We should bring back this functionality
##########
packages/online-editor/src/accounts/openshift/ConnectToDeveloperSandboxForRedHatOpenShiftWizard.tsx:
##########
@@ -218,37 +220,46 @@ export function
ConnectToDeveloperSandboxForRedHatOpenShiftWizard(props: {
</List>
<br />
<br />
- <Form className="pf-u-mt-md" onSubmit={(e) => e.preventDefault()}>
+ <Form className="pf-v5-u-mt-md" onSubmit={(e) =>
e.preventDefault()}>
<FormGroup
fieldId={"dev-deployments-config-namespace"}
label={i18n.terms.namespace}
- validated={isNamespaceValidated ? "success" : "error"}
- helperTextInvalid={i18n.devDeployments.common.requiredField}
+ // validated={isNamespaceValidated ? "success" : "error"}
Review Comment:
We should bring back this functionality
##########
packages/online-editor/src/authSessions/AuthSessionLabel.tsx:
##########
@@ -23,15 +23,18 @@ import { AuthSession } from "./AuthSessionApi";
import { useAuthProvider } from "../authProviders/AuthProvidersContext";
import { AuthProviderIcon } from "../authProviders/AuthProviderIcon";
import { Flex } from "@patternfly/react-core/dist/js/layouts/Flex";
-import { IconSize } from "@patternfly/react-icons/dist/js/createIcon";
+// import { IconSize } from "@patternfly/react-icons/dist/js/createIcon";
Review Comment:
Can you please remove this line?
##########
packages/import-java-classes-component/src/components/ImportJavaClasses/ImportJavaClassesWizardFieldListTable.tsx:
##########
@@ -19,7 +19,7 @@
import * as React from "react";
import "./ImportJavaClassesWizardFieldListTable.css";
-import { ExpandableRowContent, TableComposable, Tbody, Td, Tr } from
"@patternfly/react-table";
+import { ExpandableRowContent, Table /* data-codemods */, Tbody, Td, Tr } from
"@patternfly/react-table";
Review Comment:
Can you please remove all the `data-codemods` around kie-tools.
##########
packages/pmml-editor/src/editor/components/Outputs/organisms/OutputsHandler.tsx:
##########
@@ -84,10 +85,13 @@ export const OutputsHandler = (props: OutputsHandlerProps)
=> {
<ValidationIndicatorTooltip validations={validations}>
<Button
variant="secondary"
- icon={<WarningTriangleIcon size={"sm"} color={"orange"} />}
+ // icon={<WarningTriangleIcon size={"sm"} color={"orange"} />}
Review Comment:
```suggestion
```
##########
packages/pmml-editor/src/editor/components/DataDictionary/DataDictionaryPropertiesEdit/DataDictionaryPropertiesEdit.tsx:
##########
@@ -183,15 +192,15 @@ const DataDictionaryPropertiesEdit = (props:
DataDictionaryPropertiesEditProps)
className="data-dictionary__properties-edit__field"
label="Missing Value"
fieldId="missing-value"
- helperText="Value for when the input is missing"
+ // helperText="Value for when the input is missing"
Review Comment:
```suggestion
```
##########
packages/online-editor/src/importFromUrl/ImportFromUrlHomePageCard.tsx:
##########
@@ -186,8 +187,17 @@ export function ImportFromUrlCard() {
isRequired={true}
placeholder={"URL"}
value={url}
- onChange={setUrl}
+ onChange={(_event, val) => setUrl(val)}
/>
+ <HelperText>
+ {validation.helperTextInvalid === "error" ? (
+ <HelperTextItem variant="error" icon={<ExclamationCircleIcon
/>}>
+ {validation.helperText}
+ </HelperTextItem>
+ ) : (
+ validation.helperTextInvalid
+ )}
+ </HelperText>
Review Comment:
```suggestion
<HelperText>
{validation.option === "error" ? (
<HelperTextItem variant="error"
icon={<ExclamationCircleIcon />}>
{validation.helperTextInvalid}
</HelperTextItem>
) : (
validation.helperText
)}
</HelperText>
```
##########
packages/patternfly-base/index.js:
##########
@@ -54,7 +54,14 @@ const fontsRule = {
// Limit at 50k. larger files emitted into separate files
limit: 5000,
outputPath: "fonts",
- name: "[name].[ext]",
+ name: (file) => {
+ const fileName = path.basename(file);
+ console.log("### file", file, file.includes("react-core@4"), fileName);
+ if (file.includes("react-core@4")) {
+ return `v4/${fileName}`;
+ }
+ return file.includes("react-core@5") ? `v5/${fileName}` : fileName;
+ },
Review Comment:
I introduced this change to let PF4 and PF5 live together in kie-tools, but
now we can revert as we only have PF5 in this branch
```suggestion
name: "[name].[ext]",
```
##########
packages/pmml-editor/src/editor/components/DataDictionary/ConstraintsRangeEdit/ConstraintsRangeEdit.tsx:
##########
@@ -179,20 +181,27 @@ const RangeEdit = (props: RangeEditProps) => {
<FormGroup
label="Start Value"
fieldId={`start-value-${index}`}
- helperText={validations[0] ? "Please enter start and/or end value"
: ""}
+ // helperText={validations[0] ? "Please enter start and/or end
value" : ""}
Review Comment:
```suggestion
```
##########
packages/runtime-tools-components/src/common/components/LoadMore/LoadMore.tsx:
##########
@@ -76,7 +72,10 @@ export const LoadMore: React.FC<IOwnProps & OUIAProps> = ({
<SplitItem>Load {count} more</SplitItem>
{loadMoreValue === count && (
<SplitItem>
- <CheckIcon size="sm" color="var(--pf-global--info-color--100)" />
+ <Icon size="sm" color="var(--pf-v5-global--info-color--100)">
+ <CheckIcon />
+ </Icon>
+ {/* <CheckIcon size="sm"
color="var(--pf-v5-global--info-color--100)" /> */}
Review Comment:
```suggestion
```
##########
packages/online-editor/src/authProviders/AuthProviderIcon.tsx:
##########
@@ -18,7 +18,7 @@
*/
import * as React from "react";
-import { getSize, IconSize } from "@patternfly/react-icons/dist/js/createIcon";
+// import { getSize, IconSize } from
"@patternfly/react-icons/dist/js/createIcon";
Review Comment:
We should bring back the commented functionalities in this file and fix the
icons colors
##########
packages/online-editor/src/accounts/git/ConnectToGitSection.tsx:
##########
@@ -290,19 +291,19 @@ export function ConnectToGitSection(props: {
authProvider: GitAuthProvider }) {
name="usernameInput"
aria-describedby="username-text-input-helper"
placeholder={i18n.connectToGitModal[props.authProvider.type].form.username?.placeHolder}
- onChange={(v) => setUsernameInput(v.trim())}
+ onChange={(_event, v) => setUsernameInput(v.trim())}
/>
</FormGroup>
),
default: <></>,
})}
<FormGroup
isRequired={true}
- helperTextIcon={validation.helperTextIcon}
- helperTextInvalidIcon={validation.helperTextInvalidIcon}
- helperTextInvalid={validation.helperTextInvalid}
- helperText={validation.helperText}
- validated={validation.validated}
+ // helperTextIcon={validation.helperTextIcon}
Review Comment:
We should bring back the functionalities commented here.
We can follow
https://v5-archive.patternfly.org/components/forms/form/#invalid
##########
packages/pmml-editor/src/editor/components/DataDictionary/DataDictionaryPropertiesEdit/DataDictionaryPropertiesEdit.tsx:
##########
@@ -200,22 +209,27 @@ const DataDictionaryPropertiesEdit = (props:
DataDictionaryPropertiesEditProps)
}
ouiaId="missing-value"
/>
+ <FormHelperText>
+ <HelperText>
+ <HelperTextItem variant="error">Value for when the
input is missing</HelperTextItem>
+ </HelperText>
+ </FormHelperText>
</FormGroup>
</StackItem>
<StackItem>
<FormGroup
className="data-dictionary__properties-edit__field"
label="Invalid Value"
fieldId="missing-value"
- helperText="Value for when the input is invalid"
+ // helperText="Value for when the input is invalid"
Review Comment:
```suggestion
```
##########
packages/online-editor/src/importFromUrl/ImportFromUrlHomePageCard.tsx:
##########
@@ -173,10 +174,10 @@ export function ImportFromUrlCard() {
<br />
<Form onSubmit={onSubmit}>
<FormGroup
- helperTextInvalid={validation.helperTextInvalid}
- helperText={validation.helperText}
- helperTextInvalidIcon={<ExclamationCircleIcon />}
- validated={validation.option}
+ // helperTextInvalid={validation.helperTextInvalid}
+ // helperText={validation.helperText}
+ // helperTextInvalidIcon={<ExclamationCircleIcon />}
+ // validated={validation.option}
Review Comment:
```suggestion
```
##########
packages/pmml-editor/src/editor/components/DataDictionary/ConstraintsRangeEdit/ConstraintsRangeEdit.tsx:
##########
@@ -212,20 +221,27 @@ const RangeEdit = (props: RangeEditProps) => {
<FormGroup
label="End Value"
fieldId={`end-value-${index}`}
- helperText={validations[0] ? "Please enter start and/or end value"
: ""}
+ // helperText={validations[0] ? "Please enter start and/or end
value" : ""}
Review Comment:
```suggestion
```
##########
packages/pmml-editor/src/editor/components/EditorScorecard/molecules/AttributeEditor.tsx:
##########
@@ -183,26 +185,39 @@ export const AttributeEditor = (props:
AttributeEditorProps) => {
label="Predicate"
isRequired={true}
fieldId="attribute-predicate-helper"
- validated={predicateValidation.length > 0 ? "warning" :
"default"}
+ // validated={predicateValidation.length > 0 ? "warning" :
"default"}
Review Comment:
```suggestion
```
##########
packages/pmml-editor/src/editor/components/DataDictionary/DataDictionaryPropertiesEdit/DataDictionaryPropertiesEdit.tsx:
##########
@@ -102,15 +104,15 @@ const DataDictionaryPropertiesEdit = (props:
DataDictionaryPropertiesEditProps)
className="data-dictionary__properties-edit__field"
label="Display Name"
fieldId="display-name"
- helperText="Display Name to use instead of the data type
name"
+ // helperText="Display Name to use instead of the data
type name"
Review Comment:
```suggestion
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]