-
Notifications
You must be signed in to change notification settings - Fork 374
Partialy fix #999: selection change shouldn't trigger save data API #1034
Conversation
|
The integration test became quite stable after I removed the |
cwhitten
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't fully work. We're still calling backend api's when we navigate to a new Dialog, which I think (I don't have an environment running at this moment) is also due to the selection state calling the onChange api.
I’m sure that changing the selection state won’t call the onChange api directly anymore. The unexpected api call when navigating to new dialog might be fired by the useEffect hook’s first cycle. If so, it should be already fixed here. Not confirmed yet, but I will keep tracking it in #999 |
|
I remembered that Dong and Leilei was working on reducing the frequency of calling saveData on shell level, any information or update @boydc2014 @lei9444 ? |
|
When developer tools are opened in common browsers, they are often configured to pause on unhandled rejections like this. And the way you describe it seems like this is a concern of the Visual Editor and the behavior is a pretty big leak of the abstraction. |
24caeea to
34c4e93
Compare
|
We can discuss some of the |
* Add Event types into new trigger (#900) * update dialog trigger json parse * fetch event types from schemas * get constant from appschema * fix conflict * fix conflict * fix test case * fix test case * fix test case * handle comments * Refactor the project tree and add dialog filter (#899) * refactor the project tree and add filter dialog * revert some change base on master * revert design page * fix e2e test * fix some comments * update the searchbox ui * do not auto focus inline lg editor (#936) * Refresh form UI (#935) * update DialogInfo types and fix demo app * update designer form * seed new dialog action with designer properties * update look and feel of property editor, pt 1 * use correct peer version of react-dom * fix lint errors * seed dialog data with $type * fix react error * use default button for object array * add custom label and description to widgets * add new ui:hidden concept to ui schema * finish applying new look and feel to form * fix panel height on safari * update fabric * fix some fabric upgrade misses * port style changes to css files * update spec to look for input instead of text * fix merge conflict * update signature of seachbox.onChange * bump fabric to latest and fix nav styles * remove dead code * Minor cleanup (#952) * Fix todo template (#955) * Allow full control over destination path for bot projects (#794) * working draft of file picker in new bot flow * draft open bot from any location * add bot and folder icons open bot on select only allow bot projects to be opened only show folders when choosing a destination folder * yarn lock file * remove unnecessary ui components * fix column widths * refactor * set and display the default path * hide location/browse button when creating a dialog inside a bot * clean up code * fix integration tests * bring back breadcrumbs * implement updated design * update posix/unix path stuff * update file path handling * update file path handling * ensure new dialog modal is not horizontal * Add dotnet commends in to start command * Update documentation * Extract to startall command * Fix lint * Change .NET prereq to 2.2.109 * Fix todo template (#984) * [Visual Editor] Copy & paste (#890) * add clipboard data into shared state * copy paste ring * forbid pasting to events level * fix KeyboardZone state bug * add Mac short cuts * remove keyboard shortcuts (not included in ignite) * saveDate rate control * sync VisualEditor & Shell state via window * support selection deletion * consume deleteSelection in shell * fix test case * support insertion to non-exisiting path * revert to debounce in ShellAPI to avoid first-time update error Previously, the useDebounceFunc was changed to useThrottleFunc to make sure first-time change be updated in time. However, this change breaks the integraton test where first-time API call will trigger the ErrorBoundary under the IT env. Revert it partially to fix the CI failure. * fix a typo: debounce -> debounced * implement FrameAPI to lazy visit frame window, fix selction state * make trigger unselectable * use ObiTypes instead of string * use global config to control keyboard features * bind copy paste shortcuts & enable it in demo mode * optimize keyboard command switcher * merge from #923 * use apiClient mechanism on VisualEditorAPI * toolbar always enabled (temporary fix) * Revert "toolbar always enabled (temporary fix)" This reverts commit cfe7aff. * sync selection and focusedId * Fix Breadcrub CI * increase wait time in Breadcrub test * update Breadcrumb CI test * Fix ToDoBot spec * fix CreateNewBot spec * use before hook instead of beforeEach hook * make cypress `openBot` more stable * fix cursor move CI test * increase Breadcrumb CI wait time to make it more stable * cheat Cypress to not call iframe APIs to make CI more stable * fix Breadcrumb, RemoveDialog CI * make LuisDeploy spec more stable * Fix CI test VisualDesigner * fix CI CreateNewBot * revert unnecessary changes * fix CreateNewBot spec * fix LuisDeploy spec * revert to AddToDo in CursorMove spec * use cy.wait to fix fragile CreateNewBot spec * fix CI test of CreateNewBot * increase wait time in LUISDeploy * fix LuisDeplot spec * delete test * (zeye) optimize selection effect * revert some cypress 'before' to 'beforeEach' to avoid unnecessaary changes * Update issue templates * add help url to inline lg editor field (#997) * Hide Home page in abs-h (#1005) * Hide Home page in abs-h * Change to filter * Create schema drop doc (#1009) * add default trigger type (#934) * Pass the auth token properly to the build command (#1011) * Bring back the botendpoint (#1020) * add link to docs to main readme (#1019) * add link to docs to main readme * Update README.md * don't allow e2e tests to fail CI (#1022) * try continueOnError config for e2e tests * publish cypress artificats if previous step succeeds with issues * use monaco editor for http request body field (#991) * add component governance build step (#914) * add component governance build step * create new job for security * do not run obieditor extension as part of dev script (#1000) its only necessary when doing development on obiformeditor package * Update left nav(final) (#995) * update left nav(final) * make the trigger unclickable * fix lint and e2e test * add a doc for using oauth (#1027) * add docs for using the oauth action * add link * update Readme and docs * update docs * update links * Update docs add preview + update links * One more link update * Fix luis publish failed when authoringRegion is "" in setting page (#1044) * fix issue 896 * refine the setting editor with controlled codemirror * fix comments * fix naming problem * polish * fix publish default values missing * action node ui adjust (#1051) * Fix editor freezing issue when JSON parse failed (#1052) * fix bug, remove useless reducer and add debounce * polish * Partialy fix #999: selection change shouldn't trigger save data API (#1034) * inject `onSelect` handler to Visual Editor for syncing selection state * connect `onSelect` with ShellApi handler for notifying state change * call `onSelect` at every selection change in visual editor * fetch selectionState from visual editor AFTER visual editor updated * update comments * detach visualApi logic from FrameApi * deal with reject in visual api * new prompt UI (#1040) * update DialogInfo types and fix demo app * update designer form * seed new dialog action with designer properties * update look and feel of property editor, pt 1 * use correct peer version of react-dom * fix lint errors * seed dialog data with $type * fix react error * use default button for object array * add custom label and description to widgets * add new ui:hidden concept to ui schema * finish applying new look and feel to form * fix panel height on safari * update fabric * fix some fabric upgrade misses * port style changes to css files * update spec to look for input instead of text * fix merge conflict * update signature of seachbox.onChange * bump fabric to latest and fix nav styles * remove dead code * update uischema to use sdk type enum will surface sdk upgrade issues * render a prompt field for each prompt type * add emotion for css-in-js * add prompt bot says tab * add user says tab * [wip] exceptions tab * [wip] validations * finish exceptions tab * use short date format * ease widget props interface * add prompt settings * further relax widget props * default max turn count to 3 * consolidate shared logic into main prompt field * remove extraneous properties when changing prompt type * make validations editable inline * add choices form to multi choice input * add rest of multi choice fields * add extra confirm input fields remove $type field * wire up prompt navigation (#1058) * fix navigating to actions from form * add prompt tab to url fragment when navigating from visual editor * use focused tab state to show right prompt tab * extract lg editor widget and make template name use field name * pass height in as code editor prop * use monaco editor for prompt fields * render lg template contents in prompt nodes in visual editor * clean up lint issues * update breadcrumb spec * tweak styles for forms with no properties * Update LU placeholder text + aka.ms link (#1026) * Update LU placeholder text + aka.ms link * fix lint error * use https * Fix #1057: Unable to drag to select a prompt (#1059) * rename 'selected' -> 'selectable' * remove double selection logic (wrong logic) * reorder attributes * Update settingsManager to support multiple environments (#1010) * Backend settings calls for settings manager * Update bot connector * Refactoring service to add some IoC * remove absh reference from botProject * PR feedback, mainly to fix the module load issue * lint * fix #1063 (#1064) * Fix #906 (#1070) * retry setting editor dimensions if container is 0x0 (#1061) * Don't build sever & client for local dev (#1073) * Don't build sever & client for local dev Because they can all hot reload * Update azure-pipelines.yml * DialogFactory refactor (#1033) * WIP * More WIP * Refactor dialog generation code into shared-menus * Replace server side dialogTemplate.json * Fix test * WIP * Merge from master * Adds tests * Change shared-menus to shared * Revert schema changes * Cleanup * fix samples (#1066) * Removes sandwich bot (#1086) * Removes sandwich bot * fix lint error * enable eslint security rules (#1084) * do not use dangerous inner html in react * consolidate eslint dependencies to root * fix lint errors * remove sample-json-editor * consolidate eslint packages and bump ts version * update client for new ts-eslint rules * apply lint changes to obiformeditor * apply new lint rules to visual editor * apply new lint rules to shared-menus * apply new lint rules to server * apply ts fixes * add temp fix for adding new files * fix merge build / lint issues * enable eslint security rules * fix lint error after merge * remove recognizer options from choice input form (#1087) * Updates to interruption sample (#1025) * Fixes #950 #949 * Updates to validation * Fix Luis republish issue when settings change but luis files not change (#1072) * fix republish issue and fix code mirror settings update bug * polish * fix comments * polish * fix comments * fix comments in another way * fix issue (#1102) * Add shortcuts for undo / redo (#1071) * short cut for copy paste undo redo * refactor keyboardZone & close copy&paste shortcut * revert changes in 'KeyboardZone' * revert some unnecessary changes * rename undo/remo event type * fix keyboard navigation after switching tabs or apps (#1075) * rewrite the keyboard zone event listener * change Props interface name, expose native key event * use includes instead of find * update pr template to reference GH references (#1104) * fix bug: show recent bot project (#1103) * Copy runtime into new bot projects (#1016) * add deploy scripts * remove commented line. * rename the script and add environment. * add output * add luis config. * add custom config from PR #719 * minor fix for comments. * deploy steps in settings page * add runtime generate script * update design of deploy wizard, include realistic commands, copy to clipboard, improvements to nav glow * add currently open bot projects' path to the state * remove admin controller for key managment, use script instead. * add deployment runtime * use dotnet set user secrets command to set luis key and app password * add application insights deloyment template. * add cosmos db deployment * add error message for deploy script. * delete scripts in local runtime. only keep scripts in deployment runtime instead. * add azure storage deployment * change folder name * 2 buttons on deploy screen * 2 buttons on deploy screen * reset the local runtime. * remove docker related file for templates. * change namespace. * remove auto reloading in template runtime * add settings check for cosmosdb && azure storage for tranScript * delete user secret id, change nuget settings. * remove composerdata folder. * init user secret. * include composerdialogs. * bot path is not necessary. * remove debugger. * Adjust new bot creation to include the runtime code Move dialog content in the templates into a folder called ComposerDialogs/ * update to validation, form values * sync validators * gif file * Add support for copying files from the local folder rather than some externally specified folder * add final GIF for deploy * move generated folder into ComposerDialogs * Fix case of Scripts folder in deploy instructions * ensure lu and dialog files end up inside the composerDialogs folder * add luis feature * Update template-with-preexisting-rg.json * complete luis feature. * make sure bot content is loaded from ComposerDialogs * use settings from project file to determine luis * slightly adjust paths * clean up * fix path * fix path * update assetmanager test to include runtime path * add empty runtime * adjust tests to compensate for new folders * update paths for test settings files * fix linter error * update tests * Create ComposerDialogs for every sample bot (#1109) * Add ComposerDialogs folder for every sample bot * Update the schema for ToDoBot also * [Visual Editor] Focus state for prompt tab (#1069) * inject focusedTab from shell data * update demo and test * listen to promptTab for updating visual editor * Fix cursor move not work (#1068) * cursor move not work * Merge two effect hook * double Selected * fix FormCard css * extract complicted switch case out of 'moveCursor()' * locale -> locate * selectedElement -> selectableElement in ObiEditor * refactoring the tab move handler * rename 'selectedElements' -> 'selectableElements' and prevent type leak * prevent window move when pressing arrow keys * fix package quote error * delete keyboardStatus & fix eslint warning * Revert "delete keyboardStatus & fix eslint warning" This reverts commit 70dc4fd. * revert cursorTracker changes to make PR pure * revert KeyboardZone changes * remove window scroll * Inherit OBI types from 'shared' lib in Visual Editor (#1108) * resolve #1107 * remove 3 outdated types, extract virtual types out * remove appearances of outdated schema types * const => enum * Fix dialog can't be deleted and .gitignore (#1113) * Fix dialog can't be deleted * Delete luis.status.json * Fix git ignore * update comments * clean DS_Store * Update botProject.test.ts * [Editor] Support inline lg editing (#898) * navigateTo dialog * inline lg editor, edit on partial code range * wrap editor event * update demo * support code range editing * form lg inline editing * form inline lg editing * upgrade lg parser * coderange -1 for end line * form inline add lg template * clean * code refine * better handle editor instance * use default 'common.lg' * add missing dialogId * CSP issue, LGbundle.js remove eval * improve form performance by using local state (#1106) * use local state for form data will help with syncing issues with the shell by not relying on race conditions * fix border radius for designer nodes * bump @typescript-eslint * Added reporting security issues to main readme Part of the compliance process * increate the memory of node (#1118) * remove empty folder after removing dialog (#1099) * update code due to master branch changed * handle comments * remove constraint and name field (#1101) * remove constraint * remove name field * change name field to intent dropdown when trigger type is OnIntent, remove name field in other trigger types * fix test case * disabled intent drop down if no luis intent configured * fix visual-designer e2e test error (#1117) * Bump lodash.merge and webpack-dev-server (#1121) * Update packages to botbuilder-dotnet master 4.6.0-preview-191012 and update all the samples (#920) * PackageUpdate * Update package to 0925 * Update package to 928 * Update package to 4.Future: 4.6.0-Daily-2019-10-10-01 * Update schema and Templates * Update sdk.schema * update code to align with schema change * Remove createdAt and updatedAt in all the samples * fix cards sample * Update packages to botbuilder-dotnet master 4.6.0-preview-191012 * DialogFactory refactor (#1033) * WIP * More WIP * Refactor dialog generation code into shared-menus * Replace server side dialogTemplate.json * Fix test * WIP * Merge from master * Adds tests * Change shared-menus to shared * Revert schema changes * Cleanup * fix samples (#1066) * Removes sandwich bot (#1086) * Removes sandwich bot * fix lint error * enable eslint security rules (#1084) * do not use dangerous inner html in react * consolidate eslint dependencies to root * fix lint errors * remove sample-json-editor * consolidate eslint packages and bump ts version * update client for new ts-eslint rules * apply lint changes to obiformeditor * apply new lint rules to visual editor * apply new lint rules to shared-menus * apply new lint rules to server * apply ts fixes * add temp fix for adding new files * fix merge build / lint issues * enable eslint security rules * fix lint error after merge * remove recognizer options from choice input form (#1087) * Updates to interruption sample (#1025) * Fixes #950 #949 * Updates to validation * Fix Luis republish issue when settings change but luis files not change (#1072) * fix republish issue and fix code mirror settings update bug * polish * fix comments * polish * fix comments * fix comments in another way * fix issue (#1102) * Add shortcuts for undo / redo (#1071) * short cut for copy paste undo redo * refactor keyboardZone & close copy&paste shortcut * revert changes in 'KeyboardZone' * revert some unnecessary changes * rename undo/remo event type * fix keyboard navigation after switching tabs or apps (#1075) * rewrite the keyboard zone event listener * change Props interface name, expose native key event * use includes instead of find * update pr template to reference GH references (#1104) * fix bug: show recent bot project (#1103) * remove designer timestamps from samples * fix * Fixed steps sample bugs * Fix Input_Samples * fix todo test * fix todo bug * fix tests * update SDKTypes and labelMap also fix some random schema typos * Some minor fixes * add "\r\n" to fix the CI test failure * Try to use Environment.NewLine to fix test case * Fix testcases by using Environment.NewLine * Update ToDoBotTests.cs * Add QnA Sample * [Form editor] Update shared schema (#1123) * add ActivityTemplate * update adaptive dialog * EntityRecognizer -> EntityRecognizers * extract $ fields to sharable function * update id property * input updates * update BeginDialog * update CancelAllDialogs * update ChoiceInput * add ConditionalSelector * update ConfirmInput * update DateTimeInput * update DebugBreak * remove extraneous fields * update DeleteProperty * update EditActions * update EditArray * update EmitEvent * update EndDialog * update EndTurn * add FirstSelector * update Foreach * update ForeachPage * update HTTPRequest * update IActivityTemplate * update IDialog * update interfaces * update IfCondition * update InitProperty * update LanguagePolicy * update LogAction * Update LuisRecognizer * add MostSpecificSelector MultiLanguageRecognizer * update NumberInput * update OAuthInput * update Trigger Conditions * update QnAMakerDialog * update regex types * update RepeatDialog * update ReplaceDialog * update SendActivity * update SetProperty * add StaticActivityTemplate * update SwitchCondition * update TextInput * add TextTemplate * update TraceActivity * add TrueSelector * update events -> triggers * move SDKTypes to own file avoids circular reference runtime errors * add to triggers instead of events when creating new trigger * update visual editor to reference triggers and OnCustomEvent * remove value from prompt form * update editor schema * fix navigating to actions from form * memoize form change handler * show dialog events in trigger creation * remove leftover anyOf * fix trigger event creation * update uiSchema * fix HttpRequest headers schema * improve obischema type * fix dialog options name fixes #1053 * fix tests * Update Dialog validation rules * Fix to some SampleBots * Fix tests * add initial CSP directives (#1105) * add initial CSP directives * set CSP style-src directive with per request nonce * allow unsafe-inline for style tags for now monaco-editor lacks support for nonce at this time * only emit ejs files for production build (#1129) the dev server cannot render ejs templates and breaks. * Publish/Rollback methods and links to absh backend (#943) * Publish/Rollback methods and links to absh backend * Adding a mock connector * updates to publish * publish controller methods * Updates to match the latest APIs * hook front end of abs publishing to backend * completed styles, error handling for abs publish * only display the settings option inside ABS-H * Refactor to environment module * integration testing improvements * add localized time widget * format timestamp conditionally * Try to update URL * separate prod endpoint into its own state variable * fix #1116 update text on publish page * update endpoint state variable to allow for multiple slots * add spinner * remove button * cleanup * Fix lint * Fix allow interruptions (#1131) * fix allow interruptions field * update allowInterruption schema to make it an expression * fix lg editing when multiple editors on the same page (#1132) * use local state for lg widget * update lg editor widget to only edit single template use the updateLgTemplate and removeLgTemplate apis instead of updating the whole file to avoid race conditions * debounce lg template update * Parse regex intents in trigger wizard (#1133) * Support parsing of regex intents in new trigger wizards * Spread differently * use lodash dot package (#1125) > > This looks good, but i want to understand one thing, why this fails in docker, but not in our CI? CI is also a clean environment (supposed), why it's OK there? > > I guess docker use an isolation container, so the server can't visit package installed in client In CI, i think server should also not supposed to use packaged installed in Client, because our production build, will bundle client and put into server. Server should not refer to client package, but i guess we didn't clean the environment. i get it. * lg template look cover `prompt` & `unrecognizedPrompt` (#1136) * Update Deployment Template SDK to 2019-10-12. (#1126) * update template sdk version. * update nuget.config * Liweitian/updated schema in trigger (#1138) * trigger align with the new schema * align with new schema * rebase master * Fix botEndpoint not correct in docker environment (#1139) * distinguish botAdminEndpoint and botEndpoint * update docker * fix sync * Upgrade botbuilder-lg (#1142) * Handle copy LG activity in visual editor (#1096) * implement 'deepCopyAction' for copying action recursively * implement async lg template copy * inject lgApi into jsonTracker copy / cut * add mock lgApi in demo * make LgApi promise work * fix two unstable CI spec (why it started to failed here? it should have been failed in very early PR since we no longer focus to default event) * increase Breadcrumb spec waiting time to stablize * fix CI by adding wait() * remove comments * visit -> walk * apply ''needsDeepCopy" * Fix lint error * move all copy logic into copyUtils * use a function map to handle different types overrider * simplify the overrider map * remove needsDeepCopy handler outside * judge needsOverride * delete prefix for coped node by adding new lg template for copied node * revert changes in copyUtils * remove unnecessary export * deep copy node at 'paste' stage instead of 'copy' * create new lg at 'paste' stage * eslint * add unit tests for copyUtils * Expose botProject to docker (#1147) * [Shell] Remove redundant exports in ProjectTree/index (#1146) * remove redundant export in ProjectTree/index * add class name to ProjectTree * Update package and some fixes (#1188) * prompt exception ui bugfix (#1187) * [Visual Editor] Support QnAMakerDialog (#1178) * show hostname as content of 'QnAMakerDialog' * enable adding QnA from edge menu * fix a flicker bug in home page (#1120) * fix a flicker bug * fix an undefined variable bug * updating license file for public preview * do not memoize BaseEditor (#1194) memoizing the component has the effect that changes in props will not trigger a re-render, breaking react paradigms. this led to an issue where the onChange handler was a closure, but not getting updated values when the closure changed. * fix various form issues (#1199) * move shared typings into shared package * use smaller lodash packages * fix lint errors * prefix react key with botName fixes #1161 * hide most actions tables in form * update switch condition branch UI/UX * use custom key to force react to rerender list items * fix appId and appPassword missing problem (#1183) * Fix LG resource delete in dialog (#1145) * find all lg templates * only match generated lg temapte name * match unrecognizedPrompt * more fields * async multi remove * more match fields * tag a todo * check unll array before use it (#1215) * Hailiu/settings ui (#1134) * per slot dialog settings with optional obfucate * switch to choice group instead of dropdown * use createPortal to project show-keys toggle * fix integration test for breadcrumb * use formatMessage for textual content * change text content * hide settings by default * fix typo * fix lint and test:coverage * fix test:coerage * fix build * udpate copy text * Update Composer/packages/client/src/utils/objUtil.ts Co-Authored-By: Andy Brown <[email protected]> * fix hosted routes * fix open bot emulator * refactor cross frame state data * fix setDialogSettingsSlot * fix args order' * add save button to hosted settings edit UI * clean up obfuscate * remove code-mirror * convert to css-in-js * add hosted to ShellData type * fix lint issue * add emotion babel plugin for test * require jsx pragma * Update high risk dependencies (#1205) * [Visual Editot]Add label content for traceActivity (#1184) * add label content for traceActivity * ui bugfix * Hide edit actions (#1222) * default allowInterruptions to false * hide EditActions action * only limit node memory on CI * Adjust Menu item flyouts (#1226) * Add banner (#1227) fixes #1200 * [Visual Editor] add `npm start` command for visual editor (#1238) * add start command to visual-designer * remove file & code about nwb * use local system path when initializing data file (#1242) * Update runtime to 191022-1 daily build (#1245) * UX Change labels of Bot says and User Says (#1230) * change ui label * use formatMessage * instructions for Oct 24th hack * Fixing links to images

Description
Selection change shouldn't trigger server side
saveDataapi call (#999 - 3). This PR creates a new ShellApi for handling selection change event.Task Item
fixes #999
Type of change
Please delete options that are not relevant.
Checklist
Screenshots
Please include screenshots or gifs if your PR include UX changes.