Skip to content

Commit e64db6f

Browse files
committed
fix: github pipeline and login component
1 parent 309f897 commit e64db6f

File tree

2 files changed

+63
-69
lines changed

2 files changed

+63
-69
lines changed

.github/actions/configure-auth0-screens/action.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ runs:
8888
# PROCESS SCREENS
8989
#############################################
9090
91-
echo "Debug: Preparing to parse SCREENS_JSON with jq."
9291
SCREEN_LIST_FOR_LOOP=$(echo "$SCREENS_JSON" | jq -r '.[]')
9392
jq_exit_code=$?
9493
@@ -100,7 +99,6 @@ runs:
10099
if [ -z "$SCREEN_LIST_FOR_LOOP" ]; then
101100
echo "Debug: SCREENS_JSON parsed by jq resulted in an empty list. Content of SCREENS_JSON: $SCREENS_JSON"
102101
else
103-
echo "Debug: Successfully parsed SCREENS_JSON. List of screens for loop below (multi-line):"
104102
echo "$SCREEN_LIST_FOR_LOOP"
105103
fi
106104
@@ -125,7 +123,6 @@ runs:
125123
126124
SETTINGS_FILE=$(mktemp settings_XXXXXX.json)
127125
trap 'echo "ERR TRAP: Removing $SETTINGS_FILE due to error processing $screen"; rm -f "$SETTINGS_FILE"; trap - ERR' ERR
128-
echo "Debug: Temporary SETTINGS_FILE created at: $SETTINGS_FILE"
129126
130127
ALL_ASSETS=$(find "dist/assets" -type f \( -name "*.js" -o -name "*.css" \) ! -name "*.map.js" 2>/dev/null | sort)
131128
SCREEN_JS_FILES=(); SHARED_JS_FILES=(); ROOT_JS_FILES=(); SCREEN_CSS_FILES=(); SHARED_CSS_FILES=()
@@ -178,7 +175,6 @@ runs:
178175
179176
echo "$JSON_CONTENT" > "$SETTINGS_FILE" || { echo "::error::Failed to write settings file for $screen"; FAILED_SCREENS+=("$screen"); rm -f "$SETTINGS_FILE"; trap - ERR; continue; }
180177
181-
echo "Debug: Content of SETTINGS_FILE for screen $screen:"
182178
cat "$SETTINGS_FILE"
183179
echo "--- End of SETTINGS_FILE content ---"
184180
@@ -195,8 +191,6 @@ runs:
195191
if [ $AUTH0_EXIT_CODE -eq 0 ]; then
196192
echo "✅ Successfully configured: $screen"
197193
SUCCESS_SCREENS+=("$screen")
198-
# Note: The DEBUG line for SUCCESS_SCREENS was here in a previous version for debugging that array.
199-
# Keeping it or removing it depends on current debugging needs.
200194
else
201195
echo "::error::Failed to configure prompt: $screen (Exit Code: $AUTH0_EXIT_CODE)"
202196
echo "$AUTH0_OUTPUT"
@@ -210,11 +204,6 @@ runs:
210204
fi
211205
done < <(echo "$SCREEN_LIST_FOR_LOOP")
212206
213-
# Note: The DEBUG lines for final array states were here.
214-
# Removing them for this request as the focus is on SETTINGS_FILE output.
215-
# If issues persist with summary, they can be re-added:
216-
# echo "DEBUG: === After Main Processing Loop ===" ...
217-
218207
#############################################
219208
# FINAL REPORTING
220209
#############################################

src/common/FormField/index.tsx

Lines changed: 63 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useRef } from "react";
1+
import React from "react";
22
import Label from "@/common/Label";
33
import type { LabelProps } from "@/common/Label";
44
import Input from "@/common/Input";
@@ -17,70 +17,75 @@ export interface FormFieldProps {
1717
errorTextClassName?: string;
1818
}
1919

