Skip to content

Commit

Permalink
chore: remove unused feature flags (#941)
Browse files Browse the repository at this point in the history
Co-authored-by: Zoltan Szabo <[email protected]>
  • Loading branch information
AndrasEszes and zoltanszabo-bitrise committed May 13, 2024
1 parent a2e953e commit 9c97dd7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 49 deletions.
10 changes: 1 addition & 9 deletions source/javascripts/controllers/_MainController.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ import { safeDigest } from "../services/react-compat";

viewModel.shouldAllowYMLMenuWithoutDiscard = false;
viewModel.currentUser;
viewModel.productTourShown = true;
viewModel.lastWorkflowEditedDate;

viewModel.isFirstBuildExperienceEnabled = false;
Expand Down Expand Up @@ -729,17 +728,10 @@ import { safeDigest } from "../services/react-compat";
}

launchDarklyService.initialize().then(() => {
const isProductTourEnabled = launchDarklyService.variation("enable-wfe-product-tour");
const lastWFEDateMetadataReq = requestService.getCurrentUserMetadata("last_workflow_edited_date");
const tourReq = isProductTourEnabled ? requestService.getProductTourShown() : null;

viewModel.isFirstBuildExperienceEnabled = launchDarklyService.variation("enable-first-build-experience");

const requests = _.compact([lastWFEDateMetadataReq, tourReq]);

return Promise.all(requests).then(([lastWFEDateMetadataResp, tourResp]) => {
requestService.getCurrentUserMetadata("last_workflow_edited_date").then((lastWFEDateMetadataResp) => {
viewModel.lastWorkflowEditedDate = lastWFEDateMetadataResp;
viewModel.productTourShown = tourResp ? tourResp.tourShown : true;
});
}).finally(() => {
appService.getAppDetails().then(appService.getOrgBetaTags).then(resolve, reject);
Expand Down
6 changes: 0 additions & 6 deletions source/javascripts/controllers/_WorkflowsController.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,6 @@ import { extractInputNames, extractReleaseNotesUrl } from "../components/StepCon

function loadAppAndUser() {
$q.all([
launchDarklyService.initialize().then(() => {
var runWorkflow = launchDarklyService.variation("run-workflow-from-wfe", false);
var runIf = launchDarklyService.variation("enable-run-if-visual-editor", false);

return { runWorkflow, runIf };
}),
requestService.getCurrentUserData(),
requestService.getApp(appServiceUtil.getAppSlug()),
appService.getOwnerPlanData()
Expand Down
34 changes: 0 additions & 34 deletions source/javascripts/services/_requestService.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -134,40 +134,6 @@ import jsyaml from "js-yaml";
});
};

requestService.getProductTourShown = function(requestConfig) {
var requestURL;

switch (requestService.mode) {
case "website":
requestURL = "<%= webserver_path(data[:routes][:website][:product_tour_shown_get]) %>";

break;
case "cli":
return $q.reject(
new Error("<%= data[:strings][:request_service][:get_product_tour_data][:not_website_mode_error] %>")
);
}

return $q(function(resolve, reject) {
$http.get(requestURL, requestConfig).then(
function(response) {
resolve({
tourShown: response.data.tour_shown,
});
},
function(response) {
reject(
errorFromResponse(
response,
"<%= data[:strings][:request_service][:get_product_tour_data][:default_error] %>",
"<%= data[:strings][:request_service][:get_product_tour_data][:error_prefix] %>"
)
);
}
);
});
};

requestService.getCurrentUserMetadata = function(metadataKey, requestConfig) {
var requestURL;

Expand Down

0 comments on commit 9c97dd7

Please sign in to comment.