Repository: Sage/carbon (ts)

Issue:
`Textarea` props `cols`, `size` and `tooltipMessage` don't appear to have any effect
### Current behaviour

When trying to set `cols` or `size` to control the appearance of the Textarea, nothing happens, though I can see from your code that they are passed further down.

Setting `tooltipMessage` has no impact - looking at code I can see it in the type definition but nowhere else - not sure if there are any other tooltip related props that do/don't work.

### Expected behaviour

Props either work or shouldn't be listed.

### CodeSandbox or Storybook URL

https://codesandbox.io/s/fragrant-silence-d9f2c6?file=/src/App.js

### JIRA Ticket (Sage Only)

_No response_

### Suggested Solution

_No response_

### Carbon Version

116.2.0

### Design Tokens Version

_No response_

### What browsers are you seeing the problem on?

Firefox, Chrome

### What Operating System are you seeing the problem on?

Windows

### Anything else we should know?

_No response_

### Confidentiality

- [X] I confirm there is no confidential or commercially sensitive information included.

Pull request description:
feat(textarea): remove redundant props
### Proposed behaviour

BREAKING CHANGE: removed cols, size and tooltipMessage props from the TextArea
component as they were no longer doing anything

fix #6107

<!--
A clear and concise description of what changes this PR makes. If applicable, include any UI screenshots to help explain your request. If you are a Sage contributor, please DO NOT share any commercially sensitive information, such as UI screenshots or code from Sage products.
-->

### Current behaviour

Textarea has a some props that are redundant now and should be removed
<!--
A clear and concise description of the behaviour before this change. If applicable, include any UI screenshots to help explain your request. If you are a Sage contributor, please DO NOT share any commercially sensitive information, such as UI screenshots or code from Sage products.
-->

### Checklist

<!-- Each PR should include the following -->

- [x] Commits follow our style guide
- [x] Related issues linked in commit messages if required
- [x] Unit tests added or updated if required
- [x] Playwright automation tests added or updated if required
- [x] Storybook added or updated if required
- [x] Typescript interfaces updated if required

#### QA

- [ ] Tested in provided StackBlitz sandbox/Storybook
- [ ] Add new Playwright test coverage if required
- [ ] Carbon implementation matches Design System/designs
- [ ] UI Tests GitHub check reviewed if required

### Additional context

`size`, `cols` and `tooltipMessage` props have been removed so need to ensure there is no regression

<!-- Add any other context or links about the pull request here. -->

Patch:
diff --git a/src/components/textarea/textarea.component.tsx b/src/components/textarea/textarea.component.tsx
index 33e2c9dfa..c26dbbe62 100644
--- a/src/components/textarea/textarea.component.tsx
+++ b/src/components/textarea/textarea.component.tsx
@@ -44,8 +44,6 @@ export interface TextareaProps
   characterLimit?: number;
   /** Type of the icon that will be rendered next to the input */
   children?: React.ReactNode;
-  /** The visible width of the text control, in average character widths */
-  cols?: number;
   /** If true, the component will be disabled */
   disabled?: boolean;
   /** Indicate that error has occurred
@@ -104,10 +102,6 @@ export interface TextareaProps
   isOptional?: boolean;
   /** The number of visible text lines for the control */
   rows?: number;
-  /** One of type of size to apply to the textarea */
-  size?: "small" | "medium" | "large";
-  /** Message to be displayed in a Tooltip when the user hovers over the help icon */
-  tooltipMessage?: string;
   /** Overrides the default tooltip position */
   tooltipPosition?: "top" | "bottom" | "left" | "right";
   /** When true, validation icon will be placed on label instead of being placed on the input */
