patternfly-elements icon indicating copy to clipboard operation
patternfly-elements copied to clipboard

pf-text-input property validated missing options

Open yaacov opened this issue 1 year ago • 1 comments

Component name: pf-text-input

property validated missing options

Design specification updates

Elements allow:

/**
   * Value to indicate if the input is modified to show that validation state.
   * If set to success, input will be modified to indicate valid state.
   * If set to warning,  input will be modified to indicate warning state.
   * Invalid inputs will display an error state
   */
  @property({ reflect: true }) validated?: 'success' | 'warning';

Ref: https://github.com/patternfly/patternfly-elements/blob/main/elements/pf-text-input/pf-text-input.ts#L160

React 4 allow:

/** Variant styling of the helper text item. */
 variant?: 'default' | 'indeterminate' | 'warning' | 'success' | 'error';

Ref: https://github.com/patternfly/patternfly-react/blob/v4/packages/react-core/src/components/TextInput/TextInput.tsx#L44

yaacov avatar Aug 06 '24 06:08 yaacov

some context: previously we determined that the built-in :invalid pseudo selector should be prefered, but developer feedback has shown that adding a pattern regex is not desired or ergonomic in all cases where error state should be presented, so this is an acceptable criteria.

@yaacov you're welcome to grab this one, and thank you for the issue :)

bennypowers avatar Aug 06 '24 07:08 bennypowers