PromucFlow_constructor/app/client/src/utils/AnalyticsUtil.tsx

529 lines
15 KiB
TypeScript
Raw Normal View History

2020-03-03 07:02:53 +00:00
// Events
import * as log from "loglevel";
import smartlookClient from "smartlook-client";
import { getAppsmithConfigs } from "@appsmith/configs";
import * as Sentry from "@sentry/react";
import { ANONYMOUS_USERNAME, User } from "constants/userConstants";
import { sha256 } from "js-sha256";
declare global {
interface Window {
// Zipy is added via script tags in index.html
zipy: {
identify: (uid: string, userInfo: Record<string, string>) => void;
anonymize: () => void;
};
}
}
export type EventLocation =
| "LIGHTNING_MENU"
| "API_PANE"
| "QUERY_PANE"
[Feature] Unified New Nav (#5558) * temp commit * using onsubmit to continue using action on form * added recaptcha site key to env example file * moved the recaptcha lib loading logic to signup page * removed unnecessary edit * handle the case where the recaptcha token is not provided as env var * added proper env var config for client * recaptcha config for ansible * recaptcha config for heroku * recaptcha config for k8s * updated app.json * fixed the typos * added more description for env vars * removed api key * minor typo fix * added new integration button * updated the add int default link * added active and create new tabs * added the empty components to tabs. will control the section manually. * added proper grid for integrations page * added vertical tabs * Added secondary tabs to integrations page * added separate page for new apis * classname changes * added new components for active queries, new queries etc. * added a separate component for data source list * adding screen component conditionally, to be showing upon user's choice * 1. Added grid styling to datasource home 2. Added connect buttons to em * fixed data source security banner * updated the styling for new api page * added tertiary menu for active integrations * updated styling for active connections * updated collapse component to work properly * added show more option to active data sources * Slash commands feature init commit * Added more commands * Introduced JSX to render custom commands * Merge conflict fix * Spacing changes * removed apis/db tabs and replaced em with integrations tab * removed the unnecessary + integrations btn * Added slash commands button * Adjust styles for better ui * Ordered the action entries under integrations * Added new datasource command * updated the getURL with proper params * updated the link of create datasource btn * updated the back btn link from data source editor * Show connect data cta in property pane * Styling fixes * Fix margin * added scrollable content to create new * added on click scroll to create new page * fixed a bug, creating new datasource twice * added new action creator for integrations. * Minor changes to add new bindings command. Changed ui behaviour of / button * UI style change * updated the query editor to match the over all theme * updated the query editor tabs * Added the run btn to empty response screens * minor fix * updated the bg color of api type drop down * updated the url being visited after delete api/query * removed log * Insert binding command UI change * More UI changes * removed unnecessary junk from integrations editor index * clean up, removed unnecessary files * removed useless routes * for debugger only checking if integrations editor * Removed all the links for api/query home pages * Move command actions to a saga Added support to binding the data back to the widget when are new API is created from widget * Added reverse binding for DB queries * Show / button only on hover * not routing to integrations on create query/api * Hide actions from suggestions in action pages * removed the query/datasource/api home pages * Changes widget.data to widget in slash commands * Show dependencies in property pane * Fix warning * fixed scrolling issue * will show a list of queries and apis for action picker * showing icons for each action under integrations * Fix dropdown not showing up * Minor refactoring. Changed commands * added a way to list data sources in action creators * Update query page url * cam show icons for datasources * Removed unused code * Feature/slash commands (#5002) * Slash commands feature init commit * Added more commands * Introduced JSX to render custom commands * Merge conflict fix * Spacing changes * Added slash commands button * Adjust styles for better ui * Added new datasource command * Minor changes to add new bindings command. Changed ui behaviour of / button * UI style change * Insert binding command UI change * More UI changes * Move command actions to a saga Added support to binding the data back to the widget when are new API is created from widget * Added reverse binding for DB queries * Show / button only on hover * Hide actions from suggestions in action pages * Changes widget.data to widget in slash commands * Minor refactoring. Changed commands * Removed unused code * remove more unusued code * Added support to generate new api from a datasource in quick commands * Code correction to use types * Refactored commands code * Minor bug fixes * Remove new integrations command for actions. Fixed autocomplete not showing up * Changes to prevent autocomplete trigger for navigation commands * Prevent hinter execution when show hint is open already. * Show hinter on focus * Update text to be called in the omnibar * updated the copy for empty active datasources * Update url * Fix text decoration * updated the redirection for back btns * Use themes * Add cypress test * fixed back btn nav * fetching form configs for datasources * a callback fixed * Fix slash command not executed on click (#5540) * Replace the value if not a string else append * Log commands menu events * updated mock data base navigation * updated mock data base navigation * updated the close editors and back buttons * All back btns from editors will go back to data sources and back from data source will go back to canvas * fixed bg colors * minor styled updates * removed margin from header of generic datasource * warnings fixes * If user is already on the location not redirecting em * when editing, will check if the coming from data source and redirect accordingly * updated redirection for newly created api/queries * updated back btn for newly created datasources * back for new curl goes to data sources * Revert "[Fix] revert new nav (#5533)" This reverts commit 1647815d * remaining original reverted chagnes * fixed the width of incoming/outgoing entity bar in property pane * removing residue from resolved merge conflicts * Fix widget icons not visible in dropdown menu * minor fix to use proper integration URL * updated the URLs for unified datasources * converted back and close to btns from banners * on accessing data source from sidebar, it'll always go to view mode * updated the edit path for saas editors * Added saved state for google sheet * on google sheet delete redirecting to create new * minor fix * fixed the redirection call on saving a datasource * removed save and test cmd as it wasn't needed * Removing test cases to be fixed by Arun * commenting more tests to be fixed by Arun * updated call api cy command * Fix extra margin issue * fixed the update datasource saga * fixed video spec * Revert "commenting more tests to be fixed by Arun" This reverts commit 42087a95ad77107401a1619e4c2d4c541a81d6c3. * Revert "Removing test cases to be fixed by Arun" This reverts commit f6fad67e558d22045114a90409428ef9b737478f. * fixed the entity explorer query datasource spec * cautious fix * update widget locators * fixed leave org test * fixes for FormWidgets * updated the image spec * Use memo * Fix debugger url checks * for copy and delete widget pointing directly to svgs * Fix entity text * Fix styling and show tooltip for property pane dependencies * removed the unnecessary callback * added a separate saga to to redirect to new integrations using onSuccess * Bug Fixes - New nav (#5629) * will show scrollbar only on hover * made mock data cards clickable * fixed the grid view * fixed the cursor position when clicking on / btn * updated the hint for `/` command * binding prompt will close on focus change * hiding / command for api body * hiding / command for query pane * Added 2 new icons * Fix cursor position on selecting a binding and clicking on the slash menu button * trying out fix to copyWidget cy command * removing zero width space characters from the property pane text Co-authored-by: arunvjn <arun@appsmith.com> Co-authored-by: Akash N <akash@codemonk.in> Co-authored-by: arunvjn <32433245+arunvjn@users.noreply.github.com> Co-authored-by: Rishabh Saxena <rishabh.robben@gmail.com>
2021-07-07 03:46:16 +00:00
| "QUERY_TEMPLATE"
| "QUICK_COMMANDS"
| "OMNIBAR"
| "SUBMENU"
| "ACTION_SELECTOR"
| "ENTITY_EXPLORER"
| "KEYBOARD_SHORTCUT"
| "JS_OBJECT_GUTTER_RUN_BUTTON" // Gutter: https://codemirror.net/examples/gutter/
| "JS_OBJECT_MAIN_RUN_BUTTON"
| "JS_OBJECT_RESPONSE_RUN_BUTTON";
2019-09-09 09:08:54 +00:00
export type EventName =
| "APP_CRASH"
| "SWITCH_DATASOURCE"
2020-03-11 13:59:46 +00:00
| "LOGIN_CLICK"
| "SIGNUP_CLICK"
2019-09-09 09:08:54 +00:00
| "PAGE_VIEW"
| "ADD_COMPONENT"
| "DELETE_COMPONENT"
2020-03-03 07:02:53 +00:00
| "RESIZE_COMPONENT"
| "WIDGET_DRAG"
| "WIDGET_DROP"
| "WIDGET_DELETE"
| "WIDGET_RESIZE_START"
| "WIDGET_RESIZE_END"
| "WIDGET_PROPERTY_UPDATE"
| "WIDGET_TOGGLE_JS_PROP"
| "WIDGET_CARD_DRAG"
| "WIDGET_CARD_DROP"
| "CREATE_PAGE"
| "PAGE_RENAME"
| "PAGE_SWITCH"
2020-03-06 04:59:24 +00:00
| "DELETE_PAGE"
| "SIDEBAR_NAVIGATION"
| "PUBLISH_APP"
| "PREVIEW_APP"
| "EDITOR_OPEN"
| "CREATE_ACTION"
Introducing Google Sheets Plugin (#3517) * cherry pick -make new * revert to enable fix from release * attempt to hook into existing datasource editor * gSheets plugin skeleton from Rest API * Changes for database migration * fix for auth code * separate it out * action page loads! * add to explorer * create action from datasource * Editor JSON WIP * working query form * Editor JSON WIP * import to * fix toast message * redirect from datasource and editor pages * fix onboarding * fix imports and constants * refactor form out * refactor queryForm * Merge branch 'release' into feature/google-sheets * Merge branch 'release' into feature/google-sheets * initial values from settings, editor and form * Check * remove dangling code around lightTheme * Safety net * remove class * try mouseover solve * force click * changes from review * fix action form name on import * Merge branch 'release' into feature/google-sheets * minor cleanup * Merge branch 'release' into feature/google-sheets * WIP * Google sheets changes * Merge conflicts * Merging and fixes, needs refactoring * Check * Merge branch 'release' into feature/google-sheets * Fixed tests * Add cloud services env variable * Clean up saga * Clean up * Refactoring * Deleted svg file * Minor fixes * Modified design to allow behaviour in google sheets methods (#3486) * Modified design to allow behaviour in google sheets methods * Review changes * Removed sysout * Added handling of edge cases with table data * Merge branch 'release' into feature/google-sheets * Fixes * Fixes * Added validations * Improved tests * Removed extraneous injected bean * Review changes * Fixed bug with method * Changes to Google sheets plugin's request and response structures (#3692) * Method changes * Removed logging * Renaming options * Reverting pom version * Modified type of collection variables, fixed errors * Converted row offset field to one that supports dynamic bindings * Review changes * List SAAS plugin type actions under lightning menu apis (#3820) * list saas plugin type actions under lightning menu apis * combine saas plugin type actions in the other sub menu of lightning menu Co-authored-by: Hetu Nandu <hetunandu@gmail.com> * Fix merge issues * Prettified query editor and a few fixes w/ ux * Test fixes * Reformatting request * code for REST added (#3876) Co-authored-by: hetunandu <hetu@appsmith.com> * Renamed body to row object * Renamed placeholder for range * Renamed range heading * Modifications to handle range semantics * Use spreadsheet Url instead of id * Ordering of methods * Removed logging * Add tests for Dynamic text controls * Add tests for url helpers * Fix coverage config * Nevermind * Interface changes * There is no body here * Yay to hints * Delete row field is separately handled as row index * placeholder support (#4001) * Fixed tests, typos and creating new sheets with random rows * Switched to using 'rowIndex' throughout * binding path added for query input field (#4016) * - Fixed QA bugs (#4032) - Split delete sheet into two - Removed dynamic query input types from hidden keys * Proper exceptions * Removed extra logging * Throw exception if update method does not match any of the columns * Same for bulk update * Zero-indexed delete row * I'm a space bound rocket ship * Logic to register installations with cs (#4062) * Logic to register installations with cs * Clean up * Casting to string * Checking to see if this makes the test pass * Added an extra null check Co-authored-by: Piyush <piyush@codeitout.com> Co-authored-by: hetunandu <hetu@appsmith.com> Co-authored-by: Hetu Nandu <hetunandu@gmail.com> Co-authored-by: Apeksha Bhosale <7846888+ApekshaBhosale@users.noreply.github.com>
2021-04-22 03:30:09 +00:00
| "SAVE_SAAS"
| "DELETE_SAAS"
| "RUN_SAAS_API"
2020-03-06 04:59:24 +00:00
| "SAVE_API"
2020-03-11 13:59:46 +00:00
| "SAVE_API_CLICK"
2020-03-06 04:59:24 +00:00
| "RUN_API"
2020-03-11 13:59:46 +00:00
| "RUN_API_CLICK"
| "RUN_API_SHORTCUT"
2020-03-06 04:59:24 +00:00
| "DELETE_API"
2020-03-11 13:59:46 +00:00
| "DELETE_API_CLICK"
| "IMPORT_API"
| "EXPAND_API"
| "IMPORT_API_CLICK"
| "MOVE_API_CLICK"
| "ADD_API_PAGE"
2020-03-06 04:59:24 +00:00
| "DUPLICATE_API"
| "DUPLICATE_API_CLICK"
| "RUN_QUERY"
| "RUN_QUERY_CLICK"
| "RUN_QUERY_SHORTCUT"
| "DELETE_QUERY"
| "SAVE_QUERY"
2020-03-06 04:59:24 +00:00
| "MOVE_API"
| "3P_PROVIDER_CLICK"
2020-03-06 04:59:24 +00:00
| "API_SELECT"
| "CREATE_API_CLICK"
[Feature] Unified New Nav (#5558) * temp commit * using onsubmit to continue using action on form * added recaptcha site key to env example file * moved the recaptcha lib loading logic to signup page * removed unnecessary edit * handle the case where the recaptcha token is not provided as env var * added proper env var config for client * recaptcha config for ansible * recaptcha config for heroku * recaptcha config for k8s * updated app.json * fixed the typos * added more description for env vars * removed api key * minor typo fix * added new integration button * updated the add int default link * added active and create new tabs * added the empty components to tabs. will control the section manually. * added proper grid for integrations page * added vertical tabs * Added secondary tabs to integrations page * added separate page for new apis * classname changes * added new components for active queries, new queries etc. * added a separate component for data source list * adding screen component conditionally, to be showing upon user's choice * 1. Added grid styling to datasource home 2. Added connect buttons to em * fixed data source security banner * updated the styling for new api page * added tertiary menu for active integrations * updated styling for active connections * updated collapse component to work properly * added show more option to active data sources * Slash commands feature init commit * Added more commands * Introduced JSX to render custom commands * Merge conflict fix * Spacing changes * removed apis/db tabs and replaced em with integrations tab * removed the unnecessary + integrations btn * Added slash commands button * Adjust styles for better ui * Ordered the action entries under integrations * Added new datasource command * updated the getURL with proper params * updated the link of create datasource btn * updated the back btn link from data source editor * Show connect data cta in property pane * Styling fixes * Fix margin * added scrollable content to create new * added on click scroll to create new page * fixed a bug, creating new datasource twice * added new action creator for integrations. * Minor changes to add new bindings command. Changed ui behaviour of / button * UI style change * updated the query editor to match the over all theme * updated the query editor tabs * Added the run btn to empty response screens * minor fix * updated the bg color of api type drop down * updated the url being visited after delete api/query * removed log * Insert binding command UI change * More UI changes * removed unnecessary junk from integrations editor index * clean up, removed unnecessary files * removed useless routes * for debugger only checking if integrations editor * Removed all the links for api/query home pages * Move command actions to a saga Added support to binding the data back to the widget when are new API is created from widget * Added reverse binding for DB queries * Show / button only on hover * not routing to integrations on create query/api * Hide actions from suggestions in action pages * removed the query/datasource/api home pages * Changes widget.data to widget in slash commands * Show dependencies in property pane * Fix warning * fixed scrolling issue * will show a list of queries and apis for action picker * showing icons for each action under integrations * Fix dropdown not showing up * Minor refactoring. Changed commands * added a way to list data sources in action creators * Update query page url * cam show icons for datasources * Removed unused code * Feature/slash commands (#5002) * Slash commands feature init commit * Added more commands * Introduced JSX to render custom commands * Merge conflict fix * Spacing changes * Added slash commands button * Adjust styles for better ui * Added new datasource command * Minor changes to add new bindings command. Changed ui behaviour of / button * UI style change * Insert binding command UI change * More UI changes * Move command actions to a saga Added support to binding the data back to the widget when are new API is created from widget * Added reverse binding for DB queries * Show / button only on hover * Hide actions from suggestions in action pages * Changes widget.data to widget in slash commands * Minor refactoring. Changed commands * Removed unused code * remove more unusued code * Added support to generate new api from a datasource in quick commands * Code correction to use types * Refactored commands code * Minor bug fixes * Remove new integrations command for actions. Fixed autocomplete not showing up * Changes to prevent autocomplete trigger for navigation commands * Prevent hinter execution when show hint is open already. * Show hinter on focus * Update text to be called in the omnibar * updated the copy for empty active datasources * Update url * Fix text decoration * updated the redirection for back btns * Use themes * Add cypress test * fixed back btn nav * fetching form configs for datasources * a callback fixed * Fix slash command not executed on click (#5540) * Replace the value if not a string else append * Log commands menu events * updated mock data base navigation * updated mock data base navigation * updated the close editors and back buttons * All back btns from editors will go back to data sources and back from data source will go back to canvas * fixed bg colors * minor styled updates * removed margin from header of generic datasource * warnings fixes * If user is already on the location not redirecting em * when editing, will check if the coming from data source and redirect accordingly * updated redirection for newly created api/queries * updated back btn for newly created datasources * back for new curl goes to data sources * Revert "[Fix] revert new nav (#5533)" This reverts commit 1647815d * remaining original reverted chagnes * fixed the width of incoming/outgoing entity bar in property pane * removing residue from resolved merge conflicts * Fix widget icons not visible in dropdown menu * minor fix to use proper integration URL * updated the URLs for unified datasources * converted back and close to btns from banners * on accessing data source from sidebar, it'll always go to view mode * updated the edit path for saas editors * Added saved state for google sheet * on google sheet delete redirecting to create new * minor fix * fixed the redirection call on saving a datasource * removed save and test cmd as it wasn't needed * Removing test cases to be fixed by Arun * commenting more tests to be fixed by Arun * updated call api cy command * Fix extra margin issue * fixed the update datasource saga * fixed video spec * Revert "commenting more tests to be fixed by Arun" This reverts commit 42087a95ad77107401a1619e4c2d4c541a81d6c3. * Revert "Removing test cases to be fixed by Arun" This reverts commit f6fad67e558d22045114a90409428ef9b737478f. * fixed the entity explorer query datasource spec * cautious fix * update widget locators * fixed leave org test * fixes for FormWidgets * updated the image spec * Use memo * Fix debugger url checks * for copy and delete widget pointing directly to svgs * Fix entity text * Fix styling and show tooltip for property pane dependencies * removed the unnecessary callback * added a separate saga to to redirect to new integrations using onSuccess * Bug Fixes - New nav (#5629) * will show scrollbar only on hover * made mock data cards clickable * fixed the grid view * fixed the cursor position when clicking on / btn * updated the hint for `/` command * binding prompt will close on focus change * hiding / command for api body * hiding / command for query pane * Added 2 new icons * Fix cursor position on selecting a binding and clicking on the slash menu button * trying out fix to copyWidget cy command * removing zero width space characters from the property pane text Co-authored-by: arunvjn <arun@appsmith.com> Co-authored-by: Akash N <akash@codemonk.in> Co-authored-by: arunvjn <32433245+arunvjn@users.noreply.github.com> Co-authored-by: Rishabh Saxena <rishabh.robben@gmail.com>
2021-07-07 03:46:16 +00:00
| "AUTO_COMPLETE_SHOW"
2020-03-06 04:59:24 +00:00
| "AUTO_COMPLETE_SELECT"
| "CREATE_APP_CLICK"
| "CREATE_APP"
| "CREATE_DATA_SOURCE_CLICK"
2020-03-11 13:59:46 +00:00
| "SAVE_DATA_SOURCE"
| "SAVE_DATA_SOURCE_CLICK"
feat: console log implementation in appsmith (#16286) * feat: capture console from across the app (#15676) * create: console override file - Adds methods to override the given console functionality to capture the console statements written by the user * update: evaluate function to extract console op - Added logs extraction for both sync and async functions - Adding them to the return object of the evaluations * update: timestamp field to log addition method - Added optional argument to function definition for inputting the timestamp of the log - This is done to maintain timings of the execution of the log * update: interface for log objects * update: post function execution logic - Added logic to push the logs generated by the evaluation to the logs store * update: added handling for sending nested fns - While console logging functions or objects that had functions was causing an error - Added a check for removing functions and replacing them with name of the functions instead * chore: added types and comments * fix: updated evaluation tests * fix: added check for log in returned obj * update: added the source data in the trigger logs - Removed on js execute logs from showing up here since they are already handled. If they are not removed, they will show up on the first page load twice * add: ellipsis function for log title string - This is to keep big object contained in the first line only * update: made logs reset function public * update: resetting logs before new eval - Logs object has to be cleared before next eval can happen to make sure there are no roll overs from last evals * chore: added comments * add: extracting logs after eval of functions * add: storing logs to redux after eval * refactor: updated types * add: func to store logs w/ severity as arg * refactor: updating func call for user logs * chore: fixed elipsis logic * chore: removed unused type * chore: updated preview text logic * add: type for transfer object post eval * update: aded new userLogs obj to dataTreeEvaluator * update: passing logs from object to saga * update: parsing received userlogs * refactor: used predefined fns * refactor: moved resetlogs to common func * chore: updated comments * feat: update redux store and UI for system + user logs (#15936) * update: updated types for the redux store - Added category and data fields in the log object * update: types of log redux store * update: calls for the console log store function * update: icon fetch func for log item UI * update: syncing UI with the new designs (WIP) * chore: fixed lint error * update: filters for logs * update: icon for clearing log filters * update: filtering function - Added checks against category and severity * update: logitem UI - updated type of the UI object - added css based ellipsis - added toggle for console logs - added array of json views for objects/arrays - css tweaks * update: debugger cta - Removed copy option - Updated UI * update: logic for expanding user logs - Removed debugger CTA - Fixed position for the expand/collapse icon - Added joining char for when the log is expanded * update: assets for new UI - updated colors - Added new icon * hotfix: ternserver code * add: search across the text of log * update: icons for the app * update: click to expand/collapse of logs * fix: search keyword update on change within JSObjects * fix: alignment of log items in both states * update: jest tests for debugger errors and filter * fix: drop down options color issue - the icon used was not the standard one - We have a lot of duplicates of the same icon * fix: synced with ADS changes on release * fix: remove dependency from old icon * add: cypress selectors for automation testing * fix: replaced static messages with variables * fix: updated the dependency map for filter * fix: height of the filter drop down * fix: chaining logic for search filter * fix: syncing the padding values to ADS * fix: help icon visibility issue * fix: width of filter dropdown Co-authored-by: Rishabh-Rathod <rishabh.rathod@appsmith.com> * add: e2e tests for console statements using IIFE * test: added test for console logs in jsobjects * fix: functionality of expanding context menu on msg click * fix: added try catch and handling for numbers * hotfix: handling unwanted toasts * fix: alignment and clickable cursor * fix: alignment of expanded span in console logs * add: analytics event on new console log created * fix: added handling for boolean and undefined * fix: removed log reset from common func - Whenever we are creating global DTO, the logs were being reset. This caused logs to reset whenever a promise was encountered in the logs. * fix: combined JS log saving to widget process * add: new analytics event on filter changed * update: added handling for empty value * update: removed comma between multiple logs * update: synced test changes with release * update: removed unused wait timings * Logs spec script update * update: ts methods in log spec e2e test * logs spec update * update: removed body clicks from test script * Logs spec update * update: removed ask from google option * refactor: ui fixes * fix: text selection of logs * fix: updated dropdown width management * update: made the flushlogs function async * update: added handling for promises * update: added test with promises fail and pass * fix: added sync variant to work for sync objects * refactor: commented out unused tests * update: exceptions in the name of log entity * fix: pagination of logs to handle dynamic data stream * fix: removed unused async function * fix: moved logs handling to separate saga * fix: color for context menu text Co-authored-by: Rishabh-Rathod <rishabh.rathod@appsmith.com> Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-09-04 11:58:05 +00:00
| "CONSOLE_LOG_CREATED"
| "TEST_DATA_SOURCE_SUCCESS"
| "TEST_DATA_SOURCE_CLICK"
fix: Added Gsheet Auth Failure Analytic Event (#19289) ## Description Added analytic event for google sheet authorization failure. This will help us in understanding percentage of use cases where users are not authorizing their google sheet datasource > Add a TL;DR when description is extra long (helps content team) Fixes #18980 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 > Please delete options that are not relevant. - Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Provide instructions, so we can reproduce. > Please also list any relevant details for your test configuration. > Delete anything that is not important - Manual - 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 - [ ] 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: - [ ] Test plan has been approved by relevant developers - [ ] 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: “sneha122” <“sneha@appsmith.com”>
2023-01-03 15:17:25 +00:00
| "UPDATE_DATASOURCE"
| "CREATE_QUERY_CLICK"
2020-03-11 13:59:46 +00:00
| "NAVIGATE"
| "PAGE_LOAD"
2020-03-18 14:31:30 +00:00
| "NAVIGATE_EDITOR"
| "PROPERTY_PANE_OPEN"
| "PROPERTY_PANE_CLOSE"
| "PROPERTY_PANE_OPEN_CLICK"
| "WIDGET_DELETE_UNDO"
| "WIDGET_COPY_VIA_SHORTCUT"
| "WIDGET_COPY"
| "WIDGET_CUT_VIA_SHORTCUT"
| "WIDGET_PASTE"
| "WIDGET_DELETE_VIA_SHORTCUT"
| "OPEN_HELP"
| "INVITE_USER"
| "ROUTE_CHANGE"
| "PROPERTY_PANE_CLOSE_CLICK"
2020-10-07 11:19:56 +00:00
| "APPLICATIONS_PAGE_LOAD"
2020-12-30 07:31:20 +00:00
| "EXECUTE_ACTION"
| "WELCOME_TOUR_CLICK"
2022-01-25 13:56:52 +00:00
| "GUIDED_TOUR_RATING"
| "GUIDED_TOUR_REACHED_STEP"
| "END_GUIDED_TOUR_CLICK"
2021-03-08 08:24:12 +00:00
| "OPEN_OMNIBAR"
| "CLOSE_OMNIBAR"
| "NAVIGATE_TO_ENTITY_FROM_OMNIBAR"
| "PAGE_SAVE"
2021-04-23 13:50:55 +00:00
| "CORRECT_BAD_BINDING"
| "OPEN_DEBUGGER"
| "DEBUGGER_TAB_SWITCH"
feat: console log implementation in appsmith (#16286) * feat: capture console from across the app (#15676) * create: console override file - Adds methods to override the given console functionality to capture the console statements written by the user * update: evaluate function to extract console op - Added logs extraction for both sync and async functions - Adding them to the return object of the evaluations * update: timestamp field to log addition method - Added optional argument to function definition for inputting the timestamp of the log - This is done to maintain timings of the execution of the log * update: interface for log objects * update: post function execution logic - Added logic to push the logs generated by the evaluation to the logs store * update: added handling for sending nested fns - While console logging functions or objects that had functions was causing an error - Added a check for removing functions and replacing them with name of the functions instead * chore: added types and comments * fix: updated evaluation tests * fix: added check for log in returned obj * update: added the source data in the trigger logs - Removed on js execute logs from showing up here since they are already handled. If they are not removed, they will show up on the first page load twice * add: ellipsis function for log title string - This is to keep big object contained in the first line only * update: made logs reset function public * update: resetting logs before new eval - Logs object has to be cleared before next eval can happen to make sure there are no roll overs from last evals * chore: added comments * add: extracting logs after eval of functions * add: storing logs to redux after eval * refactor: updated types * add: func to store logs w/ severity as arg * refactor: updating func call for user logs * chore: fixed elipsis logic * chore: removed unused type * chore: updated preview text logic * add: type for transfer object post eval * update: aded new userLogs obj to dataTreeEvaluator * update: passing logs from object to saga * update: parsing received userlogs * refactor: used predefined fns * refactor: moved resetlogs to common func * chore: updated comments * feat: update redux store and UI for system + user logs (#15936) * update: updated types for the redux store - Added category and data fields in the log object * update: types of log redux store * update: calls for the console log store function * update: icon fetch func for log item UI * update: syncing UI with the new designs (WIP) * chore: fixed lint error * update: filters for logs * update: icon for clearing log filters * update: filtering function - Added checks against category and severity * update: logitem UI - updated type of the UI object - added css based ellipsis - added toggle for console logs - added array of json views for objects/arrays - css tweaks * update: debugger cta - Removed copy option - Updated UI * update: logic for expanding user logs - Removed debugger CTA - Fixed position for the expand/collapse icon - Added joining char for when the log is expanded * update: assets for new UI - updated colors - Added new icon * hotfix: ternserver code * add: search across the text of log * update: icons for the app * update: click to expand/collapse of logs * fix: search keyword update on change within JSObjects * fix: alignment of log items in both states * update: jest tests for debugger errors and filter * fix: drop down options color issue - the icon used was not the standard one - We have a lot of duplicates of the same icon * fix: synced with ADS changes on release * fix: remove dependency from old icon * add: cypress selectors for automation testing * fix: replaced static messages with variables * fix: updated the dependency map for filter * fix: height of the filter drop down * fix: chaining logic for search filter * fix: syncing the padding values to ADS * fix: help icon visibility issue * fix: width of filter dropdown Co-authored-by: Rishabh-Rathod <rishabh.rathod@appsmith.com> * add: e2e tests for console statements using IIFE * test: added test for console logs in jsobjects * fix: functionality of expanding context menu on msg click * fix: added try catch and handling for numbers * hotfix: handling unwanted toasts * fix: alignment and clickable cursor * fix: alignment of expanded span in console logs * add: analytics event on new console log created * fix: added handling for boolean and undefined * fix: removed log reset from common func - Whenever we are creating global DTO, the logs were being reset. This caused logs to reset whenever a promise was encountered in the logs. * fix: combined JS log saving to widget process * add: new analytics event on filter changed * update: added handling for empty value * update: removed comma between multiple logs * update: synced test changes with release * update: removed unused wait timings * Logs spec script update * update: ts methods in log spec e2e test * logs spec update * update: removed body clicks from test script * Logs spec update * update: removed ask from google option * refactor: ui fixes * fix: text selection of logs * fix: updated dropdown width management * update: made the flushlogs function async * update: added handling for promises * update: added test with promises fail and pass * fix: added sync variant to work for sync objects * refactor: commented out unused tests * update: exceptions in the name of log entity * fix: pagination of logs to handle dynamic data stream * fix: removed unused async function * fix: moved logs handling to separate saga * fix: color for context menu text Co-authored-by: Rishabh-Rathod <rishabh.rathod@appsmith.com> Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-09-04 11:58:05 +00:00
| "DEBUGGER_FILTER_CHANGED"
| "DEBUGGER_ENTITY_NAVIGATION"
| "GSHEET_AUTH_INIT"
| "GSHEET_AUTH_COMPLETE"
| "CYCLICAL_DEPENDENCY_ERROR"
| "DISCORD_LINK_CLICK"
| "INTERCOM_CLICK"
[Feature] Unified New Nav (#5558) * temp commit * using onsubmit to continue using action on form * added recaptcha site key to env example file * moved the recaptcha lib loading logic to signup page * removed unnecessary edit * handle the case where the recaptcha token is not provided as env var * added proper env var config for client * recaptcha config for ansible * recaptcha config for heroku * recaptcha config for k8s * updated app.json * fixed the typos * added more description for env vars * removed api key * minor typo fix * added new integration button * updated the add int default link * added active and create new tabs * added the empty components to tabs. will control the section manually. * added proper grid for integrations page * added vertical tabs * Added secondary tabs to integrations page * added separate page for new apis * classname changes * added new components for active queries, new queries etc. * added a separate component for data source list * adding screen component conditionally, to be showing upon user's choice * 1. Added grid styling to datasource home 2. Added connect buttons to em * fixed data source security banner * updated the styling for new api page * added tertiary menu for active integrations * updated styling for active connections * updated collapse component to work properly * added show more option to active data sources * Slash commands feature init commit * Added more commands * Introduced JSX to render custom commands * Merge conflict fix * Spacing changes * removed apis/db tabs and replaced em with integrations tab * removed the unnecessary + integrations btn * Added slash commands button * Adjust styles for better ui * Ordered the action entries under integrations * Added new datasource command * updated the getURL with proper params * updated the link of create datasource btn * updated the back btn link from data source editor * Show connect data cta in property pane * Styling fixes * Fix margin * added scrollable content to create new * added on click scroll to create new page * fixed a bug, creating new datasource twice * added new action creator for integrations. * Minor changes to add new bindings command. Changed ui behaviour of / button * UI style change * updated the query editor to match the over all theme * updated the query editor tabs * Added the run btn to empty response screens * minor fix * updated the bg color of api type drop down * updated the url being visited after delete api/query * removed log * Insert binding command UI change * More UI changes * removed unnecessary junk from integrations editor index * clean up, removed unnecessary files * removed useless routes * for debugger only checking if integrations editor * Removed all the links for api/query home pages * Move command actions to a saga Added support to binding the data back to the widget when are new API is created from widget * Added reverse binding for DB queries * Show / button only on hover * not routing to integrations on create query/api * Hide actions from suggestions in action pages * removed the query/datasource/api home pages * Changes widget.data to widget in slash commands * Show dependencies in property pane * Fix warning * fixed scrolling issue * will show a list of queries and apis for action picker * showing icons for each action under integrations * Fix dropdown not showing up * Minor refactoring. Changed commands * added a way to list data sources in action creators * Update query page url * cam show icons for datasources * Removed unused code * Feature/slash commands (#5002) * Slash commands feature init commit * Added more commands * Introduced JSX to render custom commands * Merge conflict fix * Spacing changes * Added slash commands button * Adjust styles for better ui * Added new datasource command * Minor changes to add new bindings command. Changed ui behaviour of / button * UI style change * Insert binding command UI change * More UI changes * Move command actions to a saga Added support to binding the data back to the widget when are new API is created from widget * Added reverse binding for DB queries * Show / button only on hover * Hide actions from suggestions in action pages * Changes widget.data to widget in slash commands * Minor refactoring. Changed commands * Removed unused code * remove more unusued code * Added support to generate new api from a datasource in quick commands * Code correction to use types * Refactored commands code * Minor bug fixes * Remove new integrations command for actions. Fixed autocomplete not showing up * Changes to prevent autocomplete trigger for navigation commands * Prevent hinter execution when show hint is open already. * Show hinter on focus * Update text to be called in the omnibar * updated the copy for empty active datasources * Update url * Fix text decoration * updated the redirection for back btns * Use themes * Add cypress test * fixed back btn nav * fetching form configs for datasources * a callback fixed * Fix slash command not executed on click (#5540) * Replace the value if not a string else append * Log commands menu events * updated mock data base navigation * updated mock data base navigation * updated the close editors and back buttons * All back btns from editors will go back to data sources and back from data source will go back to canvas * fixed bg colors * minor styled updates * removed margin from header of generic datasource * warnings fixes * If user is already on the location not redirecting em * when editing, will check if the coming from data source and redirect accordingly * updated redirection for newly created api/queries * updated back btn for newly created datasources * back for new curl goes to data sources * Revert "[Fix] revert new nav (#5533)" This reverts commit 1647815d * remaining original reverted chagnes * fixed the width of incoming/outgoing entity bar in property pane * removing residue from resolved merge conflicts * Fix widget icons not visible in dropdown menu * minor fix to use proper integration URL * updated the URLs for unified datasources * converted back and close to btns from banners * on accessing data source from sidebar, it'll always go to view mode * updated the edit path for saas editors * Added saved state for google sheet * on google sheet delete redirecting to create new * minor fix * fixed the redirection call on saving a datasource * removed save and test cmd as it wasn't needed * Removing test cases to be fixed by Arun * commenting more tests to be fixed by Arun * updated call api cy command * Fix extra margin issue * fixed the update datasource saga * fixed video spec * Revert "commenting more tests to be fixed by Arun" This reverts commit 42087a95ad77107401a1619e4c2d4c541a81d6c3. * Revert "Removing test cases to be fixed by Arun" This reverts commit f6fad67e558d22045114a90409428ef9b737478f. * fixed the entity explorer query datasource spec * cautious fix * update widget locators * fixed leave org test * fixes for FormWidgets * updated the image spec * Use memo * Fix debugger url checks * for copy and delete widget pointing directly to svgs * Fix entity text * Fix styling and show tooltip for property pane dependencies * removed the unnecessary callback * added a separate saga to to redirect to new integrations using onSuccess * Bug Fixes - New nav (#5629) * will show scrollbar only on hover * made mock data cards clickable * fixed the grid view * fixed the cursor position when clicking on / btn * updated the hint for `/` command * binding prompt will close on focus change * hiding / command for api body * hiding / command for query pane * Added 2 new icons * Fix cursor position on selecting a binding and clicking on the slash menu button * trying out fix to copyWidget cy command * removing zero width space characters from the property pane text Co-authored-by: arunvjn <arun@appsmith.com> Co-authored-by: Akash N <akash@codemonk.in> Co-authored-by: arunvjn <32433245+arunvjn@users.noreply.github.com> Co-authored-by: Rishabh Saxena <rishabh.robben@gmail.com>
2021-07-07 03:46:16 +00:00
| "BINDING_SUCCESS"
| "APP_MENU_OPTION_CLICK"
2021-07-08 05:31:08 +00:00
| "SLASH_COMMAND"
| "DEBUGGER_NEW_ERROR"
| "DEBUGGER_RESOLVED_ERROR"
| "DEBUGGER_NEW_ERROR_MESSAGE"
| "DEBUGGER_RESOLVED_ERROR_MESSAGE"
| "DEBUGGER_CONTEXT_MENU_CLICK"
| "ADD_MOCK_DATASOURCE_CLICK"
[Feature] Generate template page from datasource (#5513) - Add Generate CRUD page feature - Modify the Datasource card UI in the `INTEGRATION.ACTIVE` tab to directly delete and edit. - Add `renderOption` , `errorMsg`, `isLoading` props in Dropdown component. If `renderOption` prop is not defined, it will show default option UI. - Add getDatasourcesStructure [new entity Selector] ( This will provide all fetched structure of datasources) > Commit Messages ⬇️ * Show disabled GenPage Button for unsupported DS * Add Icon in Select Table and Column dropdown * Add Error message when datasource config has error * Fix the continous loading state issue * Add Not supported datasource in select Table * Add ignoreCache when fetching DS struct * Go to generate page if initiator=generate-page * Fix connect new datasource button disabled * Modify error message for invalid datasource struct * Add snowflake to supported plugin for template * Fix Show More option width * Fix incorrect error msg for valid dS config * Generate page UI improvements * Refactor navigation * Fix Datasource Card UX * Remove semi-colon from Icon loader * Refactor contants * Add executeDatasourceQuery & fetchPluginForm API - WIP google sheet form UI and functionality - Implemented fetch all spreadsheet with mock data * disable S3 and google sheet for generate page * Update yarn.lock * Resolve review comments - Add Messages to `constants/messages` - Add default value for `fetchActionsForPage` 2nd param - Add comment - Remove `onFinishCallback` from `handleFetchedPage` * move string literal to constants/messages * Remove hardcoded pluginId implementation * Refactor getGenerateCRUDEnabledPluginMap selector * Fix CreateAppInFirstListedOrg test command * Add getIsGeneratePageInitiator helper func * Fix Entity explorer Edit option test * Fix CreateAppForOrg test command - Add click on build from scratch in generatePage * Fix deleteDatasource command test - Click on Datasource Name to Edit, Datasource Card handles the click * Fix DynamicLayout spec test issue * Fix pageLoadSpec test * Disable google plugin & Refactor - Add useDatasourceOptions hook * Add datasourceCardMenu in DatasourceEditor.json * Fix issues - Add Icon hover clickable control - Auth API click handler * Fix Createpage test command * Add cypress test for generate page flow * Fix cypress test * Add Analytics * Add comments in CloseEditor * Rename initiator to isGeneratePageMode * Disable S3 for generate CRUD page * Fix generate page from existing datasource issue * Enhance test to verify if data is fetched properly * Wait for get Actions before execute actions * Change the cypress route for excute api Co-authored-by: Pranav Kanade <pranav@appsmith.com>
2021-07-29 08:13:10 +00:00
| "GEN_CRUD_PAGE_CREATE_NEW_DATASOURCE"
| "GEN_CRUD_PAGE_FORM_SUBMIT"
| "GEN_CRUD_PAGE_EDIT_DATASOURCE_CONFIG"
| "GEN_CRUD_PAGE_SELECT_DATASOURCE"
| "GEN_CRUD_PAGE_SELECT_TABLE"
| "GEN_CRUD_PAGE_SELECT_SEARCH_COLUMN"
| "BUILD_FROM_SCRATCH_ACTION_CARD_CLICK"
| "GEN_CRUD_PAGE_ACTION_CARD_CLICK"
| "GEN_CRUD_PAGE_DATA_SOURCE_CLICK"
[Feature] Generate template page from datasource (#5513) - Add Generate CRUD page feature - Modify the Datasource card UI in the `INTEGRATION.ACTIVE` tab to directly delete and edit. - Add `renderOption` , `errorMsg`, `isLoading` props in Dropdown component. If `renderOption` prop is not defined, it will show default option UI. - Add getDatasourcesStructure [new entity Selector] ( This will provide all fetched structure of datasources) > Commit Messages ⬇️ * Show disabled GenPage Button for unsupported DS * Add Icon in Select Table and Column dropdown * Add Error message when datasource config has error * Fix the continous loading state issue * Add Not supported datasource in select Table * Add ignoreCache when fetching DS struct * Go to generate page if initiator=generate-page * Fix connect new datasource button disabled * Modify error message for invalid datasource struct * Add snowflake to supported plugin for template * Fix Show More option width * Fix incorrect error msg for valid dS config * Generate page UI improvements * Refactor navigation * Fix Datasource Card UX * Remove semi-colon from Icon loader * Refactor contants * Add executeDatasourceQuery & fetchPluginForm API - WIP google sheet form UI and functionality - Implemented fetch all spreadsheet with mock data * disable S3 and google sheet for generate page * Update yarn.lock * Resolve review comments - Add Messages to `constants/messages` - Add default value for `fetchActionsForPage` 2nd param - Add comment - Remove `onFinishCallback` from `handleFetchedPage` * move string literal to constants/messages * Remove hardcoded pluginId implementation * Refactor getGenerateCRUDEnabledPluginMap selector * Fix CreateAppInFirstListedOrg test command * Add getIsGeneratePageInitiator helper func * Fix Entity explorer Edit option test * Fix CreateAppForOrg test command - Add click on build from scratch in generatePage * Fix deleteDatasource command test - Click on Datasource Name to Edit, Datasource Card handles the click * Fix DynamicLayout spec test issue * Fix pageLoadSpec test * Disable google plugin & Refactor - Add useDatasourceOptions hook * Add datasourceCardMenu in DatasourceEditor.json * Fix issues - Add Icon hover clickable control - Auth API click handler * Fix Createpage test command * Add cypress test for generate page flow * Fix cypress test * Add Analytics * Add comments in CloseEditor * Rename initiator to isGeneratePageMode * Disable S3 for generate CRUD page * Fix generate page from existing datasource issue * Enhance test to verify if data is fetched properly * Wait for get Actions before execute actions * Change the cypress route for excute api Co-authored-by: Pranav Kanade <pranav@appsmith.com>
2021-07-29 08:13:10 +00:00
| "DATASOURCE_CARD_GEN_CRUD_PAGE_ACTION"
| "DATASOURCE_CARD_DELETE_ACTION"
| "DATASOURCE_CARD_EDIT_ACTION"
| "UNSUPPORTED_PLUGIN_DIALOG_BACK_ACTION"
| "UNSUPPORTED_PLUGIN_DIALOG_CONTINUE_ACTION"
[Feature] new nav sniping mode (#5746) * added sniping mode toggle option to header * added cover to components on hover in sniping mode * fixed the transition time * using filled icon * Show dependencies in action pane * Added a wrapper to make a widget snipeable * removed older parts of sniping from Positioned Container * removed onclick action from snipeable wrapper * Showing widget name in different color * Added a mechanism to send user to sniping mode from successful API screen * created new property pane saga to bind the data * Fix datasource list width issue * Fix sidebar going out of view when the response is a table * Minor refactor * Show add widgets section on the sidebar * Stop showing autocomplete option after adding a widget * fetching pageId, appId from store * Get suggested widget from response * Fix table data not getting evaluated after adding binding * Fix property pane going below the entity explorer while navigating from query/api pane * Fix width of sidepane shifting for apis * Fix vertical margins of connections * Fix api pane suggested widget showing up for errors * Fix margins * can show select in canvas btn in sidebar * can get the action object at the end to bind the data * updated saga and action names * can bind data to table * Use themes * Use new image url for Table widget * Added conditional mapping for sniping mode binding. * updated the widget name tags and seq of calls to open property pane * pushed all sniping mode decoration to header * moved setting sniping mode logic to editor reducer * Added keyboard short cut to get out of sniping mode * updated reset sniping mechanism * removed a divider line * if there are no relationships, will not show the complete section * Connect Data will automatically show relevant tab in integrations * Update list and dropdown image urls * Remove create table button * no wrapping bind to text * minor review considerations * showing the widget name to left in sniping mode * can set data to datepicker * will not show snipe btn if there are no widgets in canvas * Changes for multiple suggested widgets * removed dependency of sniping from suggested widgets * Added analytics events for sniping mode * logic for binding data to a widget, moved to snipeable component * changed binding widget func from capture to onClick and took care of sniping from widget wrapper too. * added tests to check sniping mode for table * updated test spec * minor fix * Fix copy changes * Update test to use table widget from suggested widget list * if fails to bind will generate warning and keep user in sniping mode * in sniping mode will only show name plate if it is under focus * fixed the test case * added a comment * minor fix to capture on click event in sniping mode * updated text * Hide connections UI when there are no connections * Increase width to 90% * Show placeholder text and back button in sidepane * Show tooltip on hover * Add analyitcs events for suggested widgets and connections * Update label based on whether widgets are there or not * binding related changes * renamed the saga file containing sinping mode sagas * Changes for inspect entity * Revert "binding related changes" temporarily This reverts commit 54ae9667fecf24bc3cf9912a5356d06600b25c84. * Update suggested widgets url * Update table url * Fix chart data field not getting evaluated * a minor fix to show proper tool tip when user hovers on widget name * Show sidepane when there is output * Update locators * Use constants for messages * Update file name to ApiRightPane * Remove delay * Revert "Revert "binding related changes" temporarily" This reverts commit ee7f75e83218137250b4b9a28fcf63080c185150. * Fix width * Fix overlap Co-authored-by: Akash N <akash@codemonk.in>
2021-07-26 16:44:10 +00:00
| "SELECT_IN_CANVAS_CLICK"
| "WIDGET_SELECTED_VIA_SNIPING_MODE"
| "SUGGESTED_WIDGET_CLICK"
| "ASSOCIATED_ENTITY_CLICK"
| "CREATE_DATA_SOURCE_AUTH_API_CLICK"
| "CONNECT_DATA_CLICK"
| "RESPONSE_TAB_RUN_ACTION_CLICK"
| "ASSOCIATED_ENTITY_DROPDOWN_CLICK"
Grouping widgets into container (#5704) * Cut copy paste first cut * removed different parent groups logic * mouseup on the outer canvas removes selections. * bug fix * remove unwanted dead code. * Adding tests * build fix * min height fixes * fixing specs. * fixing specs. * fix merge conflcits * fix border positioning * fix canvas widgets incorrect bouding box * fix bounding box position issue * fix bounding box position issue * fix * border issue fix * update test case * add colors in theme * use layers + use click capture on actions * add icon for grouping * fix overflow issue in contextmenu in containers * fix context menu display issue * update position of context menu * fix container box-shadow issue * fix container box-shadow issue * revert container box shadow * stop opening of property pane on shift clicking a widget * remove console.log * fix multiselect box issue * add container on copy * add analytics middleware * refactor paste widget saga * change flash element to accept array + revert refactor * add logic to create containers from selected widgets * update positions of grouped widgets * fix comments + remove console * update flashElementbyId to flashElementsById * remove analytics middleware + remove unecessary imports * add shorcut for grouping * fix position issue when pasting * allow grouping only when multi widgets are selected * fix ux issues with widget grouping * fix help text for grouping actions * filter out the modal widget when calculting next row * fix delete issue when grouping * persist positin when grouping if there is no collision * fix typo for new position * changes for review comments * changes for review comments * fix position issue when pasting * fix new container position issue * move utils function to utils * fix import issue * fix the composite widget grouping issue * fix table name bug * remove repeated code * move copied groups existence check; * fix copied group check Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com> Co-authored-by: root <root@DESKTOP-9GENCK0.localdomain> Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local>
2021-08-25 05:00:31 +00:00
| "PAGES_LIST_LOAD"
| "WIDGET_GROUP"
| "CLOSE_GEN_PAGE_INFO_MODAL"
| "COMMENTS_TOGGLE_MODE"
| "COMMENTS_ONBOARDING_SKIP_BUTTON_CLICK"
| "COMMENTS_ONBOARDING_STEP_CHANGE"
| "COMMENTS_ONBOARDING_SUBMIT_BUTTON_CLICK"
| "COMMENTS_ONBOARDING_MODAL_DISMISSED"
| "COMMENTS_ONBOARDING_MODAL_TRIGGERED"
feat: Undo/Redo (#6654) * Scaffolding for undo-redo * undo redo working Poc commit * memory performance improvements by diffing * dont run update on undo/redo" * merging widget postion update and canvas bottom row update into one dsl update. * fix tabs widget * Visible updates per undo redo action (#6838) Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local> * resize atomic operation * fix switch control state issue * disallow undo/redo for snipping and comment mode * disallow undo/redo for snipping and comment mode * fix color picker issue in undo/redo * add test for replayDSL * option control fix, adding logs * minor position change undo redo updates * add test cases for replayHelpers * property Upade visual change * remove unused code * global hot key jest test for undo redo * Fixing batch updates on property change.. * add tests for toggle control in property pane * unwanted utils. * add tests for text control * add tests for deletion * add tests for dropping a new widget * adding jest test for replayUtils * add move widget tests * add tests for color picker control * add analytics for undo/redo * add analytics for undo/redo * tab addition atomic * cypress tests for propertyPane, toasts and radiowidget optionControl * replayDSL end of redo stack fix * property update changes * menu option control debounce input * color picker empty undo fix * fix cypress tests * widget add/remove atomic * revert alternative approach to handle atomic operations * update replayDSL test * add some comments * addressing review comments * flash color for property pane controls * Fixing adding of tabs widget as well. * code review comments. * merging widget postion update and canvas bottom row update into one dsl update. * fix ordering of tabs property control * meta property update canvas min height. * fixing failed specs. * Fixing entity explorer update on deleting tab from entity explorer. * address review comments and minor property update changes * fixing failing tests * merge conflicts * changes to cater widget api. * fix suggested widget table issue * draggable list for undo redo * fix widget name focus * excluding canvas updates. * fixing codeEditor update on propertySection collapse * fixed failing test case Co-authored-by: Abhinav Jha <abhinav@appsmith.com> Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local> Co-authored-by: root <root@DESKTOP-9GENCK0.localdomain> Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com> Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local>
2021-09-21 07:55:56 +00:00
| "REPLAY_UNDO"
| "REPLAY_REDO"
| "URL_COPIED"
| "SNIPPET_CUSTOMIZE"
| "SNIPPET_EXECUTE"
| "SNIPPET_FILTER"
| "SNIPPET_COPIED"
2021-09-30 03:31:50 +00:00
| "SNIPPET_LOOKUP"
| "SIGNPOSTING_SKIP"
| "SIGNPOSTING_CREATE_DATASOURCE_CLICK"
| "SIGNPOSTING_CREATE_QUERY_CLICK"
| "SIGNPOSTING_ADD_WIDGET_CLICK"
| "SIGNPOSTING_CONNECT_WIDGET_CLICK"
| "SIGNPOSTING_PUBLISH_CLICK"
| "SIGNPOSTING_BUILD_APP_CLICK"
| "SIGNPOSTING_WELCOME_TOUR_CLICK"
2022-04-13 10:03:23 +00:00
| "GS_BRANCH_MORE_MENU_OPEN"
| "GIT_DISCARD_WARNING"
| "GIT_DISCARD_CANCEL"
| "GIT_DISCARD"
| "GS_OPEN_BRANCH_LIST_POPUP"
| "GS_CREATE_NEW_BRANCH"
| "GS_SYNC_BRANCHES"
| "GS_CONNECT_GIT_CLICK"
| "GS_SETTING_CLICK"
| "GS_DISCONNECT_GIT_CLICK"
| "GS_COMMIT_AND_PUSH_BUTTON_CLICK"
| "GS_LAST_DEPLOYED_PREVIEW_LINK_CLICK"
| "GS_PULL_GIT_CLICK"
| "GS_DEPLOY_GIT_CLICK"
| "GS_DEPLOY_GIT_MODAL_TRIGGERED"
| "GS_MERGE_GIT_MODAL_TRIGGERED"
| "GS_REPO_LIMIT_ERROR_MODAL_TRIGGERED"
| "GS_GIT_DOCUMENTATION_LINK_CLICK"
| "GS_MERGE_CHANGES_BUTTON_CLICK"
| "GS_REPO_URL_EDIT"
| "GS_MATCHING_REPO_NAME_ON_GIT_DISCONNECT_MODAL"
| "GS_GENERATE_KEY_BUTTON_CLICK"
| "GS_COPY_SSH_KEY_BUTTON_CLICK"
| "GS_DEFAULT_CONFIGURATION_EDIT_BUTTON_CLICK"
| "GS_DEFAULT_CONFIGURATION_CHECKBOX_TOGGLED"
| "GS_CONNECT_BUTTON_ON_GIT_SYNC_MODAL_CLICK"
| "GS_IMPORT_VIA_GIT_CARD_CLICK"
feat: Reflow and Resize while Dragging and Resizing widgets. (#9054) * resize n reflow rough cut * removing warnings * relatively stable changes * minor bug fix * reflow relative collision * working dp cut * fix for reflow of widgets closer next to each other * disabling scroll * Drag with reflow * reflow fix * overlap and retracing fix * On Drop updates. * bug when no displacement but resize update. * temp fix for new widget addition. * reflow bug fixes * new widget addition bug. * stop reflow on leave. * fix corner case overlap * update bottom row when reflowed widgets go beyond bottom boundary. * capture mouse positions on enter * enable container jumps with faster mouse movements. * reflow only for snap changes. * restructured reflow Algorithm * collision check and bug fixes * undo redo fix for new widget drop * resizable fix snapRows fix * directional stability * self collision fix * first round of perf fixes * update bottom row while resizing and resize-reflowing * performance fix and overlapping fix * Remove eslint warning * remove eslint warning * eslint warning * can reflowed Drop Indication Stability * container jumps and force direction on entering canvas * fixing scroll on resize jitters. * reflow when jumping into container. * reflow ux fixes while leaving container * resizing fixes. * fixes for edge move. * restrict container jumps into reflowed containers. * container jump direction reflow * checkbox dimensions fix. * Excess bottom rows not lost post dragging or resizing widgets. * fixing the after drop css glitch. * double first move trigger bug fix. * stop reflow only if reflowing * stabilize container exit directions * using acceleration and speed instead of movement covered to restrict reflow. * fixing modal drops. * remove warnings. * reflow resize styles * moving acceleration and movement logic to a monitoring effect. * adding beta flag for reflow. * fixing jest tests * Adding analytics to beta flag toggle. * Adding placeholder for reflow beta screens. * fixing initial load's screen * few more crashes. * force close onboarding for the session. * fixing bugs in reset canvas. * Beta flag bug fixes. * fixing bugs. * restrict reflow screens during onboarding. * disabling reflow screens in tests. * code review comments. * fixing store based specs. * fixing cypress failures. * fixing specs. * code cleanup * reverting yarn lock changes * removing onboarding screens. * more cleanup and function descriptors * keeping reflow under the hood. Co-authored-by: rahulramesha <rahul@appsmith.com> Co-authored-by: Arpit Mohan <arpit@appsmith.com>
2022-01-13 13:21:57 +00:00
| "GS_CONTACT_SALES_CLICK"
| "GS_REGENERATE_SSH_KEY_CONFIRM_CLICK"
| "GS_REGENERATE_SSH_KEY_MORE_CLICK"
2022-04-13 10:03:23 +00:00
| "GS_SWITCH_BRANCH"
| "ADMIN_SETTINGS_CLICK"
| "ADMIN_SETTINGS_RESET"
| "ADMIN_SETTINGS_SAVE"
| "ADMIN_SETTINGS_ERROR"
| "ADMIN_SETTINGS_DISCONNECT_AUTH_METHOD"
| "ADMIN_SETTINGS_UPGRADE_AUTH_METHOD"
| "ADMIN_SETTINGS_EDIT_AUTH_METHOD"
| "ADMIN_SETTINGS_ENABLE_AUTH_METHOD"
| "ADMIN_SETTINGS_UPGRADE_HOOK"
| "REFLOW_BETA_FLAG"
| "CONTAINER_JUMP"
| "CONNECT_GIT_CLICK"
| "REPO_URL_EDIT"
| "GENERATE_KEY_BUTTON_CLICK"
| "COPY_SSH_KEY_BUTTON_CLICK"
| "LEARN_MORE_LINK_FOR_REMOTEURL_CLICK"
| "LEARN_MORE_LINK_FOR_SSH_CLICK"
| "DEFAULT_CONFIGURATION_EDIT_BUTTON_CLICK"
| "DEFAULT_CONFIGURATION_CHECKBOX_TOGGLED"
| "CONNECT_BUTTON_ON_GIT_SYNC_MODAL_CLICK"
feat: 9754 import work flow (#10453) * updated import application modal design as v2 * updated import flow * added title, description, uploadIcon on filepicker ads component for custom file picker * adding modal of add credential for git import * added "Git Import" modal * added generating ssh key for importing flow * fixed issue of merging * chore: fix import * chore: show old import modal based on feature flag * seperated import api from connect * added datasource list on reconnect credential modal * chore: minor changes * chore: move ssh keys to git sync reducer from applications reducer * chore: minor fixes * chore: fetch datasource config for import * for pulling * for review of displaying of datasource * added reconnect datasources after git import * fix: initialize datasource with default values * fix: initialise redux for after updating datasource with default values * fixed issue of git connection init when importing * if there is a datasource config missing in import, reconnect modal should be opened * updated logic for unconfigured datasources * commented unnecessary code * fixed issue of successful import * updated import app error logic * Add un-configured datasources to Import via file response * Add test * fix * chore: refactors * change per review * fix: reset ssh keys / url * Fix issue with newly created datasources not sent * fix * chore: minor updates * chore: minor fix * WIP * added saas and rest api datasource form * feat: fixes and updates for file import flow * chore: close on upload * Refactor logic ofr finding unconfigured datasources * fix: minor fixes * Fix issue with IsPartialImport * fix * Add PartialImport flag for ImportExport service * refactoring of datasource editor form for both of importing app and editing app * fixed collapse config * Fix tests * Handle redirection back to the /applications for oAuth type * Show reconnect button on the datasources pages if the datasource configuration is skipped * added analytic events for reconnecting datasource modal * Fix the repo limit check for git import * updated test of importing app from json as new work flow * updated exported app json while testing automatically * Add isImport flag for handling OAuth redirection in import flow * WIP * updated card UI for import from git title and message in import app modal * chore: cleanup * chore: lint * fix: add is import query param to get token for oauth * fix * When the user imports the application there should not be any uncommitted changes displayed on the commit icon * Add flag to identify OAuth redirection for git import * Update the variable name * refactoring reconnect datasource modal * close git import modal when repo limit error responded * fixed issue of restoring draft data of datasource form without save on reconnect datasource modal * chore: update query * updated query name of oauth redirection url * Fix duplicate name issue in git import * fixed rest api reconnect issue on reconnect modal * init datasources and plugins after imported app, updated reconnect modal as new design * added unconfigured datasource list logic when importing and updated rest api form delete button visible * removed put default config of datasource and fixed issue on it * Add logic to check isCOnfugred in datasource API * Expose API to get un configured datasources for git import * added fetch unconfigured datasource list api when redirecting form OAuth * Remove sensitive fields from application json during export * update put call response to check for datasourceConfig * chore: use @appsmith for constants/messages * chore: use download icon and Import for Importing application label * chore: move import application text up a bit * Fix bad merge * chore: update skip to application tooltip text * fixed tooltip content of skip to application CTA * init values of datasource when importing * updated ui of git import modal as figma design * fixing padding issue of reconnect datasource modal * fixed cursor issue on import app modal * Fix issue with datasource config * chore: make code compile * chore: sort lines * fixed save button issue of dbform on reconnecting modal * fixed style of import application modal * Fix iisue with wrong value updated to flag * reverted from reconnection form style * fix: update design as per slack discussions on 2022.02.23 * fix: move modal close button to the left * Remove check for the flag and use the one from db * Set siCOnfigured as true for mockdata sets * updated creating datasource with isConfigured as false * Fix NPE while importing * fixed scrollbar issue and text alignment on reconnect datasource modal * fixed style of form container in reconnect datasource and redirecting to app if all are configured * remove unwanted fields from application json * FIx NPE for file import * fix: move close button up in import modal * remove delete button on reconnect datasource modal * Add isConfigured false while creating datasources * fix: add a gap and update color gap between git import dialog title and subtitle update color of subtext to GREY_800 * fix: use git import feature flag * fix: do not use older modal * updated selecting logic of unconfigured datasource in reconnect modal * cleanup: auto format * cleanup: refactor react component * cleanup: refactor some more * cleanup: autoformat * Fix reconnect flag for mockdatasource * During git import set the isConfigured to false for datasources * Remove decrypted field from the applicationJson file * Remove decrypted field from the applicationJson file * Add app slug to remote repo * fixed cypress test related with git * updated json while testing * Changes per review * Update the method name * fixed cypress test related with git * fixed migration cypress test * set is configured field as true on tour app * Fix issue with datasource creation for welcome tour * fixed issue of replay_editor cypress test Co-authored-by: Rishabh Saxena <rishabh@appsmith.com> Co-authored-by: Anagh Hegde <anagh@appsmith.com> Co-authored-by: Anubhav <anubhav@appsmith.com> Co-authored-by: f0c1s <iamanubhavsaini+git@gmail.com>
2022-03-17 10:28:54 +00:00
| "DATASOURCE_AUTH_COMPLETE"
feat: App Theming (#9714) * fix style bugs * fix select styles * test: fix font size issue for cypress tests * incorporate ashit feedback * test: addresed review comments for cypress tests * add analytics events * height issue in view mode * incorporate code review feedbacks * incorporate code review feedbacks * refactor: addressed review comments; removed border radius and box shadow for text widget; Updated migrations * feat: Makes shadow and radius controls keyboard accessible (#11547) * makes shadow and radius controls keyboard accessible * removes unused imports * moves options out of render method * fix: changed the misnomer background property name to the relevant property name * fix: border radius issue for the map widget * address qa bugs * address qa bugs * fix ux of theming pane when widget is selected * fix: * added backgroundColor to the video widget * restricted pop-over border radius to 0.375rem * added box shadow for the input group for select widget * fix: added delete icon in the delete theme modal * address qa bugs * change checkbox column size in config * add js convertible to button color * remove unused imports * test: fixed jest tests * fix primary color typo * fix: migrations for the theming * fix: * Removed background color from MultiTreeSelect and TreeSelect component. * grouped button's menu button pop over border radius restricting to 0.375rem. * test: updated Dsl migration UT * address qa bugs * address qa bugs * fix: address qa comments * address qa bugs * fix: * migration issue; * unit test cases; * fix rating widget scroll issue * fix youtube video border radius bug * fix select widget * fix select widgets styles * address qa bugs * merge conflicts * makes the reset button keyboard accessible (#12134) * -resolved merge conflicts * address qa bugs * fix: labelTextSize migration fixes * refactor: * made changes to the fontSizeUtils function * fixed the issue related to unit tests * fix button group widget * remove unused imports * fix: fixed the text size migration for the table widget * refactor: addressed review comments for the table widget theming migration * fix button group widget * add init calls for view mode * json form init theme changes * fix: added migration for boxShadow, borderRadius and textSizes for table widget * fix broken fields * test: fixed unit tests * wip * inconsistancy fixes and schemaItem update in updateHook/fieldConfiguration * feat: init json form migration theming * json form primaryColor -> accentColor * update table widget * update table widget * object field label styling * fix: migration related to the JSON form * fix: fixed labelTextSize migration for JSON form nested widgets * property control nested stylesheet lookup * JSONForm label styles form array items * show label for checkbox field array item * fix button group widget * wip * refactor: addressed table widget review comments * refactor: addressed ashit review comments; * added childStylesheet for widgets * feat: Keyboard navigable Color Picker control (#11797) * Makes ColorPicker keyboard accessible * seperate out keyboard and mouse interactions * fix issue with not focusing back to input * Adds test for Color picker * chore: added comment for the boxShadow property * fix: * added unit test cases for the widget and property utils * resolved warning messages * wip * theme config update * fix merge conflicts * refactor: moved theming migration inside the migrations folder * fix qa bugs * fix jest test * fix: unit test cases * fix table column creation logic * refactor: addressed review comments for migrations * fix: Overriding margin and padding for custom render in the dropdown component (#12875) * * fix for custom render padding and margin in ADS dropdown * * fix for removing padding from normal render options * refactor: moved the boxShadow condition to the variable * fix qa bugs * fix: migration QA callouts for audio recorder widget * refactor: added updated comments for boxShadow migration for table widget * fix theme binfings for JSONForm fields under Object * fix table widget theming bug * fix: addressed code review comments * fix: unit test cases * fix: qa migration callouts * fix table widget theming bug * fix JSONForm currency input dropdown not submit form * Added new tests - AppThemingSpec * fix qa bugs * fix unit test * fix JSONForm cellBorderWidth to have default value post migration * fix unit test * fix qa bugs * remove unused imports * fix qa bugs * fix JSONForm input height issue * fix qa bugs * Updating Theming spec * * dropdown color fixes (#13249) * fix caching issue ; * Fixed Theming tests * fix tests * fix tab widget tests * fix: json form children level migration issue * fix table widget tests * Updated test * updated tests * updated test * updated tests * updated tests * updated pageload * fix cypress tests * remove cypress created files * fix color picker issues * Failure fixes * Fixed some more tests * fix: cypress test failures * fix tests * remove consoles * fix table tests * fix qa bugs * updating snapshots for AppPageLayout_spec as per new UI * fix rating widget bug * fix qa bugs * fix: * cypress failing tests * Migration QA callouts * Removed unused imports * update constract check algo * fix color contrast issue * fix: cypress failure test cases * update font sizes labels * fix regression bugs * fix: * JSON form labelTextSize issue fix * Updated comment for the fontSizeUtility function * migrations issues related to table widget borderRadius and boxShadow * fix: default labelTextSize issue for the Input and Select families * fix regression bugs * fix regression bugs * PassingParams spec - added wait time * fix: font family default value issue on JS toggle * fix js toggle issue in text widget * fix tests * fix tests * fix tests * fix cypress tests * fix regression bugs * fix regression bugs * fix: * refactored table widget migration function as per review comments, * added default value to the widget * fix: failing unit test cases * fix theming spec * fix cypress tests * test: fixed failed cypress test * incorporate ashit feedback * fix cypress tests * fix: addressed review comments * comment out table cypress test * fix merge conflicts * comment out color picker tests Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local> Co-authored-by: keyurparalkar <keyur@appsmith.com> Co-authored-by: Aswath K <aswath@appsmith.com> Co-authored-by: Nayan <nayan@appsmith.com> Co-authored-by: Ashit Rath <ashit@appsmith.com> Co-authored-by: balajisoundar <balaji@appsmith.com> Co-authored-by: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com> Co-authored-by: Aishwarya UR <aishwarya@appsmith.com> Co-authored-by: apple <nandan@thinkify.io> Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
2022-05-04 09:45:57 +00:00
| "APP_THEMING_CHOOSE_THEME"
| "APP_THEMING_APPLY_THEME"
| "APP_THEMING_CUSTOMIZE_THEME"
| "APP_THEMING_SAVE_THEME_START"
| "APP_THEMING_SAVE_THEME_SUCCESS"
| "APP_THEMING_DELETE_THEME"
feat: 9754 import work flow (#10453) * updated import application modal design as v2 * updated import flow * added title, description, uploadIcon on filepicker ads component for custom file picker * adding modal of add credential for git import * added "Git Import" modal * added generating ssh key for importing flow * fixed issue of merging * chore: fix import * chore: show old import modal based on feature flag * seperated import api from connect * added datasource list on reconnect credential modal * chore: minor changes * chore: move ssh keys to git sync reducer from applications reducer * chore: minor fixes * chore: fetch datasource config for import * for pulling * for review of displaying of datasource * added reconnect datasources after git import * fix: initialize datasource with default values * fix: initialise redux for after updating datasource with default values * fixed issue of git connection init when importing * if there is a datasource config missing in import, reconnect modal should be opened * updated logic for unconfigured datasources * commented unnecessary code * fixed issue of successful import * updated import app error logic * Add un-configured datasources to Import via file response * Add test * fix * chore: refactors * change per review * fix: reset ssh keys / url * Fix issue with newly created datasources not sent * fix * chore: minor updates * chore: minor fix * WIP * added saas and rest api datasource form * feat: fixes and updates for file import flow * chore: close on upload * Refactor logic ofr finding unconfigured datasources * fix: minor fixes * Fix issue with IsPartialImport * fix * Add PartialImport flag for ImportExport service * refactoring of datasource editor form for both of importing app and editing app * fixed collapse config * Fix tests * Handle redirection back to the /applications for oAuth type * Show reconnect button on the datasources pages if the datasource configuration is skipped * added analytic events for reconnecting datasource modal * Fix the repo limit check for git import * updated test of importing app from json as new work flow * updated exported app json while testing automatically * Add isImport flag for handling OAuth redirection in import flow * WIP * updated card UI for import from git title and message in import app modal * chore: cleanup * chore: lint * fix: add is import query param to get token for oauth * fix * When the user imports the application there should not be any uncommitted changes displayed on the commit icon * Add flag to identify OAuth redirection for git import * Update the variable name * refactoring reconnect datasource modal * close git import modal when repo limit error responded * fixed issue of restoring draft data of datasource form without save on reconnect datasource modal * chore: update query * updated query name of oauth redirection url * Fix duplicate name issue in git import * fixed rest api reconnect issue on reconnect modal * init datasources and plugins after imported app, updated reconnect modal as new design * added unconfigured datasource list logic when importing and updated rest api form delete button visible * removed put default config of datasource and fixed issue on it * Add logic to check isCOnfugred in datasource API * Expose API to get un configured datasources for git import * added fetch unconfigured datasource list api when redirecting form OAuth * Remove sensitive fields from application json during export * update put call response to check for datasourceConfig * chore: use @appsmith for constants/messages * chore: use download icon and Import for Importing application label * chore: move import application text up a bit * Fix bad merge * chore: update skip to application tooltip text * fixed tooltip content of skip to application CTA * init values of datasource when importing * updated ui of git import modal as figma design * fixing padding issue of reconnect datasource modal * fixed cursor issue on import app modal * Fix issue with datasource config * chore: make code compile * chore: sort lines * fixed save button issue of dbform on reconnecting modal * fixed style of import application modal * Fix iisue with wrong value updated to flag * reverted from reconnection form style * fix: update design as per slack discussions on 2022.02.23 * fix: move modal close button to the left * Remove check for the flag and use the one from db * Set siCOnfigured as true for mockdata sets * updated creating datasource with isConfigured as false * Fix NPE while importing * fixed scrollbar issue and text alignment on reconnect datasource modal * fixed style of form container in reconnect datasource and redirecting to app if all are configured * remove unwanted fields from application json * FIx NPE for file import * fix: move close button up in import modal * remove delete button on reconnect datasource modal * Add isConfigured false while creating datasources * fix: add a gap and update color gap between git import dialog title and subtitle update color of subtext to GREY_800 * fix: use git import feature flag * fix: do not use older modal * updated selecting logic of unconfigured datasource in reconnect modal * cleanup: auto format * cleanup: refactor react component * cleanup: refactor some more * cleanup: autoformat * Fix reconnect flag for mockdatasource * During git import set the isConfigured to false for datasources * Remove decrypted field from the applicationJson file * Remove decrypted field from the applicationJson file * Add app slug to remote repo * fixed cypress test related with git * updated json while testing * Changes per review * Update the method name * fixed cypress test related with git * fixed migration cypress test * set is configured field as true on tour app * Fix issue with datasource creation for welcome tour * fixed issue of replay_editor cypress test Co-authored-by: Rishabh Saxena <rishabh@appsmith.com> Co-authored-by: Anagh Hegde <anagh@appsmith.com> Co-authored-by: Anubhav <anubhav@appsmith.com> Co-authored-by: f0c1s <iamanubhavsaini+git@gmail.com>
2022-03-17 10:28:54 +00:00
| "RECONNECTING_DATASOURCE_ITEM_CLICK"
| "ADD_MISSING_DATASOURCE_LINK_CLICK"
2022-03-31 05:16:04 +00:00
| "RECONNECTING_SKIP_TO_APPLICATION_BUTTON_CLICK"
| "TEMPLATE_FILTER_SELECTED"
| "MANUAL_UPGRADE_CLICK"
| "PAGE_NOT_FOUND"
| "SIMILAR_TEMPLATE_CLICK"
| "PROPERTY_PANE_KEYPRESS"
| "PAGE_NAME_CLICK"
| "BACK_BUTTON_CLICK"
| "WIDGET_TAB_CLICK"
| "ENTITY_EXPLORER_CLICK"
| "ADMIN_SETTINGS_UPGRADE_WATERMARK"
| "ADMIN_SETTINGS_UPGRADE"
| "PRETTIFY_CODE_MANUAL_TRIGGER"
| "PRETTIFY_CODE_KEYBOARD_SHORTCUT"
| "JS_OBJECT_CREATED"
| "JS_OBJECT_FUNCTION_ADDED"
| "JS_OBJECT_FUNCTION_RUN"
| "JS_OBJECT_SETTINGS_CHANGED"
| "SHOW_BINDINGS_TRIGGERED"
2022-09-29 09:19:29 +00:00
| "BINDING_COPIED"
feat: Automatic height updates for widgets based on contents (Auto Height) (#18341) * added multi select back * (WIP): Complete the dynamc height update logic * (WIP): Dynamic height logic * (WIP): Container computation logic, Next steps: Prevent reflow when resize is disabled. Fix logic of widgets randomly changing positions (Debug) * Fix logic in container computations * Integrate for PoC * fixed the no initial load dynamic height updates * Stop vertical resize and reflow when dynamic height is enabled for a widget * added another container in text widget * enabled dynamic height for container widgets * removed dynamic height feature from list widget * Fixed Button and Input components height increase * added an experiment to overflow the content if maxHEight is less * removed the ref of Textwidget by mistake, added it back * fixed text widget height overflow problem with a little hack * added long labels with text * fixed the table scroll issue * overflow fixed for json form widget * added extra 8px height for Switch, Rating and Checkbox Height * (WIP): Resolve issues * (WIP): Fix widget padding issue * added overflow container for Radio and Switch group widgets * (WIP): Have modals work with dynamic height * added the overlay and the handles * added dragging behavior to the dots * fixed the overlapping with the selection tool * (WIP): Fix issues reported * now we can update the property pane values back from overlay handles * now we can update the property pane values back from overlay handles * (WIP): Fix table widget * Fix package.json * Remove unit tests temporarily * Fix unit test * (WIP): Fix modal resize. Fix cursors. Fix border issue on non-resizable widgets * fetch component heights using the requestAnimationFrame callback * behavioural changes * (WIP): Fix issues on the platform * Update main container size appropriately * more behavioural changes * overlay now only be visible when hovering over the dots * grid showing and widget reselecting * added onfocus and onblur events to property pane listeners * added onfocus and onblur events to property pane listeners * added a range slider for min and max * added demarcations for slider values * (WIP): Fix platform workflows for dynamic height * Fix issues with widgets * Fix removed import * - Add missing cypress files * set the limits * limit increase on change * Fix z-index of min max limit indicators. Fix unused-vars warnings * Fix Table Widget and Text Widget issues * Fix: all the bugs in the bug master list for DH (#16268) * changed the zindex for the signifiers * showing signifiers only when the widget is selected * made changes suggested by Momcilo * activate the dots when the fields are active * created a new centered dot handle * removed overlays on focus and made the border more like deisgn * handles on top of other widgets * hide the overlay when multiple widgets are selected * added a white border * added a white border * bug #15509 resolved * changed the minDynamicHeightLimit to 2 instead of 4 to fix the Bug #15527 * removed the height auto fix from BaseInputComponent to fix the Bug #15388 * removed the condition to not ccalculate dynamic height when the row difference is less than 2 to fix the bug 15353 * made fixes for the bug #16307 * made fixes for the bug #16308 * made fixes for bug 16310 * made fixes for the bug #16402 * removed some log statements * made fixes for the bug #16407 * fixed label problem found in the issue #16543 * made fixes for the issue #16547 * made fixes for the bug #16492 * redeploy * (WIP): Fix to make this branch functional * imported LabelWithTooltip back from design system * signifier is now centered * filled the signifier with primary color * overlay hidden while dragging * made the signifier dashed border also draggable * Fix issue #16590 (#16798) * set the limits to 4 rows * replaced the static 40 value * added signifiers for modal widget * added signifiers for modal widget * tried solving the scroll issue for widgets when there are limits * solved the height problem using ResizeObserver * (WIP): Fix maxDynamicHeight issue with container widgets: * made the changes as per the review * fixed the issue for input widget when label gets out of border * hide text widget overflow options if auto height is enabled * (WIP): In view mode, invisible widgets now donot take space (#16920) * (WIP): In view mode, invisible widgets now donot take space * (WIP): Enable the feature where invisible widgets in view mode don't take space to all widgets irrespective of the dynamic height feature * Remove Replay conditional * removed the scroll container for container type widgets * removed the scroll container for container type widgets * updated the hook to set overflow none for text widget * fixed the should dynamic height logic to respect the min height limit * Modal widget adheres to dynamic height (#16995) * Modal widget adheres to dynamic height * WIP: POC: fix dynamic height issues (#16996) Fix height less than 4 issue. Fix JSONForm adherence to min and max height * POC: Dynamic height undo redo issue (#17085) * Revert debouce timeout * (WIP): Fix issue with undo-redo in dynamic height * fix: Dynamic height issue fixes (#17153) * Dynamic height issue fixes == - Fix issue where nested widgets did not ensure parent dynamic height updates - Fix issue where Modal widget updates came in subsequent renders - Fix issue where JSONForm collapses - Fix performance issue for independent updates * Use functions to get min and max dynamic height * Fix issue where variable might have been undefined * added the dynamic container into the deploy mode as well * added overflow-x hidden when overflow-y is active in the dynamic height container * fix: Dynamic height Issue fixes (#17204) Fix preview mode invisible widgets. Fix Tabs widget dynamic height. * removed a console.log statement * removed the slider control file * imported the LabelWithTooltip from the repo rather than ds * word-break CSS rules added for Switch and Checkbox widget when Dynamic Height is enabled * abstracted the check for dynamic height with limits enabled as isDynamicHeightWithLimitsEnabledForWidget * abstracted the static value of 10 in dynamic height overlay to GridDefaults * abstracted min and max dynamic height limits to getters * fix: replaced all the refs for simpler widgets (#17353) * replaced all the refs for simpler widgets * removed the updateDynamicHeight from componentDidUpdate in BaseWidget * added back lifecycle methods back to BaseWidget * removed the contentRef from SwitchGroup and Table * updating the height from the auto height with limits as well * some hacks to make the limits work * working solution * used setTimeout to send an update to updateDynamicHeight from overlay update * removed a log * added requestanimationframe in settimeout Co-authored-by: Ankur Singhal <ankursinghal@Ankurs-MacBook-Pro-2.local> Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * Fix issues caused during merge * Remove unneeded derived property * removed more unnecessary code which should have been removed after removing the ref dependency * fixed the maxDynamicHeight issue * Fix issue where property configs were not being sent * fix: Auto Height Feature - add selectors for tests (#17687) Add selectors for auto height cypress tests * fix: removed height auto default theme (#17415) removed height auto css rule from the default theme Co-authored-by: Ankur Singhal <ankursinghal@Ankurs-MacBook-Pro-2.local> * fix: Auto Height Feature - Resolve issues and restructure code (#17686) * Fix issues in dynamic height. Restructure code and reduce abstraction leaks * Fix typescript issues * Update based on review comments. Comment migrations, as a cyclic import is causing the jest tests to fail. * Remove unused imports * Decrease code nesting * added the base styles for the overlay like position and z-index in its styled component css * used the isDynamicHeightEnabled prop to set the height of SwitchGroup and RadioGroup widgets from 32px to 100% in case of inline mode * fix: Auto Height - Resolve issues (#17737) * Fix Tabs Widget showTabs toggle based auto height. Revert removal of BaseWidget code. Remove box-intersect and use a bruteforce algorithm. Add base logic for having containers collapse due to hidden child widgets * Hide scroll contents and overflow property pane controls when dynamic height is enabled * Removed the class property expectedHeight from BaseWidget as it is not useful in the overlay logic after some changes * fixed the left alignment issue of label in the rich text editor by adding some styles applied only when the dynamic height is enabled * fixed the input field stretching issue in case of Dynamic height by adding some CSS styles when isDynamicHeight is true * Fix failing modal widget cypress tests * Fix issue with scrollContents and Tabs Widget defaulTab * added a little bit padding of 4px to the right of scroll container of dynamic height with limit * Add test locators for resize handles * removed the dynamic height logic from the table widget * fix: Auto-Height invisible widgets (#17849) * Fix issue where invisible widgets were still taking space * Make sure to collapse only if dynamic height is enabled * Fix issues with reflow (not the invisible widgets) * Fix container min height issues * Fix reflow with original bottom and top values. Testing needed * Fix invisible widgets * fix: enabled dynamic height for stat box widget (#17971) enabled dynamic height for stat box widget Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * fix: added a min height to rich text editor so that it does not collapse (#17970) added a min height to rich text editor so that it does not collapse Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * Fix issue with resizing auto height widget * Add helper text to educate users regarding the scroll disconnect in WYSIWYG * fix: Auto Height Fixes (#18111) AUTO HEIGHT FIXES - Fix JSONForm height discrepancy - Fix issue where widgets moved below the other - Fix droptarget height after parent container resize * fix: sliced up the DynamicHeightOverlay component a little bit (#18100) * sliced up the DynamicHeightOverlay component a little bit * more refactoring * more refactoring * used release event emitter and refactored more Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * fix: rich text editor center alignment issue (#18142) * removed the center alignment from rich text editor * dummy commit Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * fix: old DSL container collapse (#18160) * Fix issue where old containers from old DSLs used to collapse when auto height was enabled * Fix issue where old containers don't allow new widgets to be added when auto height is enabled, this is because the shouldScrollContents is undefined * fix: input widgets issue (#18172) fixed the auto height not working issue Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * fix: preview deploy mode (#18174) fixed the preview and deploy mode Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * fix: auto height limits label intersection with handle dot (#18186) fixed the position of the limits label to the right so that it will not intersect with the handle dot Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * fix: auto height limits rich text editor min height (#18187) decrease the min height of the RTE so that it does not have the boundary issue with the max limit when auto height with limits is enabled Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * fix: grammatical error in the help text (#18188) changed react to reacts in the helpText of the dynamic height property in the proeprty pane Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * fix: auto height tabs double scroll (#18210) solved the issue by disabling the scroll for the child canvas widget in the tabs widget Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * fix: auto height limits resizing (#18213) * fixed the auto height limits resizing issue * made the auto height overlay independent of isResizing and used its own property to show the grid * some more refactoring Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * dummy commit * fix: old apps container issue (#18255) filtered out the widgets which are detached from layout Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * fix: fixing auto height in childless containers. (#18263) fixing auto height in childless containers. * task: Dynamic height reflow fixes in Branch (#18244) dynamic height reflow fixes * fix: compact label issue and min and max limits numeric input (#18282) fixed compact label issue and turned min and max limits to numeric input Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * fix: LabelWithTooltip help icon fix * fix: NaN and min limit for min and max (#18284) * fixed compact label issue and turned min and max limits to numeric input * fixed NaN and set min to be 4 Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * fix: validation issues for min max (#18286) * fixed compact label issue and turned min and max limits to numeric input * fixed NaN and set min to be 4 * validations start working min max Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * added a full stop to container scroll helper text * validations start working min max * dummy commit * feat: stop resizing auto height widgets vertically because of Drag n Drop Reflow (#18267) * reflow fixes * stop resizing auto height widgets vertically because of Drag n Drop Reflow * feat: Analytics for Dynamic height (#18279) * Fix canvas min height issue and invisible widgets issue and remove logs and fix issue where widgets overlapped when coming back from preview mode to edit mode * Fix issue with containers not respecting auto height and decreasing height * Fix issue with modal widget not hugging contents, and container widgets never become visible after going invisible * Fix issue where existing containers don't have correct min height for child canvas * fix: canvasLevelsReducers test (#18301) fixed the canvasLevelsReducers test Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * fix: removed auto height min max config from widget features (#18316) removed auto height min max config from widget features Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * fix: Fixing Modal Height updates (#18317) Fixing Modal Height updates * fix: text widget background auto height (#18319) added background color of Text widget back to the auto height container Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * test: cypress tests for auto height (#17676) * Added tests for dynamic height * updated tests for another usecase * moved locators into commonfile * updated common method * added tests for some more widgets * Added tests for jsonForm / Form widget * Updated the test * updated test for multiple text widgets * updated test with few more usecases * updated the dsl * updated tests for text change * updated tests based on new changes * updated cypress test fixes * fix: auto height container merge poc wrt release (#18334) updated the poc wrt PR already merged in the release regarding the auto height container Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * fix: renamed auto height overlay components and added some tests (#18333) * renamed auto height overlay components and added some tests * replaced the 10 value with GridDefaults * avoiding event to reach drop target Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * updated tests * Merge all code into one branch * Fix failing AutoHeightcontainer test * fix: Fix reflow computations which were causing widget overlap (#18300) * Fix reflow computations which were causing widget overlap * Fix issues with parent container height and overlapping widgets * Remove console logs * Revert comment * Fix issues related to reflow of containers * feat: Making getEffectedBoxes a Recursive function in autoHeight Reflow (#18336) Making getEffectedBoxes a Recursive function in autoHeight Reflow * Return null for invisible widgets from withWidgetProps * Remove duplicate import Co-authored-by: rahulramesha <71900764+rahulramesha@users.noreply.github.com> * Remove missed console log * fix: Label position gets deselected on selecting already selected option (#18298) * fix: Label position gets deselected on selecting the already selected value * Added migration for Currency & Phone input widgets * simplify migration function using a utility * combine conditions * Increments LATEST_PAGE_VERSION * Update DynamicHeight_Visibility_spec.js updated a check wrt auto height * Handling Modals for canvas size calculations * fix: migrate label position test failing issue (#18365) fixed migrate label postition test failing issue Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * removed the two unwanted imports from DSLMigrations to fix client build * fix: Auto height zero and limits issue (#18366) fixed the auto height zero and limits issue Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> * fix: Auto height regression issues (#18367) * Fix auto height regression issues #18367 * feat: auto height migrations (#18368) Add auto height migrations * Increase file caching size * Use manual array for list of auto height enabled widgets * Fix cypress test dsl versions * Revert changes to shouldUpdateHeightDynamically * Update test results based on code changes * Marginally increase the workbox file size cache * review comment incorporated for test spec * Update container auto height property on drop * added small wait for validation Co-authored-by: Ankur Singhal <ankur@appsmith.com> Co-authored-by: rahulramesha <rahul@appsmith.com> Co-authored-by: Abhinav Jha <zatanna@Abhinavs-iMac.lan> Co-authored-by: Ankur Singhal <ankursinghal@Ankurs-MacBook-Pro-2.local> Co-authored-by: Ankur Singhal <ankurrsinghal@gmail.com> Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com> Co-authored-by: rahulramesha <71900764+rahulramesha@users.noreply.github.com> Co-authored-by: Albin <albin@appsmith.com> Co-authored-by: Aswath K <aswath.sana@gmail.com> Co-authored-by: NandanAnantharamu <67676905+NandanAnantharamu@users.noreply.github.com> Co-authored-by: Apple <nandan@thinkify.io>
2022-11-23 09:48:23 +00:00
| "AUTO_HEIGHT_OVERLAY_HANDLES_UPDATE"
| "ENTITY_EXPLORER_ADD_PAGE_CLICK"
| "CANVAS_BLANK_PAGE_CTA_CLICK"
| AUDIT_LOGS_EVENT_NAMES
| GAC_EVENT_NAMES
| "BRANDING_UPGRADE_CLICK"
| "BRANDING_PROPERTY_UPDATE"
| "BRANDING_SUBMIT_CLICK"
2022-12-11 14:42:32 +00:00
| "Cmd+Click Navigation"
| "WIDGET_PROPERTY_SEARCH"
| LIBRARY_EVENTS;
export type LIBRARY_EVENTS =
| "INSTALL_LIBRARY"
| "DEFINITIONS_GENERATION"
| "UNINSTALL_LIBRARY"
| "EDIT_LIBRARY_URL";
2022-09-29 09:19:29 +00:00
export type AUDIT_LOGS_EVENT_NAMES =
| "AUDIT_LOGS_CLEAR_FILTERS"
| "AUDIT_LOGS_FILTER_BY_RESOURCE_ID"
| "AUDIT_LOGS_FILTER_BY_EMAIL"
| "AUDIT_LOGS_FILTER_BY_EVENT"
| "AUDIT_LOGS_FILTER_BY_DATE"
| "AUDIT_LOGS_COLLAPSIBLE_ROW_OPENED"
| "AUDIT_LOGS_COLLAPSIBLE_ROW_CLOSED";
2020-03-03 07:02:53 +00:00
export type GAC_EVENT_NAMES =
| "GAC_USER_CLICK"
| "GAC_USER_ROLE_UPDATE"
| "GAC_USER_GROUP_UPDATE"
| "GAC_GROUP_ROLE_UPDATE"
| "GAC_INVITE_USER_CLICK"
| "GAC_ADD_USER_CLICK";
function getApplicationId(location: Location) {
const pathSplit = location.pathname.split("/");
const applicationsIndex = pathSplit.findIndex(
2020-12-24 04:32:25 +00:00
(path) => path === "applications",
);
const appId = pathSplit[applicationsIndex + 1];
return appId;
}
2019-08-30 11:23:42 +00:00
class AnalyticsUtil {
2020-11-06 06:27:36 +00:00
static cachedAnonymoustId: string;
static cachedUserId: string;
static user?: User = undefined;
chore: Use rolling window in the usage pulse call and send segment anonymous id for anonymous users (#19552) ## Description We have updated the user tracking to use a rolling window. Now the session starts when the user goes to the builder or viewer for the first time and the subsequent activity tracking will be checked only after an hour. For anonymous users, we send the Segment anonymous id in the usage calls. When the telemetry is off, we still initiate the segment, get the id and then purge the analytics global object. Fixed window (in release, as of now)- if the user starts a session at 01:15 pm, we take 01:00 pm as the session start time and we will check for the next user activity at 2:00 pm. rolling window (in this PR) - if the user starts a session at 01:15 pm, we take 01:15 pm as the session start time and we will check for the next user activity at 2:15 pm. Fixes https://github.com/appsmithorg/cloud-services/issues/183 ## Type of change - New feature (non-breaking change which adds functionality) ## How Has This Been Tested? - Manual ### Test Plan ### 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: - [ ] Test plan has been approved by relevant developers - [ ] 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
2023-01-10 12:09:33 +00:00
static blockTrackEvent: boolean | undefined;
static initializeSmartLook(id: string) {
smartlookClient.init(id);
2019-09-09 09:08:54 +00:00
}
2019-08-30 11:23:42 +00:00
chore: Use rolling window in the usage pulse call and send segment anonymous id for anonymous users (#19552) ## Description We have updated the user tracking to use a rolling window. Now the session starts when the user goes to the builder or viewer for the first time and the subsequent activity tracking will be checked only after an hour. For anonymous users, we send the Segment anonymous id in the usage calls. When the telemetry is off, we still initiate the segment, get the id and then purge the analytics global object. Fixed window (in release, as of now)- if the user starts a session at 01:15 pm, we take 01:00 pm as the session start time and we will check for the next user activity at 2:00 pm. rolling window (in this PR) - if the user starts a session at 01:15 pm, we take 01:15 pm as the session start time and we will check for the next user activity at 2:15 pm. Fixes https://github.com/appsmithorg/cloud-services/issues/183 ## Type of change - New feature (non-breaking change which adds functionality) ## How Has This Been Tested? - Manual ### Test Plan ### 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: - [ ] Test plan has been approved by relevant developers - [ ] 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
2023-01-10 12:09:33 +00:00
static initializeSegmentWithoutTracking(key: string) {
AnalyticsUtil.blockTrackEvent = true;
return AnalyticsUtil.initializeSegment(key);
}
static initializeSegment(key: string) {
const initPromise = new Promise<boolean>((resolve) => {
(function init(window: any) {
const analytics = (window.analytics = window.analytics || []);
if (!analytics.initialize) {
if (analytics.invoked) {
log.error("Segment snippet included twice.");
} else {
analytics.invoked = !0;
analytics.methods = [
"trackSubmit",
"trackClick",
"trackLink",
"trackForm",
"pageview",
"identify",
"reset",
"group",
"track",
"ready",
"alias",
"debug",
"page",
"once",
"off",
"on",
];
analytics.factory = function(t: any) {
return function() {
const e = Array.prototype.slice.call(arguments); //eslint-disable-line prefer-rest-params
e.unshift(t);
analytics.push(e);
return analytics;
};
2019-09-09 09:08:54 +00:00
};
}
for (let t: any = 0; t < analytics.methods.length; t++) {
const e = analytics.methods[t];
analytics[e] = analytics.factory(e);
}
analytics.load = function(t: any, e: any) {
const n = document.createElement("script");
n.type = "text/javascript";
n.async = !0;
// Ref: https://www.notion.so/appsmith/530051a2083040b5bcec15a46121aea3
n.src = "https://a.appsmith.com/reroute/" + t + "/main.js";
const a: any = document.getElementsByTagName("script")[0];
a.parentNode.insertBefore(n, a);
analytics._loadOptions = e;
2019-09-09 09:08:54 +00:00
};
analytics.ready(() => {
resolve(true);
});
setTimeout(() => {
resolve(false);
}, 2000);
analytics.SNIPPET_VERSION = "4.1.0";
analytics.load(key);
analytics.page();
2019-09-09 09:08:54 +00:00
}
})(window);
});
return initPromise;
2019-09-09 09:08:54 +00:00
}
2019-08-30 11:23:42 +00:00
2020-10-07 11:19:56 +00:00
static logEvent(eventName: EventName, eventData: any = {}) {
chore: Use rolling window in the usage pulse call and send segment anonymous id for anonymous users (#19552) ## Description We have updated the user tracking to use a rolling window. Now the session starts when the user goes to the builder or viewer for the first time and the subsequent activity tracking will be checked only after an hour. For anonymous users, we send the Segment anonymous id in the usage calls. When the telemetry is off, we still initiate the segment, get the id and then purge the analytics global object. Fixed window (in release, as of now)- if the user starts a session at 01:15 pm, we take 01:00 pm as the session start time and we will check for the next user activity at 2:00 pm. rolling window (in this PR) - if the user starts a session at 01:15 pm, we take 01:15 pm as the session start time and we will check for the next user activity at 2:15 pm. Fixes https://github.com/appsmithorg/cloud-services/issues/183 ## Type of change - New feature (non-breaking change which adds functionality) ## How Has This Been Tested? - Manual ### Test Plan ### 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: - [ ] Test plan has been approved by relevant developers - [ ] 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
2023-01-10 12:09:33 +00:00
if (AnalyticsUtil.blockTrackEvent) {
return;
}
2019-09-09 09:08:54 +00:00
const windowDoc: any = window;
2020-03-06 04:59:24 +00:00
let finalEventData = eventData;
const userData = AnalyticsUtil.user;
const appId = getApplicationId(windowDoc.location);
2020-03-06 04:59:24 +00:00
if (userData) {
const { segment } = getAppsmithConfigs();
let user: any = {};
if (segment.apiKey) {
user = {
userId: userData.username,
email: userData.email,
appId: appId,
2020-11-23 13:17:12 +00:00
source: "cloud",
};
} else {
const userId = userData.username;
if (userId !== AnalyticsUtil.cachedUserId) {
AnalyticsUtil.cachedAnonymoustId = sha256(userId);
AnalyticsUtil.cachedUserId = userId;
}
user = {
userId: AnalyticsUtil.cachedAnonymoustId,
source: "ce",
};
}
2020-03-06 04:59:24 +00:00
finalEventData = {
...eventData,
userData: user.userId === ANONYMOUS_USERNAME ? undefined : user,
2020-03-06 04:59:24 +00:00
};
}
2020-12-30 07:31:20 +00:00
if (windowDoc.analytics) {
2020-11-05 16:51:22 +00:00
log.debug("Event fired", eventName, finalEventData);
2020-03-06 04:59:24 +00:00
windowDoc.analytics.track(eventName, finalEventData);
2021-04-27 12:53:08 +00:00
} else {
log.debug("Event fired locally", eventName, finalEventData);
2020-03-03 07:02:53 +00:00
}
2019-09-09 09:08:54 +00:00
}
2019-08-30 11:23:42 +00:00
static identifyUser(userData: User) {
const { segment, sentry, smartLook } = getAppsmithConfigs();
2019-09-09 09:08:54 +00:00
const windowDoc: any = window;
2020-11-06 06:27:36 +00:00
const userId = userData.username;
2020-03-03 07:02:53 +00:00
if (windowDoc.analytics) {
// This flag is only set on Appsmith Cloud. In this case, we get more detailed analytics of the user
2020-11-05 06:11:29 +00:00
if (segment.apiKey) {
const userProperties = {
email: userData.email,
name: userData.name,
userId: userId,
2020-11-23 13:17:12 +00:00
source: "cloud",
};
AnalyticsUtil.user = userData;
2020-11-05 16:51:22 +00:00
log.debug("Identify User " + userId);
windowDoc.analytics.identify(userId, userProperties);
2020-11-05 16:51:22 +00:00
} else if (segment.ceKey) {
// This is a self-hosted instance. Only send data if the analytics are NOT disabled by the user
// This is done by setting environment variable APPSMITH_DISABLE_TELEMETRY in the docker.env file
2020-11-06 06:27:36 +00:00
if (userId !== AnalyticsUtil.cachedUserId) {
AnalyticsUtil.cachedAnonymoustId = sha256(userId);
AnalyticsUtil.cachedUserId = userId;
}
2020-11-23 13:17:12 +00:00
const userProperties = {
userId: AnalyticsUtil.cachedAnonymoustId,
2020-11-23 13:17:12 +00:00
source: "ce",
};
2020-11-06 06:27:36 +00:00
log.debug(
"Identify Anonymous User " + AnalyticsUtil.cachedAnonymoustId,
);
2020-11-23 13:17:12 +00:00
windowDoc.analytics.identify(
AnalyticsUtil.cachedAnonymoustId,
userProperties,
);
}
2020-03-03 07:02:53 +00:00
}
if (sentry.enabled) {
Sentry.configureScope(function(scope) {
scope.setUser({
id: userId,
username: userData.username,
email: userData.email,
});
});
}
2020-11-05 02:31:01 +00:00
if (smartLook.enabled) {
smartlookClient.identify(userId, { email: userData.email });
2020-08-21 08:13:59 +00:00
}
// If zipy was included, identify this user on the platform
if (window.zipy && userId) {
window.zipy.identify(userId, {
email: userData.email,
username: userData.username,
});
}
chore: Use rolling window in the usage pulse call and send segment anonymous id for anonymous users (#19552) ## Description We have updated the user tracking to use a rolling window. Now the session starts when the user goes to the builder or viewer for the first time and the subsequent activity tracking will be checked only after an hour. For anonymous users, we send the Segment anonymous id in the usage calls. When the telemetry is off, we still initiate the segment, get the id and then purge the analytics global object. Fixed window (in release, as of now)- if the user starts a session at 01:15 pm, we take 01:00 pm as the session start time and we will check for the next user activity at 2:00 pm. rolling window (in this PR) - if the user starts a session at 01:15 pm, we take 01:15 pm as the session start time and we will check for the next user activity at 2:15 pm. Fixes https://github.com/appsmithorg/cloud-services/issues/183 ## Type of change - New feature (non-breaking change which adds functionality) ## How Has This Been Tested? - Manual ### Test Plan ### 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: - [ ] Test plan has been approved by relevant developers - [ ] 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
2023-01-10 12:09:33 +00:00
AnalyticsUtil.blockTrackEvent = false;
2019-09-09 09:08:54 +00:00
}
static getAnonymousId() {
const windowDoc: any = window;
const { segment } = getAppsmithConfigs();
if (windowDoc.analytics && windowDoc.analytics.user) {
return windowDoc.analytics.user().anonymousId();
} else if (segment.enabled) {
return localStorage.getItem("ajs_anonymous_id")?.replaceAll('"', "");
}
}
static reset() {
const windowDoc: any = window;
if (windowDoc.Intercom) {
windowDoc.Intercom("shutdown");
}
2020-04-15 14:19:39 +00:00
windowDoc.analytics && windowDoc.analytics.reset();
windowDoc.mixpanel && windowDoc.mixpanel.reset();
window.zipy && window.zipy.anonymize();
}
chore: Use rolling window in the usage pulse call and send segment anonymous id for anonymous users (#19552) ## Description We have updated the user tracking to use a rolling window. Now the session starts when the user goes to the builder or viewer for the first time and the subsequent activity tracking will be checked only after an hour. For anonymous users, we send the Segment anonymous id in the usage calls. When the telemetry is off, we still initiate the segment, get the id and then purge the analytics global object. Fixed window (in release, as of now)- if the user starts a session at 01:15 pm, we take 01:00 pm as the session start time and we will check for the next user activity at 2:00 pm. rolling window (in this PR) - if the user starts a session at 01:15 pm, we take 01:15 pm as the session start time and we will check for the next user activity at 2:15 pm. Fixes https://github.com/appsmithorg/cloud-services/issues/183 ## Type of change - New feature (non-breaking change which adds functionality) ## How Has This Been Tested? - Manual ### Test Plan ### 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: - [ ] Test plan has been approved by relevant developers - [ ] 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
2023-01-10 12:09:33 +00:00
static removeAnalytics() {
AnalyticsUtil.blockTrackEvent = false;
(window as any).analytics = undefined;
}
2019-08-30 11:23:42 +00:00
}
2019-09-09 09:08:54 +00:00
export default AnalyticsUtil;