Repository: hashicorp/vault
File: ui/lib/core/addon/components/form-field.js (JavaScript)

Code before:
    // here we replicate the logic in the template, to make sure we don't change the order in which the "ifs" are evaluated
    if (options?.possibleValues?.length > 0) {
      return true;
    } else {
      if (type === 'number' || type === 'string') {
        if (options?.editType === 'password' || options?.editType === 'textarea') {
          return true;
        } else {
          return false;
        }
      } else {
        // we leave these fields as they are (for now)
        return false;
      }
    }
  }

  get hasRadioSubText() {
    // for 'radio' editType, check to see if any of the possibleValues has a subText
    return this.args?.attr?.options?.possibleValues?.any((v) => v.subText);
  }

  get hasRadioHelpText() {
    // for 'radio' editType, check to see if any of the possibleValues has a helpText
    return this.args?.attr?.options?.possibleValues?.any((v) => v.helpText);
  }

  get hideLabel() {
    const { type, options } = this.args.attr;
    if (type === 'boolean' || type === 'object' || options?.isSectionHeader) {
      return true;
    }
    // falsey values render a <FormFieldLabel>
    return this.shouldHideLabel.includes(options?.editType);
  }

  get disabled() {
    return this.args.disabled || false;
  }

  get helpTextString() {
    const helpText = this.args.attr?.options?.helpText;
    if (this.args.showHelpText !== false && helpText) {
      return helpText;
    }
    return '';
  }

  // used in the label element next to the form element
  get labelString() {
    const label = this.args.attr.options?.label || '';

Review comment (suggestion):
You have more context than me when it comes to this component, but it seems like this could just be updated to 
```suggestion
      } else if ((type === 'boolean' && !options.editType) || options?.editType === 'boolean') {
```

Code after:
    // to make sure we don't change the order in which the "ifs" are evaluated
    // see: https://github.com/hashicorp/vault/blob/e99c06a0249f1ecde02c5b48990cb0e91e4ec575/ui/lib/core/addon/components/form-field.hbs
    if (options?.possibleValues?.length > 0) {
      return true;
    } else {
      if (
        options?.editType === 'dateTimeLocal' ||
        options?.editType === 'searchSelect' ||
        options?.editType === 'mountAccessor' ||
        options?.editType === 'kv' ||
        options?.editType === 'file' ||
        options?.editType === 'ttl' ||
        options?.editType === 'regex' ||
        options?.editType === 'toggleButton' ||
        options?.editType === 'optionalText' ||
        options?.editType === 'stringArray' ||
        options?.sensitive === true
      ) {
        return false;
      } else if (type === 'number' || type === 'string') {
        if (options?.editType === 'textarea' || options?.editType === 'password') {
          return true;
        } else {
          return false;
        }
      } else if (type === 'boolean' || options?.editType === 'boolean') {
        return true;
      } else if (type === 'object' || options?.editType === 'yield') {
        return false;
      } else {
        // fallback, just in case
        return false;
      }
    }
  }

  get hasRadioSubText() {
    // for 'radio' editType, check to see if any of the possibleValues has a subText
    return this.args?.attr?.options?.possibleValues?.any((v) => v.subText);
  }

  get hasRadioHelpText() {
    // for 'radio' editType, check to see if any of the possibleValues has a helpText
    return this.args?.attr?.options?.possibleValues?.any((v) => v.helpText);
  }

  get hideLabel() {
    const { type, options } = this.args.attr;
    if (type === 'object' || options?.isSectionHeader) {
      return true;
    }