Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export const ProjectTree: React.FC<Props> = ({
displayName: dialog.displayName,
isRoot: dialog.isRoot,
projectId: rootProjectId,
skillId: skillId,
skillId: skillId === rootProjectId ? undefined : skillId,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@beyackle  I see a bug where I click on a skill's dialog file url changes correctly to http://localhost:3000/bot/25141.842060596977/skill/5927.301138798824/dialogs/googlekeepsync?selected=triggers[%22376720%22] . Navigate to a different page and come back to the DesignPage. The url is an invalid URL. It needs to set the url obtained from the previous designPageLocationState right?

Copy link
Contributor Author

@beyackle beyackle Nov 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks to me like a problem in the sidebar - when I have a skill open (so, the URL is /bot/<bot Id>/skill/<skill Id>) and click on the sidebar button, it takes me to a URL with /bot/<skill Id>/ in it, and then clicking back into Design keeps that around. Single-bot projects don't have this problem. The reason this change is going into main and not the feature branch is that undo/redo was breaking even in the single-bot case, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix has no relation to undo/redo. The URL was broken irrespective of whether we were doing Undo/redo.

Copy link
Contributor

@srinaath srinaath Nov 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to be an issue with the sidebar though. DesignPageLocation state stores the current focussed actions etc that are particular to the design page. On rendering the designPage it should always use the currentProjectId state and parse the designPagelocation state to set the URL correctly?

errorContent,
warningContent,
};
Expand Down Expand Up @@ -332,7 +332,7 @@ export const ProjectTree: React.FC<Props> = ({
const renderTrigger = (item: any, dialog: DialogInfo, projectId: string): React.ReactNode => {
const link: TreeLink = {
projectId: rootProjectId,
skillId: projectId,
skillId: projectId === rootProjectId ? undefined : projectId,
dialogId: dialog.id,
trigger: item.index,
displayName: item.displayName,
Expand Down