Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2aa6fa0
remove tildes
beyackle Jun 1, 2020
34adef5
Merge branch 'master' into beyackle/tildes
beyackle Jun 1, 2020
c541a49
add no-bitwise rule
beyackle Jun 2, 2020
adb5729
Merge branch 'master' into beyackle/tildes
beyackle Jun 2, 2020
8e5e20a
Merge branch 'master' into beyackle/tildes
beyackle Jun 2, 2020
d10d089
Merge branch 'master' into beyackle/tildes
beyackle Jun 2, 2020
f03a9a2
update luPublisher with typo fixes and some cleanup
beyackle Jun 2, 2020
63bbd09
fix typo
beyackle Jun 2, 2020
f87eaa3
Merge branch 'master' into beyackle/tildes
beyackle Jun 2, 2020
5fd41d8
Merge branch 'master' into beyackle/tildes
beyackle Jun 3, 2020
75d35ae
remove tildes
beyackle Jun 1, 2020
e896efc
add no-bitwise rule
beyackle Jun 2, 2020
f49e848
update luPublisher with typo fixes and some cleanup
beyackle Jun 2, 2020
84b2cf5
fix typo
beyackle Jun 2, 2020
b886f73
Merge branch 'beyackle/tildes' of https://github.com/microsoft/BotFra…
beyackle Jun 3, 2020
6a7cb51
Merge branch 'master' into beyackle/tildes
beyackle Jun 3, 2020
36fd810
Merge branch 'master' into beyackle/tildes
beyackle Jun 4, 2020
e78207e
Merge branch 'master' into beyackle/tildes
beyackle Jun 4, 2020
21d3614
Merge branch 'master' into beyackle/tildes
beyackle Jun 4, 2020
498dc86
Merge branch 'master' into beyackle/tildes
beyackle Jun 8, 2020
1c47348
Merge branch 'master' into beyackle/tildes
beyackle Jun 9, 2020
f5bcb27
Merge branch 'master' into beyackle/tildes
beyackle Jun 10, 2020
a3a33eb
Merge branch 'master' into beyackle/tildes
beyackle Jun 15, 2020
b3d4c38
fix endpoint issue
beyackle Jun 16, 2020
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 @@ -57,14 +57,14 @@ const WelcomeModal = () => {
{stepSets.map(({ steps: { length }, title }, index) => (
<StepStatus
key={index}
isComplete={index < currentSet || (index === currentSet && !~currentStep)}
isComplete={index < currentSet || (index === currentSet && currentStep === -1)}
steps={length}
title={title}
/>
))}
</div>
<div css={footerStyle}>
{!~currentStep && (
{currentStep === -1 && (
<div>
{currentSet + 1 < stepSets.length && (
<PrimaryButton data-testid="onboardingNextSet" text={stepSets[currentSet + 1].title} onClick={nextSet} />
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/client/src/Onboarding/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const Onboarding: React.FC = () => {
!complete && projectId && navigateTo && navigate(navigateTo);
setTeachingBubble({ currentStep, id, location, setLength: steps.length, targetId });

setMinimized(!!~currentStep);
setMinimized(currentStep >= 0);

if (currentSet > -1 && currentSet < stepSets.length) {
onboardingState.setCurrentSet(stepSets[currentSet].id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const ExportSkillModal: React.FC<ExportSkillModalProps> = ({ onSubmit, onDismiss

const handleEditJson = () => {
const step = order.findIndex((step) => step === ManifestEditorSteps.MANIFEST_REVIEW);
if (~step) {
if (step >= 0) {
setCurrentStep(step);
setErrors({});
}
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/client/src/utils/luUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export * from '@bfc/indexers/lib/utils/luUtil';
export function getReferredFiles(luFiles: LuFile[], dialogs: DialogInfo[]) {
return luFiles.filter((file) => {
const idWithOutLocale = getBaseName(file.id);
return !!~dialogs.findIndex((dialog) => dialog.luFile === idWithOutLocale);
return dialogs.some((dialog) => dialog.luFile === idWithOutLocale);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const createPath = (path: string, type: string): string => {
if (/\[|\]/.test(x)) {
const reg = /\[.*\]/;
x = x.replace(reg, '');
return ~values(FieldNames).indexOf(x);
return values(FieldNames).includes(x);
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const isExpression = (value: string | boolean | number, types: string[]): boolea
//TODO: returnType is number, schem type is string, need map or unify
const checkReturnType = (returnType: ReturnType, types: string[]): string => {
return returnType === ReturnType.Object ||
~types.indexOf(ExpressionTypeMapString[returnType]) ||
(returnType === ReturnType.Number && ~types.indexOf(ExpressionType.integer))
types.includes(ExpressionTypeMapString[returnType]) ||
(returnType === ReturnType.Number && types.includes(ExpressionType.integer))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

cant this just be types[ExpressionType.integer] instead of doing includes everytime?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

👍

@beyackle beyackle Jun 2, 2020

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looking at this again, I'm not sure we can do anything about it yet. Types is an array but ExpressionType.integer is a string; we want to check if the string is a value in the array, so includes is appropriate here. The more correct thing here would be to make types a Set<string>, but that ought to be its own cleanup ticket later - it's a non-trivial amount of work.

? ''
: formatMessage('the expression type is not match');
};
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/server/src/models/bot/botProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ export class BotProject {

private getLocale(id: string): string {
const index = id.lastIndexOf('.');
if (~index) return '';
if (index >= 0) return '';
return id.substring(index + 1);
}

Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/server/src/models/bot/luPublisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export class LuPublisher {

//add the lu file that are not in interuption folder.
files.forEach((file) => {
if (!~paths.indexOf(file.name)) {
if (!paths.includes(file.name)) {

@srinaath srinaath Jun 2, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This becomes a O(ab) with the lookup inside for loop. Can paths be a Set?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Figured most of this code was already there. If u have time for a little cleanup will be great

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will do.

luConfig.models.push(Path.resolve(this.botDir, file.relativePath));
}
});
Expand Down