Skip to content

Commit

Permalink
feat: release start with data solution (appsmithorg#29480)
Browse files Browse the repository at this point in the history
## Description

This PR release start with data onaboarding solution to 50% of new
users.

#### PR fixes following issue(s)
Fixes appsmithorg#29479
#### 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)
>
>
>
## Testing
>
#### How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Also
list any relevant details for your test configuration.
> Delete anything that is not relevant
- [x] Manual
- [ ] JUnit
- [ ] Jest
- [ ] Cypress
>
>
#### Test Plan
> Add Testsmith test cases links that relate to this PR
>
>
#### 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
- [ ] 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
- [x] PR is being merged under a feature flag


#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [ ] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [ ] Cypress test cases have been added and approved by SDET/manual QA
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed


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

- **Refactor**
- Simplified the app creation process by removing unnecessary local
storage checks.
  - Streamlined analytics event logging during app creation.

- **Chores**
- Removed unused code related to local storage to enhance performance
and maintainability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: “sneha122” <“[email protected]”>
  • Loading branch information
sneha122 and “sneha122” authored Dec 11, 2023
1 parent 6395f2e commit 26039e9
Showing 1 changed file with 7 additions and 26 deletions.
33 changes: 7 additions & 26 deletions app/client/src/ce/pages/Applications/CreateNewAppsOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ import styled from "styled-components";
import AnalyticsUtil from "utils/AnalyticsUtil";
import history from "utils/history";
import { builderURL } from "@appsmith/RouteBuilder";
import localStorage from "utils/localStorage";
import { getDatasource, getPlugin } from "@appsmith/selectors/entitiesSelector";
import type { Plugin } from "api/PluginApi";
import { PluginPackageName, PluginType } from "entities/Action";
Expand Down Expand Up @@ -230,32 +229,14 @@ const CreateNewAppsOption = ({
};

const onClickStartWithData = () => {
const devEnabled = localStorage.getItem(
"ab_onboarding_flow_start_with_data_dev_only_enabled",
);
if (devEnabled) {
// fetch plugins information to show list of all plugins
AnalyticsUtil.logEvent("CREATE_APP_FROM_DATA");
dispatch(fetchPlugins());
dispatch(fetchMockDatasources());
if (application?.workspaceId) {
dispatch(fetchingEnvironmentConfigs(application?.workspaceId, true));
}
setUseType(START_WITH_TYPE.DATA);
} else {
if (application) {
AnalyticsUtil.logEvent("CREATE_APP_FROM_DATA", {
shortcut: "true",
});
dispatch(
firstTimeUserOnboardingInit(
application.id,
application.defaultPageId as string,
"datasources/NEW",
),
);
}
AnalyticsUtil.logEvent("CREATE_APP_FROM_DATA");
// fetch plugins information to show list of all plugins
dispatch(fetchPlugins());
dispatch(fetchMockDatasources());
if (application?.workspaceId) {
dispatch(fetchingEnvironmentConfigs(application?.workspaceId, true));
}
setUseType(START_WITH_TYPE.DATA);
};

const goBackToInitialScreen = () => {
Expand Down

0 comments on commit 26039e9

Please sign in to comment.