Skip to content

Commit

Permalink
Add username (#1133)
Browse files Browse the repository at this point in the history
* ui ready

* adding username functions

* wip

* wip

* chenging to form

* profile update

* adding username reeady

* lingui extract

* disable email

* removed FB logo

* changes and comments

* profile update

* Update packages/common-components/src/TextInput/FormikTextInput.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/TextInput/TextInput.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/Settings/Profile.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/UserContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* lingui extract

* Update packages/files-ui/src/Components/Modules/Settings/Profile.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/UserContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/UserContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/Settings/Profile.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/UserContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* suggested changes

* lingui extract

* pushed to 300ms debounce

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
  • Loading branch information
4 people authored Jun 17, 2021
1 parent b268a05 commit 0382ee6
Show file tree
Hide file tree
Showing 6 changed files with 385 additions and 83 deletions.
4 changes: 3 additions & 1 deletion packages/common-components/src/TextInput/FormikTextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import TextInput, { ITextInputProps } from "./TextInput"
export interface FormikTextInputProps
extends Omit<ITextInputProps, "onChange" | "state" | "value"> {
name: string
hideLabel?: boolean
}

const FormikTextInput = React.forwardRef(
Expand All @@ -21,14 +22,15 @@ const FormikTextInput = React.forwardRef(
disabled = false,
autoFocus,
captionMessage,
hideLabel,
...rest
}: FormikTextInputProps,
forwardedRef: any
) => {
const [field, meta, helpers] = useField(name)
return (
<TextInput
label={label ? label : field.name}
label={hideLabel ? undefined : label || field.name}
inputVariant={inputVariant}
disabled={disabled}
type={type}
Expand Down
4 changes: 2 additions & 2 deletions packages/common-components/src/TextInput/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ export interface ITextInputProps
inputVariant?: "default" | "minimal"
size?: "large" | "medium" | "small"
captionMessage?: string | ReactNode
onChange: (value: string | number | undefined) => void
onChange?: (value?: string | number) => void
type?: "text" | "email" | "password" | "url" | "search"
autoFocus?: boolean
}
Expand Down Expand Up @@ -468,7 +468,7 @@ const TextInput = React.forwardRef(
name={name}
value={value}
placeholder={placeholder}
onChange={(e) => onChange(e.target.value)}
onChange={(e) => onChange && onChange(e.target.value)}
autoFocus={autoFocus}
ref={forwardedRef}
{...rest}
Expand Down
Loading

0 comments on commit 0382ee6

Please sign in to comment.