20-
const FormField: React.FC<FormFieldProps> = ({
21-
labelProps,
22-
inputProps,
23-
error,
24-
className,
25-
inputIcon,
26-
isParentFocused,
27-
inputWrapperClassName,
28-
errorTextClassName,
29-
}) => {
30-
const { id: inputId, className: inputSpecificClassName } = inputProps;
31-
const internalInputRef = useRef<HTMLInputElement>(null);
20+
const FormField = React.forwardRef<HTMLInputElement, FormFieldProps>(
21+
({
22+
labelProps,
23+
inputProps,
24+
error,
25+
className,
26+
inputIcon,
27+
isParentFocused,
28+
inputWrapperClassName,
29+
errorTextClassName,
30+
}) => {
31+
const { id: inputId, className: inputSpecificClassName } = inputProps;
3232

33-
let inputCombinedClassName = inputSpecificClassName || "";
34-
const errorRingStyles = "border-error focus:ring-error focus:border-error";
33+
const { ref: refForInputElement, ...remainingInputProps } = inputProps;
3534

36-
let finalInputProps = { ...inputProps };
37-
delete finalInputProps.className;
35+
let inputCombinedClassName = inputSpecificClassName || "";
36+
const errorRingStyles = "border-error focus:ring-error focus:border-error";
3837

39-
if (inputIcon) {
40-
inputCombinedClassName += " pr-16";
41-
}
38+
let finalInputProps = { ...remainingInputProps };
39+
delete finalInputProps.className;
4240

43-
if (error) {
44-
inputCombinedClassName += ` ${errorRingStyles}`;
45-
} else if (isParentFocused) {
46-
finalInputProps.forceFocusStyle = true;
47-
}
41+
if (inputIcon) {
42+
inputCombinedClassName += " pr-16";
43+
}
4844

49-
return (
50-
<div className={`${className || ""}`}>
51-
<div
52-
className={`relative mt-1 rounded-md shadow-sm ${inputWrapperClassName || ""}`}
53-
>
54-
<div className="relative w-full">
55-
<Input
56-
{...finalInputProps}
57-
ref={internalInputRef}
58-
className={inputCombinedClassName}
59-
aria-invalid={!!error}
60-
aria-describedby={error ? `${inputId}-error` : undefined}
61-
/>
62-
<Label {...labelProps} htmlFor={inputId} isError={!!error} />
63-
{inputIcon && (
64-
<div
65-
className={`absolute inset-y-0 right-0 flex items-center rounded-r-md mt-px mt-3 ${isParentFocused ? "bg-primary/15" : ""}`}
66-
>
67-
{inputIcon}
68-
</div>
69-
)}
70-
</div>
71-
</div>
72-
{error && (
45+
if (error) {
46+
inputCombinedClassName += ` ${errorRingStyles}`;
47+
} else if (isParentFocused) {
48+
finalInputProps.forceFocusStyle = true;
49+
}
50+
51+
return (
52+
<div className={`${className || ""}`}>
7353
<div
74-
id={`${inputId}-error`}
75-
className={`flex items-center mt-2 text-sm text-error ${errorTextClassName || ""}`}
76-
role="alert"
54+
className={`relative mt-1 rounded-md shadow-sm ${inputWrapperClassName || ""}`}
7755
>
78-
<Icon As={ExclamationCircleIcon} className="h-4 w-4 mr-1" />
79-
{error}
56+
<div className="relative w-full">
57+
<Input
58+
{...finalInputProps}
59+
ref={refForInputElement}
60+
className={inputCombinedClassName}
61+
aria-invalid={!!error}
62+
aria-describedby={error ? `${inputId}-error` : undefined}
63+
/>
64+
<Label {...labelProps} htmlFor={inputId} isError={!!error} />
65+
{inputIcon && (
66+
<div
67+
className={`absolute inset-y-0 right-0 flex items-center rounded-r-md mt-px mt-3 ${isParentFocused ? "bg-primary/15" : ""}`}
68+
>
69+
{inputIcon}
70+
</div>
71+
)}
72+
</div>
8073
</div>
81-
)}
82-
</div>
83-
);
84-
};
74+
{error && (
75+
<div
76+
id={`${inputId}-error`}
77+
className={`flex items-center mt-2 text-sm text-error ${errorTextClassName || ""}`}
78+
role="alert"
79+
>
80+
<Icon As={ExclamationCircleIcon} className="h-4 w-4 mr-1" />
81+
{error}
82+
</div>
83+
)}
84+
</div>
85+
);
86+
},
87+
);
88+
89+
FormField.displayName = "FormField";
8590

8691
export default FormField;

0 commit comments

Comments
 (0)