Skip to content

Commit

Permalink
Fix cohort setting string (#1304)
Browse files Browse the repository at this point in the history
* Fix string

* remove none

* name

* test
  • Loading branch information
zhb000 authored and gaugup committed Apr 21, 2022
1 parent b20e5e3 commit 7e6d298
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 22 deletions.
2 changes: 1 addition & 1 deletion apps/widget-e2e/src/describer/modelAssessment/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export enum Locators {
SortByDropdownOptions = "div[class^='dropdownItemsWrapper'] button:contains('CohortCreateE2E')",
CohortOnOffSelectionContainer = "#iterative-container",
CohortOnOffCohortCreateE2E = "#iterative-container div:contains(CohortCreateE2E) [role='checkbox']",
CreateNewCohortButton = "button:contains('Create new cohort')",
CreateNewCohortButton = "button:contains('Save cohort')",
CohortNameInput = "#cohortEditPanel input:eq(0)",
CohortDatasetValueInput = "#cohortEditPanel input[class^='ms-spinButton-input']",
CohortFilterSelection = "#cohortEditPanel [type='radio']",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,11 @@ export class CohortInfoSection extends React.PureComponent<ICohortInfoSectionPro
</Stack>
<Stack horizontal tokens={{ childrenGap: 25 }}>
<DefaultButton
text={
localization.ModelAssessment.CohortInformation.SwitchGlobalCohort
}
text={localization.ModelAssessment.CohortInformation.ShiftCohort}
onClick={this.props.toggleShiftCohortVisibility}
/>
<DefaultButton
text={
localization.ModelAssessment.CohortInformation.CreateNewCohort
}
text={localization.ModelAssessment.CohortInformation.SaveCohort}
onClick={this.props.toggleCreateCohortVisibility}
/>
</Stack>
Expand Down
9 changes: 2 additions & 7 deletions libs/dataset-explorer/src/lib/SidePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import {
DefaultButton,
IChoiceGroupOption,
Label,
Stack,
Text
Stack
} from "office-ui-fabric-react";
import React from "react";

Expand Down Expand Up @@ -72,7 +71,7 @@ export class SidePanel extends React.Component<ISidePanelProps> {
}
/>
<div className={classNames.legendAndText}>
{colorSeries?.length ? (
{colorSeries?.length && (
<InteractiveLegend
items={colorSeries.map((name, i) => {
return {
Expand All @@ -82,10 +81,6 @@ export class SidePanel extends React.Component<ISidePanelProps> {
};
})}
/>
) : (
<Text variant={"xSmall"} className={classNames.smallItalic}>
{localization.Interpret.DatasetExplorer.noColor}
</Text>
)}
</div>
</Stack.Item>
Expand Down
4 changes: 2 additions & 2 deletions libs/localization/src/lib/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1264,8 +1264,8 @@
"shiftCohortDescription": "Select a cohort from the cohort list. Apply the cohort to the dashboard."
},
"CohortInformation": {
"SwitchGlobalCohort": "Switch global cohort",
"CreateNewCohort": "Create new cohort",
"ShiftCohort": "Shift cohort",
"SaveCohort": "Save cohort",
"DataPoints": "Number of datapoints",
"DefaultCohort": " (default)",
"Filters": "Number of filters",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ export class ChangeGlobalCohortButton extends React.Component<
return (
<>
<DefaultButton
text={
localization.ModelAssessment.CohortInformation.SwitchGlobalCohort
}
text={localization.ModelAssessment.CohortInformation.ShiftCohort}
onClick={this.toggleShiftCohortVisibility}
/>
<ChangeGlobalCohort
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class CreateGlobalCohortButton extends React.Component<
return (
<>
<DefaultButton
text={localization.ModelAssessment.CohortInformation.CreateNewCohort}
text={localization.ModelAssessment.CohortInformation.SaveCohort}
onClick={this.toggleVisibility}
/>
<CreateGlobalCohort
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ export class MainMenu extends React.PureComponent<
},
key: "changeCohort",
onClick: this.toggleChangeCohortVisibility,
text: localization.ModelAssessment.CohortInformation.SwitchGlobalCohort
text: localization.ModelAssessment.CohortInformation.ShiftCohort
},
{
iconProps: {
iconName: "Add"
},
key: "addCohort",
onClick: this.toggleCreateCohortVisibility,
text: localization.ModelAssessment.CohortInformation.CreateNewCohort
text: localization.ModelAssessment.CohortInformation.SaveCohort
}
];
return (
Expand Down

0 comments on commit 7e6d298

Please sign in to comment.