Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

fix: get projectId from link in tree navigation#5746

Merged
cwhitten merged 6 commits intomainfrom
beyackle/fix_projectTreeDialogClick
Feb 11, 2021
Merged

fix: get projectId from link in tree navigation#5746
cwhitten merged 6 commits intomainfrom
beyackle/fix_projectTreeDialogClick

Conversation

@beyackle
Copy link
Contributor

@beyackle beyackle commented Feb 9, 2021

Description

There was a bug in the sidebar navigation; the links did include the correct project ID (for both the root bot and skills), but navigation was only using the project ID of the currently active bot/skill, not the one the link was actually meant to point at.

Task Item

closes #5727

@beyackle
Copy link
Contributor Author

beyackle commented Feb 9, 2021

The other change was to remove a now-redundant React.Fragment wrapper; there's only one thing inside there, so it was a no-op.

@beyackle beyackle changed the title get projectId from link in tree navigation fix: get projectId from link in tree navigation Feb 9, 2021
@coveralls
Copy link

coveralls commented Feb 9, 2021

Coverage Status

Coverage decreased (-0.002%) to 55.14% when pulling b0385b0 on beyackle/fix_projectTreeDialogClick into 16d4db1 on main.

setBrokenSkillInfo(link);
}
const { skillId, dialogId, trigger } = link;
const { skillId, dialogId, trigger, projectId } = link;
Copy link
Contributor

Choose a reason for hiding this comment

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

The diff makes it hard to see how this value is being used.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you point me to where its being used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's used immediately below in the calls like navTo(skillId ?? projectId, dialogId);. Before this change, the value of projectId was obtained from the outside scope - a prop that was handed to the SideBar component - and that was defined out in DesignPage.tsx also as skillId ?? projectId, so every dialog link the side bar ended up navigating to whichever projectId was currently "active" instead of their own internal projectId.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we consider renaming some variables for clarity? It's very difficult to know what projectId is when used in the various places.

@cwhitten cwhitten merged commit 7557616 into main Feb 11, 2021
@cwhitten cwhitten deleted the beyackle/fix_projectTreeDialogClick branch February 11, 2021 03:12
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
* get projectId from link in tree navigation

* rename variables for clarity

Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clicking on root dialog across/bot skill loads the root dialog for active project, not the clicked on one

4 participants