Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production deploy #2802

Merged
merged 3 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions doc/how-to/how-to-setup-metabase-for-a-new-team.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,7 @@ query GetFlowIDsForTeam {
![Screenshot - Share Dashboard link with team](./images/setup-metabase/share_with_team.png)

8. Update "ODP Useful Links" document on Notion
* Link: https://www.notion.so/opensystemslab/Open-Digital-Planning-Useful-links-176e31a4d1274c82959d83fe503d274f
* Dashboards are listed under PlanX > BETA services & analytics > {Council})
* Link: [https://www.notion.so/opensystemslab/Open-Digital-Planning-Useful-links-176e31a4d1274c82959d83fe503d274f](https://www.notion.so/opensystemslab/Plan-Service-Content-d579ddc3f4f3472b8fe167865ede2e93?pvs=4#e637abed931d4697a2707455d81e4620)https://www.notion.so/opensystemslab/Plan-Service-Content-d579ddc3f4f3472b8fe167865ede2e93?pvs=4#e637abed931d4697a2707455d81e4620
* Dashboards are listed under PlanX Service Content > BETA services & analytics > {Council})

9. Update the `flows.analytics_link` column in Hasura with the public URL (generated in step 6), for each flow a dashboard has been generated for
28 changes: 0 additions & 28 deletions editor.planx.uk/src/@planx/components/Send/Public.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import axios from "axios";
import DelayedLoadingIndicator from "components/DelayedLoadingIndicator";
import { hasFeatureFlag } from "lib/featureFlags";
import { useStore } from "pages/FlowEditor/lib/store";
import React, { useEffect } from "react";
import { useAsync } from "react-use";
Expand All @@ -20,33 +19,6 @@ export type Props = PublicProps<Send>;
const SendComponent: React.FC<Props> = ({
destinations = [DEFAULT_DESTINATION],
...props
}) => {
// If testing with the feature flag, skip scheduled event creation because no stored lowcal_session to generate payloads
const testSession = hasFeatureFlag("DISABLE_SAVE_AND_RETURN");

useEffect(() => {
if (testSession) {
props.handleSubmit?.({
...makeData(props, true, "skippedEvents"),
auto: true,
});
}
}, []);

if (testSession) {
return (
<Card>
<DelayedLoadingIndicator text={`Skipping test submission...`} />
</Card>
);
} else {
return <SendEvents destinations={destinations} {...props} />;
}
};

const SendEvents: React.FC<Props> = ({
destinations = [DEFAULT_DESTINATION],
...props
}) => {
const [passport, sessionId, teamSlug] = useStore((state) => [
state.computePassport(),
Expand Down
54 changes: 0 additions & 54 deletions editor.planx.uk/src/components/FeatureFlagBanner.tsx

This file was deleted.

6 changes: 1 addition & 5 deletions editor.planx.uk/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import MuiToolbar from "@mui/material/Toolbar";
import Typography from "@mui/material/Typography";
import useMediaQuery from "@mui/material/useMediaQuery";
import { ComponentType as TYPES } from "@opensystemslab/planx-core/types";
import { hasFeatureFlag } from "lib/featureFlags";
import { clearLocalFlow } from "lib/local";
import { capitalize } from "lodash";
import { Route } from "navi";
Expand All @@ -43,7 +42,6 @@ import { useStore } from "../pages/FlowEditor/lib/store";
import { rootFlowPath, rootTeamPath } from "../routes/utils";
import AnalyticsDisabledBanner from "./AnalyticsDisabledBanner";
import { ConfirmationDialog } from "./ConfirmationDialog";
import FeatureFlagBanner from "./FeatureFlagBanner";
import TestEnvironmentBanner from "./TestEnvironmentBanner";

export const HEADER_HEIGHT = 74;
Expand Down Expand Up @@ -274,8 +272,7 @@ const NavBar: React.FC = () => {
);
const isSaveAndReturnLandingPage =
path !== ApplicationPath.SingleSession &&
!saveToEmail &&
!hasFeatureFlag("DISABLE_SAVE_AND_RETURN");
!saveToEmail;
const isContentPage = useCurrentRoute()?.data?.isContentPage;
const { node } = useAnalyticsTracking();
const isSectionCard = node?.type == TYPES.Section;
Expand Down Expand Up @@ -378,7 +375,6 @@ const PublicToolbar: React.FC<{
<NavBar />
<AnalyticsDisabledBanner />
<TestEnvironmentBanner />
<FeatureFlagBanner />
<ConfirmationDialog
open={isDialogOpen}
onClose={handleRestart}
Expand Down
2 changes: 1 addition & 1 deletion editor.planx.uk/src/lib/featureFlags.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// add/edit/remove feature flags in array below
const AVAILABLE_FEATURE_FLAGS = ["DISABLE_SAVE_AND_RETURN"] as const;
const AVAILABLE_FEATURE_FLAGS = [] as const;

type FeatureFlag = (typeof AVAILABLE_FEATURE_FLAGS)[number];

Expand Down
7 changes: 0 additions & 7 deletions editor.planx.uk/src/pages/layout/PublicLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ const PublicFooter: React.FC = () => {
const setting = flowSettings?.elements && flowSettings?.elements[key];

if (setting?.show) {
if (key == "privacy") {
return {
title: setting.heading,
href: "https://www.planx.uk/privacy",
newTab: true,
};
}
return {
title: setting.heading,
href: makeHref(key),
Expand Down
2 changes: 1 addition & 1 deletion editor.planx.uk/src/routes/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const isSaveReturnFlow = (flowData: Store.flow): boolean =>
export const setPath = (flowData: Store.flow, req: NaviRequest) => {
// XXX: store.path is SingleSession by default
if (!isSaveReturnFlow(flowData)) return;
if (hasFeatureFlag("DISABLE_SAVE_AND_RETURN")) return;

const isEmailCaptured = Boolean(useStore.getState().saveToEmail);
const path =
req.params.sessionId && !isEmailCaptured
Expand Down
Loading