PromucFlow_constructor/app/client/src/pages/common
Abhinav Jha d6f2d7ed7a
fix: Changes for Anvil Alpha release (#34211)
## Description
This PR makes the following changes to prepare for the Anvil Alpha
release
- Add a toggle to the applications page header that allows us to toggle
the Anvil feature flag from the UI.
- Enable the above toggle if the toggle feature flag is enabled
- When the toggle is enabled the following changes occur in the UX
- Import application via Git is disabled and a callout is shown to the
user
  - Git features are unavailable for users in Anvil applications
- Copying and pasting widgets between two different layout systems is
disabled and a warning message is shown to the user
- Partial import export of widgets between two different layout systems
is disabled and a warning message is shown to the user
  - CRUD page generation is disabled from datasources
- Anvil applications and classic applications are separated into their
own sections in the workspace.
- In case any of the above sections are empty, an appropriate message is
displayed in the empty section

### Screenshots

![Alpha
Toggle](https://github.com/appsmithorg/appsmith/assets/103687/6bc887e7-eff6-41c2-98a9-ddd5826d4d1a)
![Import from Git
Callout](https://github.com/appsmithorg/appsmith/assets/103687/42cd05c8-da90-4e2e-93be-f4038b1f21f3)

![Paste-callout](https://github.com/appsmithorg/appsmith/assets/103687/031ee732-4ad5-4a03-88bf-d02bab1d3faa)
![Screenshot from 2024-07-03
14-39-13](https://github.com/appsmithorg/appsmith/assets/103687/037585d0-1470-47f7-81b2-c0cf4c7901f9)

### Other details  
- Toggle feature flag - `release_anvil_toggle_enabled`
- Anvil feature flag - `release_anvil_enabled`


Fixes #34578 
Fixes #34576 
Fixes #34575 
Fixes #33718

## Automation

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

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]
> 🔴 🔴 🔴 Some tests have failed.
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9793128338>
> Commit: 09401272c1d52c915aee3b68925406f2f5f962ba
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9793128338&attempt=2&selectiontype=test&testsstatus=failed&specsstatus=fail"
target="_blank">Cypress dashboard</a>.
> Tags: @tag.All
> The following are new failures, please fix them before merging the PR:
<ol>
>
<li>cypress/e2e/Regression/ClientSide/PartialImportExport/PartialExport_spec.ts</ol>
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master"
target="_blank">List of identified flaky tests</a>.
<!-- end of auto-generated comment: Cypress test results  -->


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


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

- **New Features**
  - Added Anvil toggle functionality to the page header.
  - Introduced layout compatibility checks for pasting widgets.

- **Enhancements**
  - Updated widget paste action to verify layout system compatibility.
- Improved handling and processing of user-uploaded JSON files for
widget import.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-07-05 13:57:59 +05:30
..
CustomizedDropdown chore: update storybook (#32828) 2024-04-22 12:17:28 +03:00
datasourceAuth fix: datasource form footer ui fix (#33957) 2024-06-04 23:31:57 +05:30
ErrorPages chore: Update analytics to pass the correct source information in identify user call (#32591) 2024-04-19 15:06:50 +05:30
SearchBar fix: Workspace name editor input going away on hovering other menu items of workspace (#33179) 2024-05-06 17:36:12 +05:30
ArtBoard.tsx
AvatarComponent.tsx chore: add consistent-type-definitions rule (#27907) 2023-10-11 10:35:24 +03:00
Disabler.tsx chore: refactor for convert query to module (#29970) 2024-01-03 15:42:35 +05:30
ErrorPage.tsx chore: show stack trace with the failing action type for cypress (#25037) 2023-07-10 11:23:45 +05:30
ErrorPageHeader.tsx chore: add consistent-type-definitions rule (#27907) 2023-10-11 10:35:24 +03:00
ImportModal.tsx fix: Changes for Anvil Alpha release (#34211) 2024-07-05 13:57:59 +05:30
Loader.tsx
LoginHeader.tsx chore:add eslint rules (#27878) 2023-10-09 16:54:06 +03:00
MobileSidebar.tsx feat: remove cloudHosting conditional check, change version name (#28086) 2023-10-15 02:11:29 +05:30
NotFound.tsx
PageHeader.tsx fix: Changes for Anvil Alpha release (#34211) 2024-07-05 13:57:59 +05:30
PageLoadingBar.tsx
PageSectionDivider.tsx
PageSectionHeader.tsx
PageWrapper.tsx chore: Callout to Banner component migration for Billing Banner (#27910) 2023-10-15 13:46:58 +05:30
PaneWrapper.tsx
ProfileDropdown.tsx feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
ProfileImage.tsx feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
SearchSnippets.tsx chore: add consistent-type-definitions rule (#27907) 2023-10-11 10:35:24 +03:00
SharedUserList.tsx feat: Homepage experience v2 changes (#29282) 2024-01-25 19:11:48 +05:30
SpinnerLoader.tsx feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
SuccessTick.tsx chore: update eslint and dependencies then fix revealed errors (#27908) 2023-10-11 10:14:38 +03:00
ThemeSwitcher.tsx