PromucFlow_constructor/app/client/cypress/locators
ankurrsinghal 68d21fba7c
feat: multi-line input and auto-resize textarea (#19141)
## Description

Features:-
1. Created a new AutoResizeTextArea component in the editorComponents.
Textarea does not increase its height on adding text, but it increases
its scroll height. To accommodate Auto Height with the
textarea/Multi-line InputWidget, I have created a new TextArea component
which changes its height when its content changes based on its
scrollHeight. This is done by creating another hidden similar proxy
Textarea with contents equal to the widget's value, and whenever this
value changes we run a layout effect that sets the main text area height
equal to the scrollHeight of the proxy textarea.

2. Added a new configuration `Multi-line` for InputWidget in the
Data-Type which will decide whether to replace the `input` element with
`textarea`.
Currently, the way to decide whether we should display a textarea or not
is based on whether widget's height is greater than 8 rows or not. To
fix it, I added a proper configuration which will user to select whether
he/she wants a Single-line input or Multi-line textarea.

3. Replaced the label of `Text` configuration to `Single-line` which
remains a simple `input` element as before.
Changed the label of the Text configuration to Single-line in contrast
with Multi-line.

4. Migration
Added migration number 75 for the InputWidgetsV2. Used the same previous
logic to detect whether the input type should be multiple-line or not
and set the `inputType` to `MULTI_LINE_TEXT` if it's true.

5. Changed a lot of CSS styling in Input components (Currency and Phone
too) so that they look similar to other components like DatePicker and
Select. Currently the input component take containers height which is
different from other components.

6. The onSubmit behaviour of the Multi-line input has also changed. Now
the line-break will happen on Enter and submit will be triggered on Cmd
+ Enter.

7. Added an updateHook in the Input widget which when selected the
Multi-line input will set its dynamic height property to AutoHeight.


Fixes #19655


Media
> A video or a GIF is preferred. when using Loom, don’t embed because it
looks like it’s a GIF. instead, just link to the video


## Type of change

- New feature (non-breaking change which adds functionality)


## How Has This Been Tested?
- Manual
- Jest

### Test Plan

https://github.com/appsmithorg/TestSmith/issues/2151

### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)


## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [x] Test plan has been approved by relevant developers
- [x] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test

Co-authored-by: Apple <nandan@thinkify.io>
Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
2023-01-17 18:46:35 +05:30
..
AdminsSettings.js feat: embed settings (#16629) 2022-11-25 09:16:20 +05:30
ApiEditor.js fix: Outdated design for Rest API Editor (#13812) 2022-07-08 20:01:12 +05:30
apiWidgetslocator.json feat: Revamp deletion flow (#11774) 2022-03-23 05:33:06 +00:00
Applications.json fix: fork app button not opening the fork modal for non-signed in users (#12479) 2022-04-11 10:44:50 +05:30
CMSApplocators.js feat: multi-line input and auto-resize textarea (#19141) 2023-01-17 18:46:35 +05:30
commonlocators.json feat: editor header UI update (#19414) 2023-01-09 19:52:23 +05:30
DatasourcesEditor.json fix: google sheet ui issues, removed redundant code (#18785) 2022-12-20 20:40:18 +05:30
DynamicInput.json feat: keyboard accessible multi-select dropdown, action selector and text input (#10622) 2022-02-10 16:42:44 +05:30
EnterpriseAdminSettingsLocators.json fix: Cypress tests for admin settings's watermark setting (#15760) 2022-08-11 17:35:08 +02:00
explorerlocators.json chore: Property pane design changes (#16112) 2022-09-05 10:22:39 +05:30
FirstTimeUserOnboarding.json
FormControl.json feat: Simplified Google Sheets queries (#14869) 2022-07-04 11:13:27 +05:30
FormWidgets.json feat: [APPSMTH-22] Execute action on widget focus and blur (#18128) 2022-12-12 12:39:22 +05:30
GeneratePage.json feat: fork templates inside an existing app (#17184) 2022-09-30 19:11:04 +05:30
GithubForm.json chore: update a cypress test (#13036) 2022-04-21 11:44:02 +05:30
gitSyncLocators.js test: Automated tests for Bug18376 + few flaky fixes (#18769) 2022-12-09 10:36:52 +05:30
GlobalSearch.json fix: inconsistency in naming actions from omnibar (#13898) 2022-05-25 15:10:06 +05:30
GoogleForm.json chore: update a cypress test (#13036) 2022-04-21 11:44:02 +05:30
GuidedTour.json fix: welcome tour ending on page refresh (#16079) 2022-09-02 18:45:48 +05:30
HelpLocators.json
HomePage.js feat: in-app embed settings (#19023) 2022-12-26 10:41:33 +05:30
jsActionLocators.json
JSEditor.json feat: js object v1 run and settings redesign (#11456) 2022-04-28 17:51:02 +01:00
jsonFormWidget.json test:JsonForm test for multi source data (#14153) 2022-06-08 16:21:53 +05:30
Layout.json feat: show number of tabs on the header (#18071) 2022-11-08 20:50:58 +05:30
LoginPage.json fix: fork app button not opening the fork modal for non-signed in users (#12479) 2022-04-11 10:44:50 +05:30
ModalWidget.json feat: Validations for Action Forms (#10457) 2022-01-27 15:20:05 +05:30
Omnibar.json test: Add visual tests for datasource page (#14811) 2022-07-01 09:01:02 +05:30
Onboarding.json
Pages.json feat: Revamp deletion flow (#11774) 2022-03-23 05:33:06 +00:00
PgAdminlocators.json feat: Select and Multiselect V2 (#10359) 2022-02-02 06:15:07 -08:00
publishWidgetspage.json feat: Code Scanner Widget (#15990) 2022-09-16 10:25:32 +05:30
QueryEditor.json fix: Add collapse icon for bottom bar (#16939) 2022-10-20 17:38:48 +05:30
ReconnectLocators.js feat: 12457 - added application import success modal (#12739) 2022-04-27 12:07:04 +05:30
SignupPage.json
TemplatesLocators.json test: Add cypress tests for template phase 2 (#17036) 2022-10-19 19:43:51 +05:30
ThemeLocators.json chore: Makes use of DS components in ThemeControls (#19000) 2022-12-23 15:37:29 +05:30
ViewWidgets.json test: List testcases (#14009) 2022-05-26 13:25:08 +05:30
welcomePage.json
WidgetLocators.ts fix: video widget not visible in widget pane when explorer is pinned (#17318) 2022-10-29 11:31:25 +05:30
Widgets.json fix: update button states to secondary (#19048) 2022-12-29 11:08:13 +00:00