Skip to content

Commit

Permalink
fix: Allows "view dialog" from form dialog schema page (microsoft#4969)
Browse files Browse the repository at this point in the history
* Fix form dialog to dialog navigation

* Update fd generate library with minor fixes

Co-authored-by: Soroush Ghorashi <[email protected]>
  • Loading branch information
hatpick and sorgh authored Nov 24, 2020
1 parent 0907221 commit abb716f
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ const EmptyView = styled(Stack)({
opacity: 0.5,
});

type Props = RouteComponentProps<{ projectId: string; skillId: string; schemaId: string }>;
type Props = RouteComponentProps<{ projectId: string; schemaId: string }>;

const FormDialogPage: React.FC<Props> = React.memo((props: Props) => {
const { projectId = '', skillId = '', schemaId = '' } = props;
const { projectId = '', schemaId = '' } = props;
const formDialogSchemaIds = useRecoilValue(formDialogSchemaIdsState(projectId));
const formDialogLibraryTemplates = useRecoilValue(formDialogLibraryTemplatesState);
const formDialogGenerationProgressing = useRecoilValue(formDialogGenerationProgressingState);
Expand Down Expand Up @@ -90,7 +90,7 @@ const FormDialogPage: React.FC<Props> = React.memo((props: Props) => {
const viewDialog = React.useCallback(
(schemaId: string) => {
if (schemaId) {
navigateToGeneratedDialog({ projectId, skillId, schemaId });
navigateToGeneratedDialog({ projectId, schemaId });
}
},
[navigateToGeneratedDialog, projectId]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,8 @@ export const formDialogsDispatcher = () => {
}
);

const navigateToGeneratedDialog = ({ projectId, skillId, schemaId }) => {
skillId = skillId || projectId;
navigate(`/bot/${projectId}/skill/${skillId}/dialogs/${schemaId}`);
const navigateToGeneratedDialog = ({ projectId, schemaId }) => {
navigate(`/bot/${projectId}/dialogs/${schemaId}`);
};

const navigateToFormDialogSchema = ({ projectId, schemaId }) => {
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"@botframework-composer/types": "*",
"@microsoft/bf-dialog": "4.11.0-dev.20201025.69cf2b9",
"@microsoft/bf-dispatcher": "^4.11.0-beta.20201016.393c6b2",
"@microsoft/bf-generate-library": "^4.10.0-daily.20201112.185066",
"@microsoft/bf-generate-library": "^4.10.0-daily.20201123.188303",
"@microsoft/bf-lu": "^4.11.0-rc.20201030.a9f9b96",
"@microsoft/bf-orchestrator": "^4.11.0-beta.20201111.10062c1",
"archiver": "^5.0.2",
Expand Down
32 changes: 26 additions & 6 deletions Composer/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3111,10 +3111,10 @@
ts-md5 "^1.2.6"
tslib "^1.10.0"

"@microsoft/bf-generate-library@^4.10.0-daily.20201112.185066":
version "4.10.0-daily.20201112.185066"
resolved "https://botbuilder.myget.org/F/botframework-cli/npm/@microsoft/bf-generate-library/-/@microsoft/bf-generate-library-4.10.0-daily.20201112.185066.tgz#e86f3a5c0ec9d58db3ed55148d5ad41fecf4b095"
integrity sha1-6G86XA7J1Y2z7VUUjVrUH+z0sJU=
"@microsoft/bf-generate-library@^4.10.0-daily.20201123.188303":
version "4.10.0-daily.20201123.188303"
resolved "https://botbuilder.myget.org/F/botframework-cli/npm/@microsoft/bf-generate-library/-/@microsoft/bf-generate-library-4.10.0-daily.20201123.188303.tgz#92e763d4a1bab1657f84fc67a49d4b0ae02c178b"
integrity sha1-kudj1KG6sWV/hPxnpJ1LCuAsF4s=
dependencies:
"@microsoft/bf-lu" "^4.11.0"
adaptive-expressions "^4.11.0"
Expand Down Expand Up @@ -5898,6 +5898,11 @@ binary@^0.3.0:
buffers "~0.1.1"
chainsaw "~0.1.0"

[email protected]:
version "1.2.1"
resolved "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11"
integrity sha1-FK1hE4EtLTfXLme0ystLtyZQXxE=

bl@^1.0.0, bl@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/bl/-/bl-4.0.3.tgz#12d6287adc29080e22a705e5764b2a9522cdc489"
Expand Down Expand Up @@ -11215,7 +11220,7 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6:
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"
integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==

graceful-fs@^4.1.4, graceful-fs@^4.2.4:
graceful-fs@^4.1.4, graceful-fs@^4.2.3, graceful-fs@^4.2.4:
version "4.2.4"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb"
integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==
Expand Down Expand Up @@ -14365,6 +14370,11 @@ mixin-object@^2.0.1:
for-in "^0.1.3"
is-extendable "^0.1.1"

mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3:
version "0.5.3"
resolved "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113"
integrity sha1-+hDJEVzG2IZb4iG6R+6b7XhgERM=

mkdirp-then@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/mkdirp-then/-/mkdirp-then-1.2.0.tgz#a492c879ca4d873f5ee45008f8f55fd0150de3c5"
Expand Down Expand Up @@ -19267,6 +19277,16 @@ tar-fs@^1.13.0:
pump "^1.0.0"
tar-stream "^1.1.2"

tar-fs@^2.0.0:
version "2.1.1"
resolved "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784"
integrity sha1-SJoVq4Xx8L76uzcLfeT561y+h4Q=
dependencies:
chownr "^1.1.1"
mkdirp-classic "^0.5.2"
pump "^3.0.0"
tar-stream "^2.1.4"

tar-stream@^1.1.2:
version "1.6.2"
resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555"
Expand Down Expand Up @@ -20040,7 +20060,7 @@ unzip-response@^2.0.1:
resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97"
integrity sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=

unzip-stream@^0.3.0:
unzip-stream@^0.3.0, unzip-stream@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/unzip-stream/-/unzip-stream-0.3.1.tgz#2333b5cd035d29db86fb701ca212cf8517400083"
integrity sha512-RzaGXLNt+CW+T41h1zl6pGz3EaeVhYlK+rdAap+7DxW5kqsqePO8kRtWPaCiVqdhZc86EctSPVYNix30YOMzmw==
Expand Down

0 comments on commit abb716f

Please sign in to comment.