Skip to content
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

[FX-4483] Add Jira tickets for deprecated functionality #4077

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jest.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const config = {
'node_modules/(?!@toptal|@topkit|d3|internmap|robust-predicates|delaunator)',
],
coverageReporters: ['json', 'text-summary'],
// @TODO This option does not work due to bug in davinci-qa https://toptal-core.atlassian.net/browse/FX-4311
// TODO: This option does not work due to bug in davinci-qa https://toptal-core.atlassian.net/browse/FX-4311
// collectCoverageFrom: ['packages/**/*.{ts,tsx}'],
}

Expand Down
2 changes: 1 addition & 1 deletion packages/picasso-forms/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export {
export { FieldRequirements } from '@toptal/picasso'

// Picasso Forms exports
/** @deprecated Use FormNonCompound instead for better tree-shaking */
/** @deprecated [FX-4712] Use FormNonCompound instead for better tree-shaking */
export { FormCompound as Form } from './FormCompound'

export { Form as FormNonCompound } from './Form'
Expand Down
6 changes: 4 additions & 2 deletions packages/picasso-provider/src/Picasso/config/spacings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ export type Sizes =

export type SizeType<T extends Sizes> = T

/** @deprecated **/
/**
* @deprecated [FX-4438] Use {@link PicassoSpacing} or {@link ResponsiveSpacingType} instead
**/
export type DeprecatedSpacingType =
| number
| SizeType<'xsmall' | 'small' | 'medium' | 'large' | 'xlarge'>
Expand Down Expand Up @@ -51,7 +53,7 @@ class PicassoSpacing {
}

/**
* @deprecated Use "index" property directly
* @deprecated [FX-4713] Use "baseTokenIndex" property directly
*/
indexOf(): number {
return this.baseTokenIndex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface Props extends BaseProps {
/** unique identifier */
id: string
/**
* @deprecated Use the `status` prop instead to both support success and error states
* @deprecated [FX-4715] Use the `status` prop instead to support success and error states
* Indicate whether `RichTextEditor` is in error state
*/
error?: boolean
Expand Down Expand Up @@ -124,6 +124,7 @@ export const RichTextEditor = forwardRef<HTMLDivElement, Props>(
const classes = useStyles()
const wrapperRef = useRef<HTMLDivElement | null>(null)

// TODO: [FX-4715]
usePropDeprecationWarning({
props,
name: 'error',
Expand Down
3 changes: 2 additions & 1 deletion packages/picasso/src/Autocomplete/Autocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export interface Props
/** ReactNode for labels that will be used as end InputAdornment - */
endAdornment?: ReactNode
/**
* @deprecated Use the `status` prop instead to both support success and error states
* @deprecated [FX-4715] Use the `status` prop instead to both support success and error states
* Indicate whether `Autocomplete` is in error state
*/
error?: boolean
Expand Down Expand Up @@ -195,6 +195,7 @@ export const Autocomplete = forwardRef<HTMLInputElement, Props>(
)
}

// TODO: [FX-4715]
usePropDeprecationWarning({
props,
name: 'error',
Expand Down
2 changes: 1 addition & 1 deletion packages/picasso/src/Autocomplete/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import type { Props as OuterProps } from './Autocomplete'
export { default } from './Autocomplete'
export * from './types'
export type AutocompleteProps = OmitInternalProps<OuterProps>
/** @deprecated Use AutocompleteProps instead */
/** @deprecated [FX-4714] Use AutocompleteProps instead */
export type Props = AutocompleteProps
2 changes: 1 addition & 1 deletion packages/picasso/src/Checkbox/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import type { OmitInternalProps } from '@toptal/picasso-shared'
import type { Props as InternalCheckboxProps } from './Checkbox'
export { default } from './Checkbox'
export type CheckboxProps = OmitInternalProps<InternalCheckboxProps>
/** @deprecated Use CheckboxProps instead */
/** @deprecated [FX-4714] Use CheckboxProps instead */
export type Props = CheckboxProps
3 changes: 2 additions & 1 deletion packages/picasso/src/DatePicker/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export interface Props
/** Specify a value if want to enable browser autofill */
autoComplete?: string
/**
* @deprecated Use the `status` prop instead to both support success and error states
* @deprecated [FX-4715] Use the `status` prop instead to both support success and error states
* Indicate whether `DatePicker` is in error state
*/
error?: boolean
Expand Down Expand Up @@ -154,6 +154,7 @@ export const DatePicker = (props: Props) => {
} = props
const classes = useStyles()

// TODO: [FX-4715]
usePropDeprecationWarning({
props,
name: 'error',
Expand Down
10 changes: 5 additions & 5 deletions packages/picasso/src/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ type PropsWithBaseSpacing = InternalProps & {

type PropsWithDeprecatedSpacing = InternalProps & {
/** Offset of content element relative to anchor element */
/** @deprecated */
/** @deprecated [FX-4438] use {@link @toptal/picasso-provider#PicassoSpacing} instead */
offset?: {
/** @deprecated */
/** @deprecated [FX-4438] */
top?: DeprecatedSpacingType
/** @deprecated */
/** @deprecated [FX-4438] */
bottom?: DeprecatedSpacingType
/** @deprecated */
/** @deprecated [FX-4438] */
left?: DeprecatedSpacingType
/** @deprecated */
/** @deprecated [FX-4438] */
right?: DeprecatedSpacingType
}
}
Expand Down
3 changes: 2 additions & 1 deletion packages/picasso/src/Dropzone/Dropzone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export interface Props extends BaseProps {
/** Value uses the File interface. */
value?: FileUpload[]
/**
* @deprecated **Use value[n].error instead.**
* @deprecated [FX-4715] Use value[n].error instead.
* Provide reasons why files couldn't be dropped into dropzone
*/
errorMessages?: string[]
Expand Down Expand Up @@ -101,6 +101,7 @@ export const Dropzone = forwardRef<HTMLInputElement, Props>(function Dropzone(

const classes = useStyles()

// TODO: [FX-4715]
usePropDeprecationWarning({
props,
name: 'errorMessages',
Expand Down
2 changes: 1 addition & 1 deletion packages/picasso/src/FileInput/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import type { Props as InternalFileInputProps } from './FileInput'
export { default } from './FileInput'
export * from './types'
export type FileInputProps = OmitInternalProps<InternalFileInputProps>
/** @deprecated Use FileInputProps instead */
/** @deprecated [FX-4714] Use FileInputProps instead */
export type Props = FileInputProps
2 changes: 1 addition & 1 deletion packages/picasso/src/Form/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import type { OmitInternalProps } from '@toptal/picasso-shared'
import type { Props as InternalFormProps } from './Form'
export { default } from './Form'
export type FormProps = OmitInternalProps<InternalFormProps>
/** @deprecated Use FormProps instead */
/** @deprecated [FX-4714] Use FormProps instead */
export type Props = FormProps
3 changes: 2 additions & 1 deletion packages/picasso/src/Input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface Props
/** Placeholder for value */
placeholder?: string
/**
* @deprecated Use the `status` prop instead to both support success and error states
* @deprecated [FX-4715] Use the `status` prop instead to both support success and error states
* Indicate whether `Input` is in error state
*/
error?: boolean
Expand Down Expand Up @@ -277,6 +277,7 @@ export const Input = forwardRef<HTMLInputElement, Props>(function Input(
...rest
} = purifyProps(props)

// TODO: [FX-4715]
usePropDeprecationWarning({
props,
name: 'error',
Expand Down
2 changes: 1 addition & 1 deletion packages/picasso/src/Input/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import type { OmitInternalProps } from '@toptal/picasso-shared'
import type { Props as InternalInputProps } from './Input'
export { default } from './Input'
export type InputProps = OmitInternalProps<InternalInputProps>
/** @deprecated Use InputProps instead */
/** @deprecated [FX-4714] Use InputProps instead */
export type Props = InputProps
5 changes: 4 additions & 1 deletion packages/picasso/src/ListItem/ListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export type Props = BaseProps & {
children: ReactNode
variant?: 'ordered' | 'unordered'
index?: number
/** @deprecated if you need a custom icon that is not available on the prop `type`, please contact the BASE team to add it to the theme */
/**
* @deprecated [FX-4717] if you need a custom icon that is not available on the prop `type`, please contact the BASE team to add it to the theme
**/
icon?: ReactNode
/** Style of the bullet/ordinal */
type?: ListItemType
Expand Down Expand Up @@ -48,6 +50,7 @@ export const ListItem = (props: Props) => {
'data-testid': testId,
} = props

// TODO: [FX-4717]
usePropDeprecationWarning({
props,
componentName: ListItem.name,
Expand Down
1 change: 1 addition & 0 deletions packages/picasso/src/NumberInput/NumberInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export const NumberInput = forwardRef<HTMLInputElement, Props>(
...rest
} = props

// TODO: [FX-4715]
usePropDeprecationWarning({
props,
name: 'error',
Expand Down
3 changes: 2 additions & 1 deletion packages/picasso/src/OutlinedInput/OutlinedInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export interface Props
/** Type attribute of the Input element. It should be a valid HTML5 input type */
type?: string
/**
* @deprecated Use the `status` prop instead to both support success and error states
* @deprecated [FX-4715] Use the `status` prop instead to both support success and error states
* Indicate whether input is in error state
*/
error?: boolean
Expand Down Expand Up @@ -152,6 +152,7 @@ const OutlinedInput = forwardRef<HTMLElement, Props>(function OutlinedInput(
...rest
} = props

// TODO: [FX-4715]
usePropDeprecationWarning({
props,
name: 'error',
Expand Down
1 change: 1 addition & 0 deletions packages/picasso/src/PasswordInput/PasswordInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export const PasswordInput = forwardRef<HTMLInputElement, Props>(
...rest
} = props

// TODO: [FX-4715]
usePropDeprecationWarning({
props,
name: 'error',
Expand Down
2 changes: 1 addition & 1 deletion packages/picasso/src/Radio/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import type { OmitInternalProps } from '@toptal/picasso-shared'
import type { Props as InternalRadioProps } from './Radio'
export { default } from './Radio'
export type RadioProps = OmitInternalProps<InternalRadioProps>
/** @deprecated Use RadioProps instead */
/** @deprecated [FX-4714] Use RadioProps instead */
export type Props = RadioProps
2 changes: 1 addition & 1 deletion packages/picasso/src/RadioGroup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import type { OmitInternalProps } from '@toptal/picasso-shared'
import type { Props as InternalRadioGroupProps } from './RadioGroup'
export { default } from './RadioGroup'
export type RadioGroupProps = OmitInternalProps<InternalRadioGroupProps>
/** @deprecated Use RadioGroupProps instead */
/** @deprecated [FX-4714] Use RadioGroupProps instead */
export type Props = RadioGroupProps
1 change: 1 addition & 0 deletions packages/picasso/src/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const Select = documentable(
{ native, ...props }: SelectProps<T, M>,
ref: React.Ref<HTMLInputElement> | null
) => {
// TODO: [FX-4715]
usePropDeprecationWarning({
props,
name: 'error',
Expand Down
2 changes: 1 addition & 1 deletion packages/picasso/src/SelectBase/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface SelectProps<
disabled?: boolean
/** Whether to render select options in portal. Should be disabled in Modals */
disablePortal?: boolean
/** @deprecated Indicate whether `Select` is in error state */
/** @deprecated [FX-4715] Indicate whether `Select` is in error state */
error?: boolean
/** Indicate whether `Select` is in `error` or `default` state */
status?: Extract<Status, 'error' | 'default'>
Expand Down
2 changes: 1 addition & 1 deletion packages/picasso/src/Switch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import type { OmitInternalProps } from '@toptal/picasso-shared'
import type { Props as InternalSwitchProps } from './Switch'
export { default } from './Switch'
export type SwitchProps = OmitInternalProps<InternalSwitchProps>
/** @deprecated Use SwitchProps instead */
/** @deprecated [FX-4714] Use SwitchProps instead */
export type Props = SwitchProps
3 changes: 2 additions & 1 deletion packages/picasso/src/TagSelector/TagSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export interface Props
/** Disables `TagSelector` */
disabled?: boolean
/**
* @deprecated Use the `status` prop instead to both support success and error states
* @deprecated [FX-4715] Use the `status` prop instead to both support success and error states
* Indicate whether `TagSelector` is in error state
*/
error?: boolean
Expand Down Expand Up @@ -146,6 +146,7 @@ export const TagSelector = forwardRef<HTMLInputElement, Props>(
...rest
} = props

// TODO: [FX-4715]
usePropDeprecationWarning({
props,
name: 'error',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const TagSelectorInput = forwardRef<HTMLInputElement, InputProps>(
...rest
} = props

// TODO: [FX-4715]
usePropDeprecationWarning({
props,
name: 'error',
Expand Down
1 change: 1 addition & 0 deletions packages/picasso/src/TimePicker/TimePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export const TimePicker = (props: Props) => {
}
}

// TODO: [FX-4715]
usePropDeprecationWarning({
props,
name: 'error',
Expand Down
2 changes: 1 addition & 1 deletion packages/picasso/src/Tooltip/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import type { OmitInternalProps } from '@toptal/picasso-shared'
import type { Props as InternalTooltipProps } from './Tooltip'
export { default } from './Tooltip'
export type TooltipProps = OmitInternalProps<InternalTooltipProps>
/** @deprecated Use TooltipProps instead */
/** @deprecated [FX-4714] Use TooltipProps instead */
export type Props = TooltipProps
12 changes: 10 additions & 2 deletions packages/picasso/src/TreeView/TreeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,22 @@ export interface Props extends TreeViewPropsBase {
showZoom?: boolean
/** Scales the current zoom transform by coefficient */
scaleCoefficient?: number
/** Custom center translation vector (happens after zoom center translation on selected node is applied) */
/**
* Custom center translation vector (happens after zoom center translation on selected node is applied)
* @deprecated [FX-4718] If you happen to rely on it, you are likely would want to migrate to StaticTreeView component instead of TreeView
*/
centerTranslation?: Vector2
/** Transition duration for centering animation in ms */
/**
* Transition duration for centering animation in ms
* @deprecated [FX-4718] If you happen to rely on it, you are likely would want to migrate to StaticTreeView component instead of TreeView
*/
transitionDuration?: number
}

const useStyles = makeStyles<Theme>(styles, { name: 'PicassoTreeView' })

export const TreeView = (props: Props) => {
// TODO: [FX-4718]
usePropDeprecationWarning({
props,
name: 'centerTranslation',
Expand All @@ -49,6 +56,7 @@ export const TreeView = (props: Props) => {
'If you happen to rely on it, you are likely would want to migrate to StaticTreeView component instead of TreeView',
})

// TODO: [FX-4718]
usePropDeprecationWarning({
props,
name: 'transitionDuration',
Expand Down
2 changes: 1 addition & 1 deletion packages/picasso/src/utils/kebab-to-camel-case.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @deprecated Use kebabToCamelCase() from @toptal/picasso-provider package
* @deprecated [FX-4716] Use kebabToCamelCase() from @@toptal/picasso-provider package
augustobmoura marked this conversation as resolved.
Show resolved Hide resolved
*/
const kebabToCamelCase = (str: string) =>
str.replace(/-([a-z])/g, (substring: string) => substring[1].toUpperCase())
Expand Down
Loading