Repository: ionic-team/ionic-framework
File: core/src/components/searchbar/searchbar.tsx (TypeScript)

Code before:
      return false;
    }

    return true;
  }

  /**
   * Determines whether or not the cancel button should be visible onscreen.
   * Cancel button should be shown if one of two conditions applies:
   * 1. `showCancelButton` is set to `always`.
   * 2. `showCancelButton` is set to `focus`, and the searchbar has been focused.
   */
  private shouldShowCancelButton(): boolean {
    if (this.showCancelButton === 'never' || (this.showCancelButton === 'focus' && !this.focused)) {
      return false;
    }

    return true;
  }

  /**
   * Determines whether or not the clear button should be visible onscreen.
   * Clear button should be shown if one of two conditions applies:
   * 1. `showClearButton` is set to `always`.
   * 2. `showClearButton` is set to `focus`, and the searchbar has been focused.
   * 3. `theme` is not set `ionic`, or the searchbar has not been disabled.
   */
  private shouldShowClearButton(): boolean {
    const theme = getIonTheme(this);

    if (this.showClearButton === 'never' || (this.showClearButton === 'focus' && !this.focused)) {
      return false;
    }

    if (theme === 'ionic' && this.disabled) {
      return false;
    }

    return true;
  }

  private getShape() {
    const theme = getIonTheme(this);
    const { shape } = this;

    // TODO(ROU-11677): Remove theme check when shapes are defined for all themes.
    if (theme !== 'ionic') {
      return undefined;
    }

    if (shape === undefined) {

Review comment (suggestion):
```suggestion
   * Unless the `theme` is `ionic` and the searchbar is disabled.
```
Thinking more about this, this suggestion sounds easier to understand.


Code after:
      return false;
    }

    return true;
  }

  /**
   * Determines whether or not the cancel button should be visible onscreen.
   * Cancel button should be shown if one of two conditions applies:
   * 1. `showCancelButton` is set to `always`.
   * 2. `showCancelButton` is set to `focus`, and the searchbar has been focused.
   */
  private shouldShowCancelButton(): boolean {
    if (this.showCancelButton === 'never' || (this.showCancelButton === 'focus' && !this.focused)) {
      return false;
    }

    return true;
  }

  /**
   * Determines whether or not the clear button should be visible onscreen.
   * Clear button should be shown if one of two conditions applies:
   * 1. `showClearButton` is set to `always`.
   * 2. `showClearButton` is set to `focus`, and the searchbar has been focused.
   * Unless the `theme` is `ionic` and the searchbar is disabled.
   */
  private shouldShowClearButton(): boolean {
    const theme = getIonTheme(this);

    if (this.showClearButton === 'never' || (this.showClearButton === 'focus' && !this.focused)) {
      return false;
    }

    if (theme === 'ionic' && this.disabled) {
      return false;
    }

    return true;
  }

  private getShape() {
    const theme = getIonTheme(this);
    const { shape } = this;

    // TODO(ROU-11677): Remove theme check when shapes are defined for all themes.
    if (theme !== 'ionic') {
      return undefined;
    }

    if (shape === undefined) {