PromucFlow_constructor/app/client
Rahul Barwal 8cbf8a5504
fix: Implement dynamic dropdown width in SelectField in JSONForm (#37289)
## Description
<ins>Problem</ins>

The SelectField inside JSONForm widget's dropdown width was not
dynamically adjusted, resulting in inconsistent responsiveness.

<ins>Root cause</ins>

The SelectField component's dropdown width was not being updated
dynamically, causing the component to become too wide or too narrow,
affecting its usability.

<ins>Solution</ins>

This PR enhances the SelectField component to adjust its dropdown width
dynamically for improved responsiveness. This PR handles...

- Dynamically adjusting the dropdown width based on the available screen
space, ensuring a responsive user experience.
- Properly setting up and tearing down the ResizeObserver to ensure
accurate width detection.

Fixes #37279
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.JSONForm"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11790765022>
> Commit: 1438c99fb6760f87879363ed1ad82bc0f3ddea54
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11790765022&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.JSONForm`
> Spec:
> <hr>Tue, 12 Nov 2024 04:59:15 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced the `SelectField` component for dynamic dropdown width
adjustment based on its wrapper size.
	- Improved filter update handling within the `SelectField`.

- **Bug Fixes**
- Expanded tests for validation logic to ensure accurate behavior based
on the `isRequired` property.

- **Tests**
- Added comprehensive tests for the `SelectField`, including mock
implementations for `ResizeObserver` to validate resizing behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-12 10:56:26 +05:30
..
.husky
.yarn
cypress chore: Updating the copy in the action settings pane (#37260) 2024-11-07 00:20:52 +05:30
docker/templates
generators
packages chore: Add Rename context menu (#37116) 2024-10-31 17:25:04 +05:30
public chore: Distributed tracing for client (#37101) 2024-10-29 11:25:43 +05:30
src fix: Implement dynamic dropdown width in SelectField in JSONForm (#37289) 2024-11-12 10:56:26 +05:30
test chore: Updating the copy in the action settings pane (#37260) 2024-11-07 00:20:52 +05:30
typings
.babelrc chore: rename old ADS package (#35517) 2024-08-08 15:55:00 +03:00
.dockerignore
.editorconfig
.eslintrc.base.json feat: add react-compiler eslint plugin (#37139) 2024-10-31 16:40:18 +01:00
.eslintrc.js
.fork-ts-checkerrc
.gitignore
.lintstagedrc.json
.nvmrc
.prettierignore
.prettierrc
.sentryclirc
.yarnrc.yml
build.sh
craco.build.config.js
craco.common.config.js
craco.dev.config.js
cypress_ci_custom.config.ts chore: change snapshot package (#35867) 2024-09-12 11:09:42 +03:00
cypress_ci_hosted.config.ts chore: change snapshot package (#35867) 2024-09-12 11:09:42 +03:00
cypress_ci.config.ts chore: change snapshot package (#35867) 2024-09-12 11:09:42 +03:00
cypress-add-tags.js
cypress.config.ts chore: change snapshot package (#35867) 2024-09-12 11:09:42 +03:00
download-assets.js
jest.config.js chore: Distributed tracing for client (#37101) 2024-10-29 11:25:43 +05:30
knip.json fix: removing unused dependencies and explicitly installing used ones (#36573) 2024-09-30 12:28:46 +03:00
package.json feat: add react-compiler eslint plugin (#37139) 2024-10-31 16:40:18 +01:00
README.md
README.old.md
start-caddy.sh
start-https.sh
tailwind.config.js
tsconfig.json
tsconfig.path.json chore: rename old ADS package (#35517) 2024-08-08 15:55:00 +03:00
vercel.json
yarn.lock feat: add react-compiler eslint plugin (#37139) 2024-10-31 16:40:18 +01:00

Appsmith Client

This project was bootstrapped with Create React App.

For details on setting up your development machine, please refer to the Setup Guide