Skip to content

Commit

Permalink
MAT-7830: Removed ValueSetSearch
Browse files Browse the repository at this point in the history
  • Loading branch information
gregory-akins committed Oct 31, 2024
1 parent 2caff8f commit 715e8a7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 19 deletions.
18 changes: 4 additions & 14 deletions src/CqlBuilderPanel/CqlBuilderPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,21 @@ export default function CqlBuilderPanel({
makeExpanded,
}) {
const featureFlags = useFeatureFlags();
const {
QDMValueSetSearch,
CQLBuilderDefinitions,
CQLBuilderIncludes,
CQLBuilderParameters,
} = featureFlags;
const { CQLBuilderDefinitions, CQLBuilderIncludes, CQLBuilderParameters } =
featureFlags;
// we have multiple flags and need to select a starting value based off of what's available and canEdit.
const getStartingPage = (() => {
// if cqlBuilderIncludes -> includes
// if BuilderDefs -> definitions
// if QDM, then
// if qdmValueSetSearch -> valueSets
// else, codes
// if QDM -> valueSets
if (CQLBuilderIncludes) {
return "includes";
}
if (CQLBuilderDefinitions) {
return "definitions";
}
if (measureModel?.includes("QDM")) {
if (QDMValueSetSearch) {
return "valueSets";
}
return "codes";
return "valueSets";
}
})();

Expand Down Expand Up @@ -144,7 +135,6 @@ export default function CqlBuilderPanel({
<CqlBuilderSectionPanelNavTabs
activeTab={activeTab}
setActiveTab={setActiveTab}
QDMValueSetSearch={QDMValueSetSearch}
CQLBuilderDefinitions={CQLBuilderDefinitions}
isQDM={measureModel?.includes("QDM")}
CQLBuilderParameters={CQLBuilderParameters}
Expand Down
4 changes: 1 addition & 3 deletions src/CqlBuilderPanel/CqlBuilderSectionPanelNavTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export interface NavTabProps {
setActiveTab: (value: string) => void;
CQLBuilderIncludes: boolean;
CQLBuilderParameters: boolean;
QDMValueSetSearch: boolean;
CQLBuilderDefinitions: boolean;
isQDM: boolean;
}
Expand All @@ -14,7 +13,6 @@ export default function CqlBuilderSectionPanelNavTabs(props: NavTabProps) {
const {
activeTab,
setActiveTab,
QDMValueSetSearch,
CQLBuilderDefinitions,
CQLBuilderIncludes,
CQLBuilderParameters,
Expand All @@ -40,7 +38,7 @@ export default function CqlBuilderSectionPanelNavTabs(props: NavTabProps) {
value="includes"
/>
)}
{QDMValueSetSearch && isQDM && (
{isQDM && (
<Tab
tabIndex={0}
aria-label="Value Sets"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jest.mock("../api/axios-instance");
jest.mock("@madie/madie-util", () => ({
useFeatureFlags: jest.fn(() => {
return {
QDMValueSetSearch: true,
CQLBuilderDefinitions: true,
CQLBuilderIncludes: true,
};
Expand Down
1 change: 0 additions & 1 deletion src/madie-madie-util.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ declare module "@madie/madie-util" {

interface FeatureFlags {
CQLBuilderIncludes: boolean;
QDMValueSetSearch: boolean;
CQLBuilderDefinitions: boolean;
CQLBuilderParameters: boolean;
}
Expand Down

0 comments on commit 715e8a7

Please sign in to comment.