@@ -135,7 +129,6 @@ export const Textarea = React.forwardRef(
       inputHint,
       fieldHelp,
       label,
-      size,
       children,
       characterLimit,
       onChange,
@@ -154,7 +147,6 @@ export const Textarea = React.forwardRef(
       placeholder,
       expandable = false,
       rows,
-      cols,
       validationOnLabel = false,
       adaptiveLabelBreakpoint,
       inputWidth,
@@ -312,7 +304,6 @@ export const Textarea = React.forwardRef(
 
     const input = (
       <InputPresentation
-        size={size}
         disabled={disabled}
         readOnly={readOnly}
         inputWidth={
@@ -338,7 +329,6 @@ export const Textarea = React.forwardRef(
           readOnly={readOnly}
           placeholder={disabled ? "" : placeholder}
           rows={rows}
-          cols={cols}
           id={id}
           as="textarea"
           validationIconId={validationRedesignOptIn ? undefined : validationId}
@@ -351,7 +341,6 @@ export const Textarea = React.forwardRef(
           disabled={disabled}
           readOnly={readOnly}
           inputIcon={inputIcon}
-          size={size}
           error={error}
           warning={warning}
           info={info}
diff --git a/src/components/textarea/textarea.pw.tsx b/src/components/textarea/textarea.pw.tsx
index fed669276..51b8cdea6 100644
--- a/src/components/textarea/textarea.pw.tsx
+++ b/src/components/textarea/textarea.pw.tsx
@@ -19,11 +19,7 @@ import {
   visuallyHiddenCharacterCount,
   visuallyHiddenHint,
 } from "../../../playwright/components/textarea";
-import {
-  CHARACTERS,
-  SIZE,
-  VALIDATION,
-} from "../../../playwright/support/constants";
+import { CHARACTERS, VALIDATION } from "../../../playwright/support/constants";
 import {
   assertCssValueIsApproximately,
   checkAccessibility,
@@ -526,21 +522,6 @@ test.describe("Props tests for Textarea component", () => {
     });
   });
 
-  ([
-    [SIZE.SMALL, "32px"],
-    [SIZE.MEDIUM, "40px"],
-    [SIZE.LARGE, "48px"],
-  ] as [TextareaProps["size"], string][]).forEach(([size, height]) => {
-    test(`should use ${size} as size and render component with ${height} as height`, async ({
-      mount,
-      page,
-    }) => {
-      await mount(<TextareaComponent size={size} />);
-
-      await expect(textarea(page)).toHaveCSS("min-height", height);
-    });
-  });
-
   ([
     ["flex", 399],
     ["flex", 400],
@@ -666,20 +647,6 @@ test.describe("Props tests for Textarea component", () => {
     });
   });
 
-  [5, 25, 100].forEach((cols) => {
-    test(`should render with cols prop set to ${cols}`, async ({
-      mount,
-      page,
-    }) => {
-      await mount(<TextareaComponent cols={cols} />);
-
-      await expect(textareaChildren(page)).toHaveAttribute(
-        "cols",
-        String(cols)
-      );
-    });
-  });
-
   [5, 25, 100].forEach((rows) => {
     test(`should render with rows prop set to ${rows}`, async ({
       mount,
diff --git a/src/components/textarea/textarea.spec.tsx b/src/components/textarea/textarea.spec.tsx
index 7ccb48f3f..5302fa7f5 100644
--- a/src/components/textarea/textarea.spec.tsx
+++ b/src/components/textarea/textarea.spec.tsx
@@ -523,7 +523,6 @@ describe("componentWillUnmount", () => {
         onChange={jest.fn()}
         label="Label"
         expandable
-        cols={10}
         rows={10}
         characterLimit={100}
       />
@@ -583,7 +582,6 @@ describe("componentWillUnmount", () => {
         value="foo"
         onChange={jest.fn()}
         label="Label"
-        cols={10}
         rows={10}
       />
     );


Test patch:
diff --git a/src/components/textarea/textarea-test.stories.tsx b/src/components/textarea/textarea-test.stories.tsx
index bd8bd5a79..14f865967 100644
--- a/src/components/textarea/textarea-test.stories.tsx
+++ b/src/components/textarea/textarea-test.stories.tsx
@@ -25,14 +25,6 @@ export default {
         type: "select",
       },
     },
-    cols: {
-      control: {
-        min: 0,
-        max: 100,
-        step: 1,
-        type: "range",
-      },
-    },
     rows: {
       control: {
         min: 0,
@@ -116,7 +108,6 @@ export default {
   },
   args: {
     expandable: false,
-    cols: 0,
     rows: 0,
     disabled: false,
     autoFocus: false,