Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: link to tab #1738

Merged
merged 7 commits into from
Dec 9, 2019
Merged

feat: link to tab #1738

merged 7 commits into from
Dec 9, 2019

Conversation

lei9444
Copy link
Contributor

@lei9444 lei9444 commented Dec 9, 2019

Description

Update the url generate function to support the link to INPUT tab.

refs #1667

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code refactor (non-breaking change which improve code quality, clean up, add tests, etc)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Doc update (document update)

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have functionally tested my change

Screenshots

convert

@lei9444 lei9444 changed the title feat: lint to tab feat: link to tab Dec 9, 2019

export * from './parsePathToFocused';
export * from './parsePathToSelected';
export * from './parseTypeToFragment';
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these meant to be shared in other packages? I would expect these to live in the client.

export function parseTypeToFragment(type: string, property: string): string {
const inputTypes = dialogGroups[DialogGroup.INPUT].types;
const index = inputTypes.findIndex(t => t === type);
if (index >= 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (index >= 0) {
if (inputTypes.find(t => t === type)) {

const index = inputTypes.findIndex(t => t === type);
if (index >= 0) {
if (property === 'property') return PromptTab.USER_INPUT;
if (property === 'prompt') return PromptTab.BOT_ASKS;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm worried about this scaling to all fields. Not sure what to do about it, but we should start thinking on how to handle this.

@cwhitten cwhitten added the R7 Release 7 - December 10th, 2019 label Dec 9, 2019
@a-b-r-o-w-n a-b-r-o-w-n merged commit 21d1b7f into microsoft:master Dec 9, 2019
@a-b-r-o-w-n a-b-r-o-w-n mentioned this pull request Dec 11, 2019
@a-b-r-o-w-n a-b-r-o-w-n mentioned this pull request Dec 11, 2019
@lei9444 lei9444 deleted the convert branch January 17, 2020 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R7 Release 7 - December 10th, 2019
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants