From c9768b19de9e86e1def4a13eb2741ed38fe7fdde Mon Sep 17 00:00:00 2001 From: Tamas Kovacs Date: Tue, 28 Jul 2026 14:16:43 +0200 Subject: [PATCH] docs: remove inline code comments from prop type documentation INSTUI-5129 --- packages/ui-avatar/src/Avatar/v1/props.ts | 2 +- packages/ui-date-input/src/DateInput2/v1/props.ts | 1 - packages/ui-range-input/src/RangeInput/v1/props.ts | 9 +++++---- packages/ui-text/src/Text/v2/props.ts | 9 ++++++--- packages/ui-view/src/View/v1/props.ts | 13 ++++++++----- packages/ui-view/src/View/v2/props.ts | 13 ++++++++----- 6 files changed, 28 insertions(+), 19 deletions(-) diff --git a/packages/ui-avatar/src/Avatar/v1/props.ts b/packages/ui-avatar/src/Avatar/v1/props.ts index d76ca80062..2837140f66 100644 --- a/packages/ui-avatar/src/Avatar/v1/props.ts +++ b/packages/ui-avatar/src/Avatar/v1/props.ts @@ -59,7 +59,7 @@ type AvatarOwnProps = { | 'x-large' | 'xx-large' color?: - | 'default' // = brand + | 'default' | 'shamrock' | 'barney' | 'crimson' diff --git a/packages/ui-date-input/src/DateInput2/v1/props.ts b/packages/ui-date-input/src/DateInput2/v1/props.ts index 7f1344790b..503aa4d371 100644 --- a/packages/ui-date-input/src/DateInput2/v1/props.ts +++ b/packages/ui-date-input/src/DateInput2/v1/props.ts @@ -39,7 +39,6 @@ type DateInput2OwnProps = { calendarIcon: string prevMonthButton: string nextMonthButton: string - // TODO: Make this field required in the next version. Currently optional to avoid breaking change. datePickerDialog?: string selectedLabel?: string } diff --git a/packages/ui-range-input/src/RangeInput/v1/props.ts b/packages/ui-range-input/src/RangeInput/v1/props.ts index 826d73bd05..be587fe708 100644 --- a/packages/ui-range-input/src/RangeInput/v1/props.ts +++ b/packages/ui-range-input/src/RangeInput/v1/props.ts @@ -29,7 +29,10 @@ import type { RangeInputTheme, PickPropsWithExceptions } from '@instructure/shared-types' -import type { FormFieldOwnProps, FormMessage } from '@instructure/ui-form-field/v11_6' +import type { + FormFieldOwnProps, + FormMessage +} from '@instructure/ui-form-field/v11_6' import type { WithStyleProps, ComponentStyle } from '@instructure/emotion' import type { InputHTMLAttributes } from 'react' import type { WithDeterministicIdProps } from '@instructure/ui-react-utils' @@ -89,9 +92,7 @@ type RangeInputOwnProps = { * The "deprecated" variant has an outer shadow on focus. * The "accessible" variant has better color contrast, border and inset focus ring for better accessibility. */ - thumbVariant?: - | 'deprecated' // TODO: deprecated, remove in V9. - | 'accessible' + thumbVariant?: 'deprecated' | 'accessible' /** * A function that provides a reference to the actual underlying input element diff --git a/packages/ui-text/src/Text/v2/props.ts b/packages/ui-text/src/Text/v2/props.ts index aca5546740..6c546957b9 100644 --- a/packages/ui-text/src/Text/v2/props.ts +++ b/packages/ui-text/src/Text/v2/props.ts @@ -36,7 +36,10 @@ type TextOwnProps = { */ as?: AsElementType /** - * Color of the text + * Color of the text. + * + * `primary-on` and `secondary-on` are meant for use on colored surfaces + * (like `warning`) and keep the same color in dark and light themes. */ color?: | 'inherit' @@ -48,8 +51,8 @@ type TextOwnProps = { | 'warning' | 'primary-inverse' | 'secondary-inverse' - | 'primary-on' // used on colored surfaces like warning, same color in dark and light themes - | 'secondary-on' // used on colored surfaces like warning, same color in dark and light themes + | 'primary-on' + | 'secondary-on' | 'ai-highlight' /** * Provides a reference to the underlying HTML element diff --git a/packages/ui-view/src/View/v1/props.ts b/packages/ui-view/src/View/v1/props.ts index 49a10308d7..7ff38d34ee 100644 --- a/packages/ui-view/src/View/v1/props.ts +++ b/packages/ui-view/src/View/v1/props.ts @@ -62,6 +62,10 @@ type ViewOwnProps = { /** * By default the display prop is 'auto', meaning it takes on the * display rules of the html element it's rendered as (see `as` prop). + * + * `inherit`, `initial`, `revert`, `revert-layer` and `unset` are the global + * CSS values (see the + * [MDN `display` reference](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/display)). */ display?: | 'auto' @@ -71,12 +75,11 @@ type ViewOwnProps = { | 'flex' | 'inline-flex' | 'contents' - // these are global CSS values - | 'inherit' // inherit the parent's display value - | 'initial' // reset the property back to the spec default - | 'revert' // reset to user agent stylesheet + | 'inherit' + | 'initial' + | 'revert' | 'revert-layer' - | 'unset' // same as initial + | 'unset' overflowX?: 'auto' | 'hidden' | 'visible' overflowY?: 'auto' | 'hidden' | 'visible' height?: string | number diff --git a/packages/ui-view/src/View/v2/props.ts b/packages/ui-view/src/View/v2/props.ts index c69c39d95d..eb1f2d4843 100644 --- a/packages/ui-view/src/View/v2/props.ts +++ b/packages/ui-view/src/View/v2/props.ts @@ -78,6 +78,10 @@ type ViewOwnProps = { /** * By default the display prop is 'auto', meaning it takes on the * display rules of the html element it's rendered as (see `as` prop). + * + * `inherit`, `initial`, `revert`, `revert-layer` and `unset` are the global + * CSS values (see the + * [MDN `display` reference](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/display)). */ display?: | 'auto' @@ -87,12 +91,11 @@ type ViewOwnProps = { | 'flex' | 'inline-flex' | 'contents' - // these are global CSS values - | 'inherit' // inherit the parent's display value - | 'initial' // reset the property back to the spec default - | 'revert' // reset to user agent stylesheet + | 'inherit' + | 'initial' + | 'revert' | 'revert-layer' - | 'unset' // same as initial + | 'unset' overflowX?: 'auto' | 'hidden' | 'visible' overflowY?: 'auto' | 'hidden' | 'visible' height?: string | number