PromucFlow_constructor/app/client/src/pages/Templates/constants.ts
Jacques Ikot 2fbc831109
fix: add implementation for onForkButtonTrigger in building block (#29976)
## Description
**Issue**
On the templates tab, when clicking the fork button on the building
block card, it navigates to the building block detail screen, this is
not the intended action. Navigating to the details screen should happen
only when the card component itself is clicked. If the fork button is
clicked directly, the fork application init modal should show up.

**Changes Made**
To address this issue, I've updated the onForkButtonTrigger function
within the building block component. I've introduced the
forkTemplateDialog modal and integrated it into the function. Now, when
users click on the fork button, the modal is triggered for the normal
fork template flow like in the rest of the templates.

**House Cleaning**
In the process of addressing the main issue, I took the opportunity to
enhance code clarity. Specifically, I identified and improved comments
in the test storage utility. The utility previously contained a switch
statement that returned different store states, but lacked clear
descriptions on how to effectively utilize the returned stores. With the
updated comments, developers can now easily understand and leverage the
various store states returned by the switch statement, contributing to a
more comprehensible codebase.

#### PR fixes following issue(s)
Issue - #29982 

#### Type of change
> Please delete options that are not relevant.
- Bug fix (non-breaking change which fixes an issue)
- Chore (housekeeping or task changes that don't impact user perception)

## 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
- [ ] Manual
- [ ] JUnit
- [ ] Jest
- [ ] Cypress
>
>
#### Test Plan

#### Issues raised during DP testing

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

- **New Features**
- Enhanced onboarding process with step-specific scenarios for a
personalized experience.
- Introduced a modal for forking templates to streamline user
interactions.

- **Improvements**
- Implemented state management in the template building block for better
user interface responsiveness.

- **Documentation**
- Added descriptive alt text constants for building block thumbnails for
improved accessibility.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-03 10:01:43 +05:30

43 lines
1.2 KiB
TypeScript

// These will be eventually from an api
export const functions = [
{
label: "Technology",
},
{ label: "Health Care" },
{ label: "Financials" },
{ label: "Consumer Discretionary" },
{ label: "Communication Services" },
{ label: "Industrials" },
{ label: "Consumer goods" },
{ label: "Energy" },
{ label: "Utilities" },
{ label: "Real Estate" },
{ label: "Materials" },
{ label: "Agriculture" },
{ label: "Services" },
{ label: "Other" },
{ label: "E-Commerce" },
{ label: "Start-up" },
{ label: "textile" },
];
export const useCases = [
{ label: "Support" },
{ label: "Marketing" },
{ label: "Sales" },
{ label: "Finance" },
{ label: "Information Technology (IT)" },
{ label: "Human Resources (HR)" },
{ label: "Communications" },
{ label: "Legal" },
{ label: "Public Relations (PR)" },
{ label: "Product, design, and UX" },
{ label: "Project Management" },
{ label: "Personal" },
{ label: "Remote work" },
{ label: "Software Development" },
];
export const TEMPLATE_BUILDING_BLOCKS_FILTER_FUNCTION_VALUE = "Building Blocks";
export const TEMPLATE_ALL_FILTER_FUNCTION_VALUE = "All";
export const BUILDING_BLOCK_THUMBNAIL_ALT_TEXT = "Building Block Thumbnail";