Skip to content

Commit f00fcaa

Browse files
frano-mclaude
andauthored
Remove azuldownload and curldownload feature flags (#4734)
* feat: remove azuldownload and curldownload feature flags (#4733) Remove the AZUL_DOWNLOAD and CURL_DOWNLOAD feature flags so download features are enabled unconditionally. The NRES consent group check for curl download is preserved as it is business logic, not a feature gate. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: update e2e test to expect download column visible by default (#4733) The files tab now shows the download column without a feature flag, so set emptyFirstColumn to true to account for the extra columnheader. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Fran McDade <18710366+frano-m@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c33323a commit f00fcaa

File tree

11 files changed

+9
-80
lines changed

11 files changed

+9
-80
lines changed

app/components/Export/components/AnVILExplorer/CurlDownload/curlDownloadExportMethod.tsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

app/components/Index/components/AzulFileDownload/azulFileDownload.tsx

Lines changed: 0 additions & 29 deletions
This file was deleted.

app/components/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ export { ManifestDownloadEntity } from "@databiosphere/findable-ui/lib/component
5555
export { ManifestDownloadForm } from "@databiosphere/findable-ui/lib/components/Export/components/ManifestDownload/components/ManifestDownloadForm/manifestDownloadForm";
5656
export { ManifestDownload } from "@databiosphere/findable-ui/lib/components/Export/components/ManifestDownload/manifestDownload";
5757
export { AzulFileDownload } from "@databiosphere/findable-ui/lib/components/Index/components/AzulFileDownload/azulFileDownload";
58-
export { AzulFileDownload as AzulFileDownloadVisibilityController } from "./Index/components/AzulFileDownload/azulFileDownload";
5958
export {
6059
BackPageContentMainColumn,
6160
BackPageContentSideColumn,

app/shared/entities.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22
* Set of possible feature flags.
33
*/
44
export enum FEATURES {
5-
AZUL_DOWNLOAD = "azuldownload",
6-
CURL_DOWNLOAD = "curldownload",
75
NCPI_EXPORT = "ncpiexport",
86
}

e2e/anvil/anvil-tabs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export const ANVIL_TABS: AnvilCMGTabCollection = {
162162
url: "/donors",
163163
},
164164
FILES: {
165-
emptyFirstColumn: false,
165+
emptyFirstColumn: true,
166166
indexExportPage: ANVIL_INDEX_EXPORT_BUTTONS,
167167
maxPages: 25,
168168
preselectedColumns: ANVIL_FILES_PRESELECTED_COLUMNS_BY_NAME,

pages/[entityListType]/[...params].tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import { useFeatureFlag } from "@databiosphere/findable-ui/lib/hooks/useFeatureF
3434
import { FEATURES } from "../../app/shared/entities";
3535
import NextError from "next/error";
3636
import { ROUTES } from "../../site-config/anvil-cmg/dev/export/routes";
37+
3738
import { getConsentGroup } from "../../app/apis/azul/anvil-cmg/common/transformers";
3839
import { DatasetsResponse } from "../../app/apis/azul/anvil-cmg/common/responses";
3940

@@ -71,17 +72,14 @@ const EntityDetailPage = (props: EntityDetailPageProps): JSX.Element => {
7172
const { config: siteConfig } = useConfig();
7273
const isAnVIL = siteConfig.appTitle?.includes("AnVIL");
7374
const isNCPIExportEnabled = useFeatureFlag(FEATURES.NCPI_EXPORT);
74-
const isCurlDownloadEnabled = useFeatureFlag(FEATURES.CURL_DOWNLOAD);
7575
const { query } = useRouter();
7676
if (!props.entityListType) return <></>;
7777
if (props.override) return <EntityGuard override={props.override} />;
7878
if (!isNCPIExportEnabled && isNCPIExportRoute(query))
7979
return <NextError statusCode={404} />;
80-
// Curl download requires feature flag AND NRES consent group (AnVIL only)
81-
if (isAnVIL && isCurlDownloadRoute(query)) {
82-
if (!isCurlDownloadEnabled || !isNRESDataset(props.data)) {
83-
return <NextError statusCode={404} />;
84-
}
80+
// Curl download requires NRES consent group (AnVIL only)
81+
if (isAnVIL && isCurlDownloadRoute(query) && !isNRESDataset(props.data)) {
82+
return <NextError statusCode={404} />;
8583
}
8684
if (isChooseExportView(query)) return <EntityExportView {...props} />;
8785
if (isExportMethodView(query)) return <EntityExportMethodView {...props} />;

pages/export/get-curl-command.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import { JSX } from "react";
22
import { ExportMethodView } from "@databiosphere/findable-ui/lib/views/ExportMethodView/exportMethodView";
3-
import { useConfig } from "@databiosphere/findable-ui/lib/hooks/useConfig";
4-
import { useFeatureFlag } from "@databiosphere/findable-ui/lib/hooks/useFeatureFlag/useFeatureFlag";
53
import { GetStaticProps } from "next";
6-
import NextError from "next/error";
7-
import { FEATURES } from "../../app/shared/entities";
84

95
export const getStaticProps: GetStaticProps = async () => {
106
return {
@@ -19,11 +15,6 @@ export const getStaticProps: GetStaticProps = async () => {
1915
* @returns download curl command view component.
2016
*/
2117
const GetCurlCommandPage = (): JSX.Element => {
22-
const { config } = useConfig();
23-
const isAnVIL = config.appTitle?.includes("AnVIL");
24-
const isEnabled = useFeatureFlag(FEATURES.CURL_DOWNLOAD);
25-
// Feature flag only applies to AnVIL sites
26-
if (isAnVIL && !isEnabled) return <NextError statusCode={404} />;
2718
return <ExportMethodView />;
2819
};
2920

site-config/anvil-cmg/dev/detail/dataset/export/export.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import * as C from "../../../../../../app/components";
88
import { DatasetsResponse } from "app/apis/azul/anvil-cmg/common/responses";
99
import { ROUTES } from "../../../export/routes";
1010
import * as MDX from "../../../../../../app/components/common/MDXContent/anvil-cmg";
11-
import { CurlDownloadExportMethod } from "../../../../../../app/components/Export/components/AnVILExplorer/CurlDownload/curlDownloadExportMethod";
1211
import { ExportMethod } from "../../../../../../app/components/Export/components/AnVILExplorer/platform/ExportMethod/exportMethod";
1312
import { EXPORT_METHODS, EXPORTS } from "../../../export/constants";
1413
import { ExportToPlatform } from "../../../../../../app/components/Export/components/AnVILExplorer/platform/ExportToPlatform/exportToPlatform";
@@ -381,9 +380,9 @@ export const exportConfig: ExportConfig = {
381380
{
382381
children: [
383382
{
384-
component: CurlDownloadExportMethod,
383+
component: C.ExportMethod,
385384
viewBuilder: V.buildDatasetExportMethodCurlCommand,
386-
} as ComponentConfig<typeof CurlDownloadExportMethod>,
385+
} as ComponentConfig<typeof C.ExportMethod>,
387386
],
388387
component: C.ConditionalComponent,
389388
viewBuilder: V.renderDatasetCurlDownload,

site-config/anvil-cmg/dev/export/export.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { ROUTES } from "./routes";
88
import { mainColumn as exportMainColumn } from "./exportMainColumn";
99
import { sideColumn as exportSideColumn } from "./exportSideColumn";
1010
import { ExportMethod } from "../../../../app/components/Export/components/AnVILExplorer/platform/ExportMethod/exportMethod";
11-
import { CurlDownloadExportMethod } from "../../../../app/components/Export/components/AnVILExplorer/CurlDownload/curlDownloadExportMethod";
1211
import { EXPORT_METHODS, EXPORTS } from "./constants";
1312

1413
export const exportConfig: ExportConfig = {
@@ -181,9 +180,9 @@ export const exportConfig: ExportConfig = {
181180
{
182181
children: [
183182
{
184-
component: CurlDownloadExportMethod,
183+
component: C.ExportMethod,
185184
viewBuilder: V.buildExportMethodBulkDownload,
186-
} as ComponentConfig<typeof CurlDownloadExportMethod>,
185+
} as ComponentConfig<typeof C.ExportMethod>,
187186
{
188187
component: C.ExportMethod,
189188
viewBuilder: V.buildExportMethodTerra,

site-config/anvil-cmg/dev/index/filesEntityConfig.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ export const filesEntityConfig: EntityConfig<FilesResponse> = {
150150
tableOptions: {
151151
initialState: {
152152
columnVisibility: {
153-
[ANVIL_CMG_CATEGORY_KEY.AZUL_FILE_DOWNLOAD]: false,
154153
[ANVIL_CMG_CATEGORY_KEY.DONOR_PHENOTYPIC_SEX]: false,
155154
[ANVIL_CMG_CATEGORY_KEY.DONOR_REPORTED_ETHNICITY]: false,
156155
[ANVIL_CMG_CATEGORY_KEY.DIAGNOSE_DISEASE]: false,

0 commit comments

Comments
 (0)